Knowledge Sources
Knowledge Bases
Give your agents private context with knowledge bases.
1.What is a knowledge base?
Knowledge bases let you give your agents private context. You create a knowledge base, tune how it retrieves information, and add documents to it. Any agent can then search it, and every answer comes with citations that point back to the source. Knowledge bases are used only in Agent mode.
A knowledge base is a collection of your own documents that an agent can search. Instead of answering only from general knowledge, the agent looks up the relevant passages in your documents and builds its answer from them.
What you can do
- Answer questions from private information. Use company policies, internal guides and project notes that are not available publicly.
- Get answers you can verify. Citations let you open the source and confirm the answer.
- Keep agents consistent. Every agent that uses the same knowledge base answers from the same documents.
- Support specialized tasks. An agent focused on one topic, such as HR questions or product support, can use a knowledge base built for that topic.
- Reuse one source across agents. Build the knowledge base once and select it wherever an agent needs it.
2.How to make a knowledge base
Creating a knowledge base takes three steps: Details, Retrieval and Chunking. Open Knowledge and choose to create a new knowledge base to begin.
Step 1: Details
The knowledge type is Vector. Your documents are turned into embeddings and searched by meaning.
Enter a name, for example "Product docs".
Optionally, add a description of what the knowledge base contains.
The vector store is Managed, which is built in.
Step 2: Retrieval
Choose how the knowledge base finds passages when an agent searches it.
| Method | What it does | Best for |
|---|---|---|
| Basic (Vector) | Semantic similarity search. The default. | General lookups |
| Hybrid | Blends semantic vectors with BM25 keyword scoring. | Cases where exact terms matter |
| MMR | Keeps results relevant but diverse, trimming near-duplicates. | Avoiding repetitive results |
| HyDE | Drafts a hypothetical answer and searches with it. | Open-ended questions |
Step 3: Chunking
Set the chunk size and overlap, then click Create knowledge base to finish. The next section explains what these settings do.
Use it with an agent
Add your documents (see the Documents tab below).
Select the knowledge base and choose Use this knowledge base.
Ask your question in Agent mode. The agent searches the knowledge base and answers with citations.
To answer without retrieval, choose None.
3.Understanding chunking
What is chunking?
An agent cannot search a whole document at once, so the knowledge base splits each document into smaller pieces called chunks. When an agent asks a question, the knowledge base finds the most relevant chunks and gives them to the agent. The chunk size and overlap settings decide how your documents are split, so they affect how well the right passage is found.
Chunk size
Chunk size is the length of each chunk, measured in characters. The default is 1200.
- Longer chunks keep more surrounding context in each passage. The agent gets fuller explanations, but each chunk covers several ideas, so a search can match less precisely.
- Shorter chunks cover one idea each, so searches match more precisely. But a short chunk may be missing the context needed to understand it.
Overlap
Overlap is the number of characters repeated between neighboring chunks. The default is 150. Without it, a sentence or fact that falls on the boundary between two chunks could be cut in half and become hard to find. Overlap carries the end of one chunk into the start of the next, so a fact on a boundary stays retrievable.
A larger overlap protects boundary facts better, but it repeats more text, so the knowledge base holds more chunks.
When to change the numbers
| Situation | Change |
|---|---|
| Answers are missing context or feel cut off | Increase chunk size |
| Documents are long and cover one idea over many paragraphs, such as guides or reports | Increase chunk size |
| Results are loosely related, or one chunk covers several topics | Decrease chunk size |
| Documents are short, factual entries, such as FAQs or glossaries | Decrease chunk size |
| An answer is split across two chunks, or a key sentence is cut in half | Increase overlap |
| You see many near-identical chunks, or more chunks than you expected | Decrease overlap |
Change one setting at a time. Then use the Chunks tab to see how your documents were split, and use Retrieval testing to check whether the right passages come back.
Note
Changes to chunk size and overlap apply only to documents added after you save. Documents already in the knowledge base keep their existing chunks.
4.Managing your knowledge base
Once your knowledge base is created, you can open it to see everything about it in one place. The top of the page shows its name, retrieval method, chunk settings, and the number of chunks and documents it contains. Under that, five tabs let you work with it: Documents, Chunks, Retrieval testing, Used by and Settings. To go back to your list of knowledge bases, click the arrow at the top left.
Documents
Use this tab to add content and see what is already in the knowledge base.
Add content
- Paste text: enter a source name (for example "handbook.md"), paste the text, and click Add to knowledge base.
- Upload file: upload a document from your computer.
- Website URL: add content from a web page.
Replace existing chunks
When you paste text, you can tick Replace existing chunks for that source name. This updates a source you added earlier instead of adding a duplicate.
See your documents
The Documents list shows each document's name, its status and its number of chunks. A status of Available means the document is ready for agents to search. To remove a document, click the trash icon on its row.
Chunks
The Chunks tab lists every piece your documents were split into. The heading shows the total, for example "Indexed chunks: 59". Each chunk shows the document it came from with its chunk number, the text of the chunk, and the embedding model and vector size used to index it. Use this tab to check that your documents were split the way you expected.
Retrieval testing
Retrieval testing lets you try a search before an agent uses the knowledge base.
Enter a question or a short sentence in Source text. It can be up to 200 characters.
Choose a retrieval method from the dropdown. It starts on the method the knowledge base uses, so you can compare methods.
Click Test.
The results appear on the right. Use this to check that the right passages come back, and to compare methods before changing your settings.
Used by
Used by lists the agents that read from this knowledge base, shown as "Agents referencing this KB" with a count. It also shows how each agent is classified. This helps you answer data-provenance questions, such as "This knowledge base holds sensitive data. Who uses it?"
If no agent uses it yet, the tab shows "No agent currently references this knowledge base."
Settings
Settings lets you edit the knowledge base after creating it.
- Name and Description: change how the knowledge base is labeled.
- Retrieval method: switch between Basic (Vector), Hybrid, MMR and HyDE. This takes effect immediately.
- Chunk size and Overlap: adjust how documents are split. These apply only to documents added after you save.
Click Save changes to apply your edits.
5.Deleting a knowledge base
You can delete a knowledge base in two ways:
- Click the trash icon at the top right of the knowledge base page.
- Click Delete at the bottom of the Settings tab.
Either way, a confirmation appears:
Delete [name] and all its chunks? Any agent that references it will lose retrieval. This can't be undone.
Deleting removes the knowledge base and all its chunks. Agents that use it can no longer retrieve from it, and you can't get it back. Check the Used by tab first to see which agents will be affected. To remove a single document instead, click the trash icon on its row in the Documents tab.
6.Tips for good results
- Keep each knowledge base focused on one topic or team.
- Use clear, up-to-date documents with descriptive titles.
- Check the citations in an answer to confirm the source says what the agent claims.
- Use Retrieval testing to compare methods before an agent relies on the knowledge base.
- If answers miss relevant information, adjust the retrieval settings or add the missing document.