How To Build An AI Brain
Everyone is building an "AI brain" for their business right now. Most of them are built the same way, and most of them quietly stop working once you've fed them a few hundred documents.
The usual recipe goes like this. Take your documents, chop them into equal-sized chunks, store them in a vector database, and when you ask a question, hand the AI the four or five chunks that look closest. Or skip all that and upload your files to ChatGPT or Claude. The newest version, popular this year, has an AI write and maintain a wiki of notes in Obsidian.
I built mine differently. Not to be clever, but because I measured each step, and the usual way kept losing answers.
This is my brain taken apart: twelve decisions, what I chose, and why. No jargon you need to know in advance
Why I built an AI brain
My business used to live in my head, on a million Google Drive documents, on Airtable and various notes and documents on my computer.
The answers were all written down somewhere, but finding them meant me.
Every question went through me.
I wanted something that knows only what I've written, and admits when it doesn't know.
Here's how I built my company AI brain
1. A database, not a notes app
The obvious place to start is a notes app like Obsidian, or a wiki. Lots of people love them, and so do I for writing. But for a brain, I chose a database instead (Supabase), for two reasons.
First, I wanted search by meaning. A database can store each piece of text as a list of numbers, called a vector, that captures what it means. That sounds technical, but the effect is simple: a question about "pricing" can find a note that only ever says "what I charge". You don't have to remember the exact words you used two years ago.
Second, notes-and-wiki setups choke at a few hundred documents. To be fair to Obsidian, it copes with tens of thousands of notes. What breaks is the way most AI setups read a vault. The AI is handed a list or a summary of every note, and picks from it. Every new note makes that list longer, until the AI can't hold it all at once.
I hit that wall myself. An early version of my brain showed the AI a short summary of every document on every question. I measured where it would run out of room: about 426 documents. That sounds like a lot until you count your own. A coach with five years of session notes, or a consultant with a proposal per client, gets there fast.
People building AI-written wikis report the same thing even sooner. One saw answers go unreliable around article 80, with the AI blending two separate notes into a claim neither of them made.
A database had a third advantage, and it's the one I came to value most. The rules live inside it. Every program that touches my brain has to go through the database's own doors, so every program has to follow the same rules. You'll see why that matters further down.
2. My words, exactly. Never a summary.
Most AI memory tools don't keep what you wrote. They keep what the AI thought was important: a summary, a list of "facts", a wiki page it wrote for you. It reads beautifully, and it's wrong more often than you'd think.
Ask an AI for "the key points" of a document and it throws away the things that aren't opinions: numbers, prices, spreadsheets, reference material, the exact wording of a promise you made a client. Those are often the very things you'll need later.
And once a summary is wrong, every answer built on it is wrong too, and you can't tell. People running AI-written wikis describe pages that still call an old process "current" months after it changed.
So my brain stores every document word for word. When it answers, it reads my actual words, and any sentence it quotes can be found again in the original. If I want to check, I can.
3. Cut where I cut, filed where it sits
A long document has to be cut into pieces so the right part can be found. Nobody wants the AI reading a 40-page handbook to find one price.
The usual way is equal-sized chunks: cut every 1,000 characters, mid-sentence or not. That's how you end up with half a pricing table in one piece and the other half in the next.
Mine is cut at my own headings and paragraphs, the way I organised the document in the first place, at most 3,000 characters a piece. A piece never starts halfway through a thought.
Each piece is then filed under a sentence saying where it lives: its folder, its document's title, and the headings above it. A piece of the file business/pricing/day-rate.md is filed as "business pricing day rate". So when I ask about pricing, it's found, even if the piece itself never uses the word.
I also tested the fancier approach: having an AI write a one-line description of every piece, as Anthropic recommends. It found nothing extra and cost 13 cents a document, so I deleted it. Where a piece sits already says enough. That's a theme you'll see again: I keep what earns its place, and throw out what only sounds clever.
4. Two ways of searching at once
Search by meaning has a blind spot: names, codes and rare words. Ask about "Birch & Co" and meaning-search may bring back anything about clients, because to it, one client sounds much like another.
Plain word search has the opposite blind spot. It finds "Birch & Co" perfectly, but misses "what I charge" when you asked about "pricing".
So my brain does both, every time. Think of two librarians working side by side. One knows what you mean. The other knows exactly where every word appears.
The first finds the 200 pieces closest in meaning. The second finds pieces holding your exact words, and the rarer a word is across my documents, the more it counts. A client's name, mentioned in three documents, outweighs "the", which is in all of them.
The two lists are then merged by position, not by score. A piece both librarians found rises to the top. A piece only one of them found still stays in the running.
5. No score decides. A reader does, and it may say "nothing".
This is the decision I'm proudest of, because it goes against how nearly everyone builds these.
The normal way is to keep the top few search results by score and hand them to the AI. It sounds reasonable. But a score can only say this piece is closer than that one. It can't say whether either one actually answers the question. The top five results for a question nobody ever wrote about are still five results, and the AI will happily build an answer from them.
I tested it on a big store of 52,689 entries from 845 documents. Keeping the top 24 served only 58.9% of the answers, and it got worse as the store grew. I tried smarter cuts: cutting where the scores suddenly drop, and cutting below a set score. Every cut made by a number lost answers as the store grew.
So in my brain, a small AI model reads the 200 candidates and names only the ones that genuinely help. Like a good research assistant, it can come back and say "none of these answer your question". And when the answer isn't in my documents, "none" is exactly the right answer.
It kept 89% at every size I tested. And when I asked it the capital of France, which my documents never mention, it refused at every size. A brain that knows only my business shouldn't know that, and mine doesn't pretend to.
This is now a rule inside the database itself: a closeness score may decide where to look, never what exists or how many answers there are. The database refuses to set up any search that breaks it. Nobody, including a future me in a hurry, can quietly switch it back.

