How to Build a Personal Knowledge Base for AI
Every new chat starts from zero, and pasting everything in makes the answers worse. A small library of plain text files you own and keep refining works better than any upload. This is a guide to building one.

A personal knowledge base for AI is a small folder of plain text files you own and point the model at, so every new chat starts from your rules. It beats pasting everything in, because models read long inputs unevenly, and it gets better every time you refine it.
Every new chat starts from zero.
Whatever got explained in the last one has to be explained again. Keep it short. Skip the jargon. Write for someone new to this. And all the background, again, from the top. Every new chat, the same speech. It's like working with a brilliant colleague who gets total amnesia every time they leave the room.
The obvious fix is to paste more: every document and every earlier conversation. If the model knew everything, surely it would stop asking.
It doesn't get better. In a few ways it gets worse.
What works better is a small library of plain text files you own and keep refining. I keep one, as small markdown files organized by skill, and this is a guide to building your own.
Why pasting everything into a chat doesn't work
The window is finite, and it gets worse as it fills. Every model has a context window, a limit on how much text it can consider at once. Through the developer APIs, the big models now take around a million tokens, which is several thick novels. The chat apps most people actually use often get far less, sometimes tens of thousands of tokens on the cheaper plans. And a bigger window doesn't mean everything inside it gets equal attention.
In 2023, a Stanford-led paper called "Lost in the Middle" found that models used information at the start and end of a long input far better than whatever sat in the middle. In one test, putting the answer in the middle of the documents made a model do worse than if it had been given no documents at all. Today's models handle this better. Still, in July 2025 Chroma tested 18 models, from GPT-3.5 up to Claude 4, and found performance got less reliable as the input got longer, even on simple tasks. They called it context rot. The number I hold on to: on a memory benchmark, every model they ran it on did significantly better with a focused prompt of around 300 tokens than with the full history of about 113,000.
So if you paste a hundred-page PDF to get one answer about button labels, the one paragraph that matters ends up somewhere in the middle of a lot of text the model is half reading.

More information can make it worse. Borges has a one-paragraph story about an empire whose cartographers drew a map at 1:1, as big as the country itself. Perfectly complete and perfectly useless. Pasting everything into a chat is drawing that map and then asking the model to find one street on it.

Uploads stay where you left them. Your files don't vanish, but they don't follow you around either. A file dropped into one chat lives with that chat unless you put it in a project or pull it back in from a library. Big projects get searched in pieces rather than read whole. And when a long chat fills up, some apps now quietly summarize the early part so the conversation can keep going. Every new chat starts with whatever you've set up for it, and often that's nothing.
Memory features remember what the model decided to remember. The big chat apps all have some form of memory now, and it's useful. It's also a summary you didn't write, of things the model judged important, in words you didn't choose. For your phone number, fine. For the reasoning behind a design system, I want the source.
There's a name for doing this properly now: context engineering, a term Tobi Lütke and Andrej Karpathy popularized in June 2025. A few months later Anthropic's engineering team wrote the guide a lot of people now point to. It treats context as a finite resource with diminishing returns, and sets the goal as finding "the smallest possible set of high-signal tokens" that gets you the result you want.
Smallest. That's the word I'd underline. One of the practices the post recommends is an agent keeping its own structured notes file. Which is a long way of saying: write things down.
What a personal knowledge base is
The idea is old. Much older than AI. In the 1940s an advertising man named James Webb Young told people to write each fact on its own index card, sort the cards into sections, and then turn the material over in their heads until it started to mean something. An idea, in his famous phrase, is a new combination of old elements, and nobody can combine what they never organized. Game studios have an old joke on the same theme: nobody reads the design document, they just weigh it, and a lot of teams moved to wikis of small linked pages. A whole PDF pasted into a chat fails for the same reason.
That's all a personal knowledge base for AI is: a folder of small markdown files, a box of index cards that a model can read.

