Module · Knowledge
Create a Knowledge Base
Lesson 4 of 6 · 6 min
Every agent so far has been answering out of a model's general knowledge. That is fine for writing a sentence and useless for “what is our returns window”, because the model has never seen your policy and will confidently make one up.
A Knowledge Base fixes that. It is a small library your workflows and agents can read from: your products, your prices, your policies, your procedures. Put a document in and the answers stop being generic.
Two things decide whether it works, and neither is obvious. The description you write when you create it, and what happens to your document after you paste it in.
Creating one is two fields
A name and a description. The name is a label your team picks from a list. The description does something else entirely.
The description is read by the AI, not by your colleagues. When an agent has more than one Knowledge Base available, the description is handed to the model as part of what it knows about that tool — name, id and your sentence, verbatim. It is on that sentence that the model decides whether to search here or somewhere else.
So write it as an instruction to a new employee about when to look in this library, not as a title:
- Weak:
Company docs— the model learns nothing it did not already have from the name. - Better:
Product specifications, pricing and returns policy for the storefront. Query this for anything a customer asks about what we sell or what happens after they buy.— now it knows what belongs here and what does not.
With one Knowledge Base this hardly matters. With four it is the difference between an agent that finds the answer and one that searches the wrong library and reports that there is nothing.
What happens to your document
Adding content is also two fields — a title and the text, pasted or uploaded. What happens next is the part worth understanding, because it explains every retrieval problem you will ever have.
Your document is not stored as a document. It is cut into chunks — overlapping pieces of about a thousand characters, each carrying two hundred characters of the piece before it. Every chunk is stored separately and searched separately.
| Setting | Default | Why it is that |
|---|---|---|
| Big enough to hold a complete thought, small enough that retrieving one does not drown the model in unrelated text. | ||
| So a sentence that straddles a boundary is complete in at least one chunk. Without it, the answer to a question could be split in half and found by neither search. |
- Default
- Why it is that
- Big enough to hold a complete thought, small enough that retrieving one does not drown the model in unrelated text.
- Default
- Why it is that
- So a sentence that straddles a boundary is complete in at least one chunk. Without it, the answer to a question could be split in half and found by neither search.
A worked number, measured rather than estimated: a 1,359-character policy document — four short sections covering returns, warranty, damaged deliveries and cancellations — becomes two chunks. Asking that Knowledge Base “how long do refunds take” returns the chunk containing the refund sentence, not the whole document.
That is the entire mechanism. Your agent does not read your library. It searches for the most relevant chunk and reads that. Which means the quality of your answers is decided by whether the answer to a likely question sits together, in one piece, somewhere in your text.
Writing for chunks
Once you know retrieval works on thousand-character pieces, how you write changes. Four habits do most of the work:
- Keep an answer together. If the returns window is stated in one paragraph and the exceptions are three pages later, a search for “can I return this” finds one of them. Put the exception next to the rule.
- Repeat the subject. A chunk that begins “It must be returned within 14 days” is useless out of context — nothing in it says what “it” is. Write “Opened items may be returned within 14 days”. Every paragraph should make sense read alone, because that is how it will be read.
- Use headings. They survive chunking and give the model a label for what it is looking at.
- One topic per document. Four small documents retrieve better than one long one, and they are far easier to keep current.
What breaks
Content that is already messy stays messy. Pasting content in stores it as-is — no cleaning, no restructuring, and no AI cost. That is exactly what you want for text you have already written well, and exactly wrong for a PDF full of tables or a scraped web page, where the structure is lost and the chunks come out as fragments. That is what the next lesson is for.
A stale Knowledge Base is worse than an empty one. An agent with no source says it does not know. An agent with last year's prices answers confidently and wrongly, and nobody finds out until a customer does. Whoever owns the policy has to own the document, and that is an organisational decision more than a technical one.
Retrieval finds the closest chunk, not the correct one. There is always a nearest match. Ask about something the library does not cover and you get whatever is least unrelated, with no signal that it is wrong. This is why the agent's prompt must say what to do when the search comes back thin — “if the knowledge base does not answer the question, say so” is a line every agent with a Knowledge Base needs.
Everything in it is readable by anything that can search it. A Knowledge Base has no per-document permissions in the way a folder does. Internal margins, supplier terms and staff details do not belong in the same library a customer-facing agent can reach. Separate libraries are the boundary.
Try it
- Create one and write the description as two sentences about when to search it. Read it back and ask whether a new employee could route a question with it.
- Paste in a policy you already have — something between one and two thousand characters. Note the chunk count on the document row.
- Now paste in something twice as long and watch the count roughly double. That relationship is the whole storage model.
- Search it for something you know is in there and read the chunk that comes back rather than the answer. That fragment is exactly what your agent will see.
- Then search for something that is definitely not in there. Something still comes back — that is the failure mode to design your agent's prompt around.
Next: Creating a Knowledge Base with AI — the other way in, for the content that is not already clean.

