Sitemap

🧠 How I Built a Local Chatbot That Understands My Notes Using RAG + Ollama

2 min readApr 30, 2025

Have you ever wished you could simply ask your notes a question and get an intelligent, direct answer?

That’s exactly what I set out to build — a local AI chatbot that reads and understands my text notes, powered by Retrieval-Augmented Generation (RAG), Ollama, and Chroma.

In this post, I’ll walk you through what I built, how it works, and how you can try it with your own data.

🚀 What This Project Does

  • ✅ Uses your local .txt notes as the source of truth
  • ✅ Embeds and stores them in a fast vector database (Chroma)
  • ✅ Uses Ollama to run a local Large Language Model (like llama3.2)
  • ✅ Answers your questions by retrieving the most relevant notes first
  • ✅ Runs 100% locally — no API keys, no cloud, no leaks

🔧 Tools I Used

  • Ollama: Runs the local LLM (e.g. LLaMA3)
  • ChromaDB: Vector store for storing/retrieving notes
  • LangChain: Ties everything together (retrieval, prompts, parsing)
  • nomic-embed-text: Local embedding model from Ollama

📁 Project Setup

All the code and dummy notes are available here:
👉 github.com/deepak786/first-rag

🛠️ How It Works (The RAG Flow)

  1. Load your notes (in .txt files)
  2. Split them into chunks for better retrieval
  3. Embed the chunks using a local model (nomic-embed-text)
  4. Store them in Chroma
  5. Ask a question
  6. Retrieve relevant chunks
  7. Pass the chunks + question (query) to the LLM
  8. LLM answers using only your notes!

💬 Example Questions

  • “What did we discuss about offline chatbot support?”
  • “What is the difference between ML and LLMs?”
  • “What is the main idea behind Atomic Habits?”
  • “What was discussed in March’s team meeting?”

✅ Conclusion

This project made my personal notes feel intelligent. I can now ask questions and get context-aware answers — without any cloud dependencies.

If you’re into learning LLMs, RAG, or privacy-first AI tools, this is a great project to try. It’s simple, real, and 100% yours.

You can clone the project and use your own notes:
👉 github.com/deepak786/first-rag

If you found this useful, follow me here on Medium — more local AI experiments and dev-friendly LLM tutorials coming soon!

Happy coding :)

--

--

Deepak Goyal
Deepak Goyal

Written by Deepak Goyal

I’m a Software Engineer. I love programming. #java #android #kotlin #dart #flutter #firebase

No responses yet