Here's how to build one.
Write the rules down once, with the reason attached
Start with a short file about how you work: your voice, your rules and the things you never do.
There's a nice precedent for this in art. Sol LeWitt's wall drawings are written instructions, a few plain sentences, that other people carry out, again and again, in different rooms. He wrote in 1967 that "the idea becomes a machine that makes the art." A rules file works the same way. You write the idea once, carefully, and it gets carried out in every chat that reads it.
Music producers have the same thing in the template project: the same buses, the same sends, the same limiter on the master, so every new track starts where the last one left off. A rules file is that template, for words.
The part that gets skipped is the reason. Every rule should carry a line explaining why it exists. A rule without a reason gets applied in the wrong place, by people and by models. "Use metric units" is a rule. "Use metric units, because most of the world measures in them" is a rule the model can apply with judgment to a situation nobody thought of.
The shape is simple. A made-up example, kept generic:
# How I write
- Short sentences first, longer ones to explain.
Why: people skim on phones, and the first line has to land on its own.
- Plain words. No jargon.
Why: most readers aren't specialists, and they stop at the first word they don't know.
- Every claim gets a source, or it gets cut.
Why: one unsupported claim makes every supported one look shaky.Know who wrote each note
A library fills up with notes from different hands. Some you wrote yourself. Some are quoted or adapted from a published source. Some were written by a model, a summary asked for once and saved. Give it a few months and they all look alike in a folder, and a model's summary can sound every bit as authoritative as the original.
So mark every note with who wrote it: you, a published source or a model. Keep the source next to it, with enough detail to find the original again. Model-written notes are fine for finding your way around. Anything you quote comes from the source itself. A note is a route. The source is the source.
Check every quote against the published source before it goes anywhere near a page. Every quote in this post went through that check. It's slower. It's also the only version of this I'd trust.
Organize your notes by skill
Pick the skills your work leans on, say writing, research, interaction design or pricing, and give each one its own small set of notes.
Facts about a single project only help on that project. Judgment about a skill works more like a senior colleague. A good note on interaction design tells the model why a confirmation screen carries more weight than the five screens before it, and that holds on every project you'll ever start.
Refine what you gather
Filling a folder with what you read and watch is the easy part, though even that takes the discipline Webb Young describes.
The craft is what happens next. A raw note is a first draft. The principle you pull out of it is the second. The one-page principle that survives three projects is the one worth keeping. Facts go stale. Principles get better every time you rewrite them.
Layer one library over another
This is my favourite part.
Once there's more than one library, the output of one can be run past another. Draft a piece of interface copy with one, then check it against another before it ships. That second pass is a hunt for problems: a line that sounds pushy, a promise the product can't keep, a choice that's harder than it looks. Run it before the draft goes anywhere, while changing it is still cheap. Copy that has survived a second library is copy I'm comfortable putting my name to.

A classic series of 1980s studies found that one analogy from a completely different field tripled the share of people who solved a hard problem. That's the effect I'm after. A psychology library checking design copy. A game design library checking an onboarding flow. The collisions are where the good stuff turns up.
Keep the library current
Every model has a training cutoff. There's always a gap between what it knows and what's true today, and that gap is often where the useful information lives. A library you own is a library you can feed, with new research, lessons from things that went wrong and principles that finally clicked.
That compounds. Over time the library holds what you've learned works, what you've learned doesn't and the questions you're still working on. The model underneath will probably be replaced within a year. The library carries over.
Keep confidential information out
Last, and the one I'd never skip. No client names. No confidential documents. No private conversations. The files hold your own judgment and nothing anyone told you in confidence.
That's the right call on its own, and it makes the library better too. A principle in your own words is useful on every project. Someone else's details are useful on one, and a liability everywhere else.
It also makes the library portable, and safe to use with any tool. Nothing in it belongs to anyone else, so you can switch to a better model the day one comes out or hand a file to a colleague.
If a note needs someone else's details to make sense, it stays out.
The limits of a personal knowledge base
Two things, because I'd be overselling otherwise.
First, this takes work. Building and refining the files takes real time, and in the first weeks it can be slower than typing the speech again.
Second, the library doesn't do the thinking. Near the end of Moonwalking with Einstein, Joshua Foer writes that no lasting joke, invention, insight or work of art was ever produced by an external memory, and then adds: "Not yet, at least." I like that he hedged. The files make sure the model starts from what you know. What gets made from there is still on you.
Where to start this week
- Write one file about how you work. Voice, rules, never-dos, each with its reason. One page.
- Pick one skill you lean on and start a library for it. Small notes, one idea each, in your own words, with the source next to them.
- Mark who wrote each note. You, a published source or a model. Check every quote against the source.
- Point the model at the files. Ask for the few that matter to the question in front of you, and leave the rest on disk.
- Keep it clean. Your own judgment goes in. Anything someone told you in confidence stays out.
The colleague will still forget everything the moment they leave the room. Now there's a note on the door.
Sources
- Nelson F. Liu and colleagues, "Lost in the Middle: How Language Models Use Long Contexts," Transactions of the ACL, 2024 (first posted 2023).
- Kelly Hong, Anton Troynikov and Jeff Huber, "Context Rot: How Increasing Input Tokens Impacts LLM Performance," Chroma, July 14, 2025.
- Anthropic, "Effective context engineering for AI agents," September 29, 2025.
- Tobi Lütke, post on X, June 18, 2025. Andrej Karpathy, post on X, June 25, 2025. Both collected by Simon Willison, June 27, 2025.
- OpenAI Help Center, "Using Library to manage files in ChatGPT" and "Chat and file retention in ChatGPT." Claude Help Center, articles on file uploads, projects and memory.
- Sol LeWitt, "Paragraphs on Conceptual Art," Artforum, 1967.