How-to guide
Knowledge base
Add documents your agent can look things up in, and test what it finds.
What you'll learn
How to add documents to your knowledge base, search them to see what an agent would find, and remove them. A flow reads from the knowledge base with the Knowledge step (Flow builder).
Add a document
- Open Knowledge base (under Build).
- Choose Add document.
- Enter a Title (such as "Refund policy"). Optionally add a Source URI, the page the text came from.
- Paste the text into Content.
- Optionally add Metadata (JSON), such as
{"category":"faq","language":"en"}. You can filter searches on it. - Save. The document appears in the table.
Search it
Use the search box on the same page: type a question, optionally add a metadata filter such as {"category":"faq"}, and search. You see the matching passages with a similarity score. Use this to check that the answer you expect is found before a caller asks.
Remove a document
Choose Delete on its row and confirm Delete document. Agents stop finding it.
Common problems
| Problem | Fix |
|---|---|
| The right passage does not come back | Split a long document by topic, and put the question's own words in the text. |
| A metadata filter returns nothing | The filter must match the metadata exactly, key and value. |