LocalCortex
Chat with your documents. Every model, vector and message stays on your machine.
What is LocalCortex?
LocalCortex is a fully local Retrieval-Augmented Generation (RAG) pipeline. Upload a file, ask it a question, and get an answer grounded in that file, with Ollama running the embedding and generation models, Qdrant storing the vector index, and Postgres keeping the conversation history. No API keys, no external calls, nothing leaves your machine.
Why run it locally?
Private
No API keys, no third-party calls. Documents and conversations never leave your machine.
Grounded
Answers are built only from retrieved passages, with the sources that supported them shown alongside.
Honest
When your documents don't cover a question, LocalCortex says so instead of guessing.
Remembers the conversation
Ask "what about her projects?" after a question about someone, and it knows who you mean.
How does it work?
-
Ingest
A .txt, .md, .pdf or .docx file is loaded, split into chunks along its natural structure, and embedded.
-
Retrieve
A question is embedded and matched against the index; only chunks that clear a calibrated relevance threshold are used.
-
Answer
The matched chunks are placed in a prompt and streamed back through the local model, citations attached.
Measured, not guessed
Every claim on this site is backed by a script in the repo that measured it.
| What was tested | Result |
|---|---|
| Answers correct, read by hand random sample of 52 + 10 questions typed the way users type | 61 / 62 |
| Questions it should refuse, refused same check | 14 / 14 |
| Made-up answers on topics missing from the documents hallucination test | 0 / 10 |
| Right passage found first 113 hand-written questions, 5 documents | 105 / 113 |
| Resume questions answered correctly before → after whole-document context | 17 → 22 / 25 |
| Off-topic follow-ups that got passages anyway | 0 / 6 |
| Answers starting "According to…" or naming files 16 checked | 0 |
| Time per answer on a laptop CPU median | 48 s |