Docs · 08
Knowledge bases
Create a knowledge base, index documents, test retrieval, and understand how hybrid retrieval works inside a run.
Knowledge bases live at the organisation level under Knowledge and can be attached to any agent.
Creating a knowledge base
- Knowledge → New knowledge base. Name and description.
- Add documents. Text documents with their content. Each document has a source type and a status.
- Create an index. An index chunks the documents (chunk size from 200 to 8,000 characters, with overlap) and embeds each chunk with the chosen embedding provider. Re-index after editing documents.
- Test retrieval. The retrieval test runs a query against the knowledge base and shows the matching chunks with scores, so you can tune chunk size and thresholds before attaching it to an agent.
How retrieval works in a run
The knowledge retrieval node embeds the query (by default the latest user message), runs keyword and vector search, fuses the results (reciprocal rank fusion), optionally reranks them, drops results under the minimum score, and keeps the top k within the token caps. Selected chunks enter the prompt as "Relevant knowledge" with scores and, when enabled, citations. Every retrieval is logged with the candidates, the selected chunks, what was trimmed and why.
Tips
- Write documents in self-contained sections with clear headings; the heading travels with each chunk.
- Prefer several focused documents over one very long one when topics differ.
- Use the retrieval test with real user questions and adjust top k and minimum score.
- If a chunk is edited later, run logs still show what the model saw at the time.