How my computer got smart about my stuff — explained so a 12-year-old could build one.
I gave the AI on my Mac permission to cheat on every test — and that one trick is the whole secret behind making an AI that actually knows about your life.
An AI model is like a friend who has read basically the whole internet. Ask about volcanoes, the French Revolution, Minecraft redstone — no problem. But ask it "When is my science project due?" and it has no idea. It never saw your homework planner. Worse, instead of saying "I don't know," it sometimes just makes up a confident-sounding answer. AI people call that hallucinating, and it's the #1 reason you can't fully trust an AI about your own stuff.
So the question is: how do you get an AI to answer questions about your documents — your notes, your family's plans, your team's files — without it making things up?
Here's the whole idea in one sentence: before the AI answers, someone hands it the exact pages it needs — and then it answers using those pages instead of its memory.
That's called RAG, which stands for Retrieval-Augmented Generation. Fancy name, simple meaning:
It's an open-book test. The AI is still the one writing the essay — but it's copying facts from real pages sitting right in front of it, and it can even point at which page each fact came from (those are called citations).
Wait — who hands it the pages?
Not a person! That's the clever part. A little librarian program finds the right pages automatically, in about a tenth of a second. The rest of this post is about how that librarian works.
Before the librarian can find anything, you have to build the library. Every document you want the AI to know about goes through four steps:
The one thing most people get wrong
The big smart AI never searches for anything. All the searching happens before it wakes up. So if the librarian grabs the wrong cards, even the smartest AI in the world writes a beautiful essay about the wrong thing. When RAG breaks, it's almost always the librarian's fault, not the AI's.
I have notes about several of my coding projects, and each note has a section called "Tech Stack" (the tools that project uses). I asked my AI about one specific project's tech stack… and the librarian brought back the wrong project's cards.
Why? Picture cutting up five different cookbooks into index cards. Now you're holding a card that just says "Chapter 2: Ingredients — flour, sugar, eggs." Which cookbook is it from? The card doesn't say. My "Tech Stack" cards were exactly like that — the project's name was at the top of the document, but not on each card. To the librarian, all five projects' cards looked nearly identical, and the right one ranked around 18th place.
Two ways to fix it:
That lesson generalizes to every RAG system ever built: every card must make sense on its own, because the librarian only ever sees one card at a time.
Another sneaky trap: pictures of words
A scanned PDF looks like text to you, but to the computer it's just a photo. The extract step gets… nothing. Your important document becomes invisible to the AI, and nothing warns you! The fix is OCR — software that literally looks at the picture and reads the letters off it. Always check that your documents actually turned into text.
There's a free app called Open WebUI that does almost everything above with buttons:
The catch with clicking: when a document changes, you have to notice, delete the old version, and re-upload it. For ten files that's fine. For hundreds that update every week, you'd want a small script that syncs automatically — which is exactly what I built. Same architecture, just repeatable.
If you know a little Python, here is genuinely the entire core of RAG. Everything else any company builds is just armor around this:
for doc_id, text in my_documents():
cards = cut_into_chunks(text) # index cards
db.add(cards, embedder.encode(cards)) # meaning-addresses -> filing cabinet
cards = db.find_nearest(embedder.encode(question), top_k=8)
answer = ai(f"Answer using ONLY these notes:\n{cards}\n\nQ: {question}")
That's it. No PhD required — just a genius who's never met you, a very fast librarian, and an open book.
Written after building a five-persona local AI team — all models and documents running privately on one Mac.
After doing all this work I had AI teach me what it did and thought it would be a good idea to turn this into a blog/tutorial for others. This is written by the AI BRAIN TRUST