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

  1. Open Knowledge base (under Build).
  2. Choose Add document.
  3. Enter a Title (such as "Refund policy"). Optionally add a Source URI, the page the text came from.
  4. Paste the text into Content.
  5. Optionally add Metadata (JSON), such as {"category":"faq","language":"en"}. You can filter searches on it.
  6. 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

ProblemFix
The right passage does not come backSplit a long document by topic, and put the question's own words in the text.
A metadata filter returns nothingThe filter must match the metadata exactly, key and value.

Next steps

On this page