6. "My" means me
This one sounds small, and it made one of the biggest differences.
I ask questions the way anyone does: "Where is my business based?" But my documents are written about me, so they say "Monika's business is based in…". To a search, "my" and "Monika's" are completely different words.
So every question is also searched as if I'd said my own name. On one test, the piece that held the answer went from 320th place to 2nd. Same question, same documents, one small decision.
7. No made-up connections
The trendiest idea in AI memory right now is a "knowledge graph". An AI reads your notes and draws links between them: this idea supports that one, this client relates to that project. On screen it looks like a real brain, all glowing dots and lines.
I tested it. Of the links the AI proposed, about half were right and about half were wrong. And a link that's wrong looks exactly like one that's right. Links based on how similar two notes sound were worse still: most of them just joined two pieces of the same document.
Imagine asking about a client and getting an answer that leans on a connection the AI invented. You'd have no way of knowing.
So my brain keeps only connections that are certain: which document a piece came from, and where it sits in it. Everything else, the AI works out at the moment you ask, from your actual words, where you can see it.
8. Keys out at the door, dates from the name
Business notes are full of things that shouldn't be stored: passwords, API keys, a door code written down in a hurry. My brain removes anything that looks like one before anything is saved, and puts a note where it was. Getting a key back out of a database afterwards is a forensic job, so it never gets in.
And it only trusts a date written in a file's name, like 2026-11-20-call-notes. The date a file was saved tells you when it was copied or downloaded, not when the meeting happened. Move your files to a new laptop and every one of them looks brand new. A brain that thinks your 2022 price list is from this morning will give you the wrong price with total confidence.
9. Rules checked by code, not by asking nicely
You can tell an AI "never invent a number" in its instructions. It will still do it sometimes. Asking nicely doesn't work, however firmly you phrase it.
So after my brain writes an answer, code checks every part of it before I see it. A figure none of the sources contain, a definition the sources don't give, a word on my never list: that part is taken out, and the reason is written down.
The AI's good intentions aren't the safety net. The check is. That's the difference between hoping it behaves and knowing it can't misbehave in that particular way.
10. Every cent counted before it's spent
AI bills are a common, nasty surprise. A loop that runs all night, a document that's far bigger than you thought, and suddenly there's a bill nobody planned for.
In my brain there is exactly one place that pays an AI provider. Before every single call, it asks the database: may I spend this? The database counts what's already been spent, checks the limit I set, and says yes or no in the same breath. There's no side door.
Every call is written down with its price. The prices aren't typed in by hand either: they're worked out from the providers' actual bills, so they can't quietly go stale when a price changes. And if a price is unknown, the call is marked unknown, never counted as zero. Zero is a number. Unknown is a warning.
11. It runs without me, and tells me when it's unwell
A brain that needs you to press a button is a brain you'll stop feeding. Life gets busy, and the button doesn't get pressed.
Mine runs on GitHub on a timer. Every night it reads anything new in my Google Drive folder, with my laptop shut. I drop a document in the folder and, by morning, the brain knows it.
Every scheduled job writes down that it ran, so a job that stops shows up as late instead of going quiet. And once a day, everything it can see wrong with itself arrives as one email. I don't have to go looking for problems. They come to me.
12. Nothing believed until it's measured on my own documents
This is the decision under all the others.
Every method I threw away looked fine when I tried it on a small pile of documents. They only failed as the pile grew. That's the trap with most AI demos: they're done on ten documents, and your business has hundreds. So every change is measured on my own documents, and on a second store many times bigger.
There are two measurements.
One: does the piece that answers a question actually reach the reader? The questions are written from my own documents, so the right answer is known in advance.
Two: is the final answer right? It's asked the way a real person asks: clear questions, vague ones, questions my documents can't answer, and long back-and-forth conversations. A model at least as strong as the one answering grades each reply against the source.
The last fresh run, on new questions, got 48 of 51 right. That included a 19-turn conversation where every single turn was right. The three it got wrong are written down, and they're the next thing to fix.

Almost nobody does this. Not one of the popular tutorials I looked at includes a test step. So most people running one have no way of knowing how often it's wrong.
The big idea: adaptive, but only through evidence
Put together, the twelve decisions add up to one idea.
Lots of AI systems call themselves "adaptive". They rewrite their own memories, summaries and links as they go. It sounds smart, and it's how a brain slowly drifts away from what you actually wrote.
Mine adapts too, but only where the data can't be wrong in the same way. It recounts how rare each word is every time new documents arrive. It learns prices from the real bills. Everything that touches what's true, from how search works to which AI model answers, changes only after a measurement says it's better.
The memory stays exact. Everything around it can learn.
That's the difference between a brain that sounds right and a brain you can trust with a client's question.
If you only remember three things
- Keep your own words. A summary is someone else's opinion of your business, and it goes out of date.
- Let it say "I don't know". An AI that always has an answer is an AI that sometimes makes one up.
- Test it on your documents. If you've never measured how often it's right, you don't know.