AI
6 min read
15 September 2026
How to give an AI a memory of your own notes (for $0)
A hosted, open-source side project for learning Retrieval-Augmented Generation from the ground up — what it is, how it works, and how to run your own copy in about ten minutes.
ChatGPT is great at general knowledge. It knows nothing about your notes — the router config you wrote down six months ago, the sourdough feeding schedule you keep forgetting, the backup strategy you set up once and never think about again.
You can't just paste your notes into a chat and ask questions, either. Once you have more than a few files, they stop fitting in one prompt. And fine-tuning a model on your own data is slow, expensive, and total overkill for "where's my router password again."
So we built Ask Your Notes Bot: upload your Markdown notes, sign in, ask questions in plain English, get answers sourced from your own files — with links back to exactly which note it pulled from. It's open source, fully hosted on free tiers, and the whole point of building it was to actually understand RAG (Retrieval-Augmented Generation) instead of just using it as a buzzword.
Repo: github.com/Titungco/ask-your-notes-bot
This post is the "catch up fast" version: what RAG actually is, how this project implements it, and how to get your own copy running in about ten minutes.
RAG in one paragraph
RAG is: don't ask the model to know your data — ask it to read your data, on demand, one question at a time. Every time you ask something, the system searches your notes for the few most relevant snippets, hands only those to the language model, and says "answer using this." That's it. No training, no fine-tuning, just search then generate.
The clever part is how the searching works: not by matching keywords, but by comparing meaning. "What's my feeding ratio?" and a note that says "1:5:5 by weight, one part starter, five parts flour" share almost no words in common — but a RAG system finds that match anyway, because it's comparing what the text means, not what it says.
How it actually works
Every RAG system splits into two pipelines that run at completely different times.
When you upload a note (once):
- Split the text into chunks (~400 words each, with some overlap so nothing important gets cut in half at a boundary).
- Turn each chunk into a list of numbers — an "embedding" — using an embedding model. This project uses Google's Gemini.
- Store the chunk's text and its numbers in a database that understands vector math (Postgres, with the
pgvectorextension).
When you ask a question (every time):
- Turn your question into numbers, the same way.
- Ask the database: "which stored chunks have numbers closest to mine?" — this is just sorting by distance, nothing more exotic.
- Take the top 4 matches, paste their text into a prompt along with your question.
- Send that to a chat model — this project uses Groq, for speed — and return whatever it says, along with which notes it used.
"Search by meaning instead of keywords" is the whole magic trick of RAG, and it's really just: similar meaning → similar numbers → sortable by distance.
The stack, for the curious
- Frontend: React + MUI, hosted on Vercel
- Backend: FastAPI (Python), on Render's free tier
- Database + Auth: Supabase — Postgres with the
pgvectorextension, plus magic-link (passwordless) sign-in - Embeddings: Google Gemini
- Chat model: Groq, for fast inference on their custom hardware
Everything runs on free tiers, no credit card required anywhere. Each user's notes are private to them — the isolation is one line of SQL (WHERE user_id = ...) on every query, worth knowing if you ever build something similar: multi-tenancy doesn't have to mean separate databases per customer.
Try it yourself (about 10 minutes)
You'll need free accounts on Supabase, Groq, and Google AI Studio (Gemini).
git clone https://github.com/Titungco/ask-your-notes-bot
cd ask-your-notes-bot
# Walks you through creating the Supabase project, enabling pgvector,
# and grabbing your Groq/Gemini API keys — writes everything to .env for you
./scripts/setup-cloud.sh
# Backend
cd backend
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload # http://localhost:8000
# Frontend, separate terminal
cd frontend
npm install
npm run dev # http://localhost:5173
Sign in with a magic link, upload one of the sample notes in sample-notes/, and ask it a question. Watch the "Sources" panel under the answer — that's the retrieval step, made visible.
Go deeper
The repo's docs/RAG-NOTES.md has the full breakdown with diagrams: the exact SQL query that does retrieval, a sequence diagram of a full request, the data model behind multi-tenancy, and a list of what's deliberately not built yet (conversation memory, hybrid search, note editing) as ideas for extending it yourself.
If you build something with this, or spot something to improve, open an issue — it's a learning project, contributions and questions are welcome.
Want us to do this for your product?
We build sites that hit 100 on Lighthouse by default, not by accident. Tell us about your project.