Ensemble Docs

Knowledge Bases

Index your documents so an agent can answer from them, with citations, instead of from the model's training data.

A knowledge base is a collection of documents, split into chunks and indexed by meaning. Ask it a question and it returns the passages closest to that question, each with a confidence score and the document it came from.

Use one when an agent needs to answer from material you control: a policy handbook, a product catalogue, last quarter's contracts, an internal runbook. The agent quotes your documents rather than guessing from what the model happens to remember.

How a question becomes an answer

Retrieval is a similarity comparison, not a keyword search. "What is our refund window?" finds a paragraph that says "purchases may be returned within 30 days" without either phrase sharing a word with the other. That is the whole point, and it is also the main thing to keep in mind when results surprise you: the index matches meaning, so a document that merely mentions a topic in passing can score close to one that is about it.

Where the pieces live

Two places, which matters when you are debugging or moving a tenant:

WhatWhere
The knowledge base itself: name, configuration, the list of its documentsPlatform database
The uploaded filesObject storage
The chunks and their vectorsA knowledge schema in your tenant's own database

The knowledge schema has to exist before anything can be indexed. A new tenant needs it provisioned once, which the knowledge base screen offers and POST /api/knowledge-bases/initialize performs. Until then, uploads have nowhere to put their chunks.

Two ways an agent reaches one

A RAG tool

A tool bound to one knowledge base. The agent decides when to search, and the search is a tool call you can see in the trace.

Attached to the agent

Bound directly to an agent version, optionally behind an expression so it only applies to some conversations.

The tool is the one to reach for first. It is explicit, it shows up in the agent's trace like any other call, and you can test it on its own. Attaching a knowledge base to an agent is for when retrieval should always be available without the agent choosing.

Where to go next

On this page