The problem
The Local LLM Knowledge Assistant using RAG over Personal Notes with Ollama is a private system that lets a student ask questions and receive answers drawn from their own notes. Instead of sending documents to a cloud chatbot, the system runs two local models through Ollama: nomic-embed-text turns every note chunk into a 768-dimension vector stored in a local Chroma vector store, and llama3.2 reads only the most similar chunks to compose each answer, citing the source note for every claim. Students accumulate notes across semesters and then cannot find the one paragraph they need when it matters. Cloud assistants solve the search problem by uploading those notes to someone else's server, which many students will not accept for personal work. This project closes that gap with a fully offline pipeline: notes stay on the student's own machine, answers come only from retrieved text, and a question with no matching note receives an honest refusal instead of an invented answer.
Markdown or text notes, one file per topic, chunked at 500 characters.
Follow the working sequence
How it works
Every question travels the same five-stage path from raw notes to a cited answer. First, personal notes in Markdown or plain text are split into overlapping chunks of 500 characters with 100 characters of overlap, so a definition rarely breaks across a boundary. Each chunk is sent to Ollama's /api/embed endpoint, where nomic-embed-text returns a 768-dimension vector capturing the chunk's meaning, stored in a local Chroma collection with the chunk text and source note. When a question arrives, it is embedded the same way and the store returns the four most similar chunks by cosine similarity. Those four chunks — and nothing else — go into the prompt for llama3.2 through Ollama's /api/chat endpoint, with an instruction to answer only from the supplied text and to say so when the answer is absent. The reply is shown with the retrieved chunks and their similarity scores, so the student can check every claim against its source.
- The student writes or collects personal notes as Markdown or plain-text files, one file per topic.
- Ingestion splits each note into chunks of 500 characters with 100 characters of overlap, following paragraph breaks first so definitions stay whole.
- Each chunk is embedded with nomic-embed-text through Ollama's /api/embed endpoint and stored as a 768-dimension vector in the local Chroma collection, together with the chunk text and source note.
- A question is embedded the same way, and the collection returns the top 4 chunks by cosine similarity.
- The retrieved chunks are placed into a prompt for llama3.2 through Ollama's /api/chat endpoint, with an instruction to use only the supplied text and to refuse when the answer is absent.
- The answer is displayed with citations to the source note and chunk, plus the similarity score of each retrieved chunk.
Tech stack:
- Python 3
- Ollama · llama3.2 (3B)
- nomic-embed-text embeddings
- Chroma vector store
- FastAPI backend
- HTML · CSS · JavaScript frontend
- Markdown notes corpus
Dataset & model details
- Dataset: The user's own personal notes in Markdown or plain text; the working demo ships with a built-in sample corpus of 6 study notes (DBMS indexing, OS processes, OSI model, Python decorators, ML overfitting, subnetting) split into 18 chunks, clearly labelled as demo data.
- Task: Grounded question answering; input = a question plus the top 4 retrieved chunks, output = an answer with citations to the source notes, or an honest refusal when no chunk is relevant.
- Model: llama3.2 (3B) generates answers; nomic-embed-text (137M parameters) produces 768-dimension embeddings; retrieval ranks chunks by cosine similarity and keeps the top 4.
- Metrics: No accuracy figure is claimed. Retrieval quality is evaluated by spot-checking that each answer's claims trace back to its cited chunks, and by testing refusal behaviour on questions outside the notes corpus; both depend on note quality and chunking, not on a benchmark score.
| Parameter | Value |
|---|---|
| Chat model | llama3.2 (3B) · approximately 2.0 GB download (Ollama library value) |
| Embedding model | nomic-embed-text · 137M parameters · 768 dimensions (datasheet value) |
| Embedding context | 8,192 tokens (Ollama library value) |
| Chat context window | 128,000 tokens (model ceiling, Ollama library value; Ollama's default allocation is lower on machines with less than 24 GiB of VRAM) |
| Chunk size | 500 characters with 100 characters of overlap (design choice) |
| Retrieval | Top 4 chunks by cosine similarity (design choice) |
| Vector store | Chroma · local collection "notes" |
| Ollama API | http://localhost:11434 · /api/chat and /api/embed endpoints |
| Demo corpus | 6 sample notes · 18 chunks (labelled demo data) |
| Connectivity | Fully offline after the models are pulled (no internet needed) |
Project features
The assistant's strongest capabilities are its grounded answering, its honest refusal, its fully local operation and its inspectable retrieval. Grounded answering means every reply is built from the four retrieved chunks and carries citations to the exact note and chunk, so a claim can always be traced back to its source. Honest refusal means a question with no supporting chunk gets a plain statement that the notes contain nothing on the topic, instead of a fluent guess dressed up as fact. Fully local operation means both models, the vector store and the interface run on one machine through Ollama, so notes and questions never cross the network. Inspectable retrieval means each answer displays the retrieved chunks with similarity scores, turning the pipeline itself into something the student can study, tune and explain in a viva.
- [Grounded answers with citations] Every reply is composed only from the retrieved chunks and shows the source note and chunk number for each claim, so any answer can be checked against the notes it came from.
- [Honest refusal on missing knowledge] When no chunk passes the similarity threshold, the assistant states plainly that the notes contain nothing on the topic instead of inventing an answer.
- [Fully local Ollama pipeline] Both models and the vector store run on the student's own machine through Ollama's local API, so notes, questions and answers never leave the machine and no API key or account is needed.
- [Notes library with chunk view] All indexed notes are listed with their chunk counts, so the student can see exactly what the assistant is allowed to answer from.
- [Ingestion with configurable chunking] New notes are chunked, embedded and indexed from the interface, with chunk size and overlap adjustable — the demo build uses 500 characters with 100 characters of overlap.
- [Inspectable retrieval] Each answer displays the retrieved chunks with their cosine similarity scores, making the retrieval step visible and tunable rather than a black box.
- [Labelled demo corpus] The working demo ships with a built-in sample corpus of 6 study notes across 18 chunks, clearly labelled as demo data, so the pipeline can be tried before the student's own notes are added.
What is included
- Complete Python backend (ingestion, embedding, retrieval, grounded prompting) calling Ollama's local API
- Working single-file web demo with chat, notes library and ingestion views and the labelled 6-note sample corpus
- Setup guide with the exact Ollama pull and run commands for both models
- Project report PDF (background, RAG theory, pipeline design, methodology, honest evaluation)
- PPT presentation for final review
- Viva Q&A preparation document (embeddings, chunking, vector search, grounding, Ollama, hallucination control)
Limitations & prerequisites
- Answers are only as good as the notes: thin, outdated or incorrect notes produce thin, outdated or incorrect answers.
- llama3.2 (3B) is a small local model, so long multi-step reasoning and complex multi-hop questions may be answered only partially.
- Retrieval can miss: a long explanation split across chunks may not all land in the top 4, and a poorly worded question may retrieve the wrong chunks.
- Generation on a CPU-only machine is noticeably slower than on a machine with a GPU; response time is hardware-dependent and no speed figure is promised.
- The app is single-user and local, with no login system or multi-user sharing.
- Notes inside scanned PDFs or images need text extraction first; OCR is not part of this build.
Frequently Asked Questions
Is this project suitable for a final-year project?
Yes — for Computer Science, IT and AI & Machine Learning programs. It demonstrates retrieval-augmented generation, embeddings, vector search, local LLM deployment through Ollama, and grounded prompting with hallucination control, all in one working system. The pipeline is small enough to build and explain in a semester, yet each stage — chunking, embedding, retrieval, generation — gives the student a genuine viva topic with visible, testable behaviour. A different local model or a re-ranking step can be added later without changing the pipeline.
Does it really work without the internet?
Yes, once the two models are downloaded. Ollama serves llama3.2 and nomic-embed-text from the local machine, Chroma stores vectors in a local collection, and the web interface runs locally with no account or API key, so questions, notes and answers never leave the machine. Internet is needed only the first time, to pull the models with ollama pull.
What models does it use and why?
It uses llama3.2 (3B) for answer generation and nomic-embed-text for embeddings, both run through Ollama. The 3B chat model is small enough to run on an ordinary laptop, and nomic-embed-text is a 137M-parameter model producing 768-dimension vectors, which keeps the vector store light while giving good retrieval on short study notes. A larger local model can be swapped in later through Ollama if the machine has enough memory.
What happens if I ask something that is not in my notes?
The assistant says so plainly instead of guessing. If no chunk passes the similarity threshold, the reply states that the notes contain nothing on the topic and suggests adding a note first. This honest refusal is a deliberate design choice: a grounded assistant that admits ignorance is more trustworthy than one that invents a fluent but false answer.
Can I use my own notes instead of the sample ones?
Yes — that is the point of the project. Any Markdown or plain-text note can be ingested from the interface: it is chunked, embedded with nomic-embed-text and added to the local Chroma collection, and the same note can be re-ingested after editing so answers stay current. The 6-note sample corpus is only demo data for trying the pipeline, and it can be removed once real notes are loaded.
Components & software requirements
- Python 3
- Ollama · llama3.2 (3B)
- nomic-embed-text embeddings
- Chroma vector store
- FastAPI backend
- HTML · CSS · JavaScript frontend
- Markdown notes corpus
Dataset & model details
- Dataset: The user's own personal notes in Markdown or plain text; the working demo ships with a built-in sample corpus of 6 study notes (DBMS indexing, OS processes, OSI model, Python decorators, ML overfitting, subnetting) split into 18 chunks, clearly labelled as demo data.
- Task: Grounded question answering; input = a question plus the top 4 retrieved chunks, output = an answer with citations to the source notes, or an honest refusal when no chunk is relevant.
- Model: llama3.2 (3B) generates answers; nomic-embed-text (137M parameters) produces 768-dimension embeddings; retrieval ranks chunks by cosine similarity and keeps the top 4.
- Metrics: No accuracy figure is claimed. Retrieval quality is evaluated by spot-checking that each answer's claims trace back to its cited chunks, and by testing refusal behaviour on questions outside the notes corpus; both depend on note quality and chunking, not on a benchmark score.
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.
Download free synopsis (PDF)
Enter your name and WhatsApp number — the synopsis PDF downloads immediately. We may send occasional project updates on WhatsApp; no spam.