Using Knowledge Base in flows
An AI agent in a flow can query KB files to base its responses on your specific content, rather than relying solely on the model's general knowledge.
Steps
- 1In the Agent tool, enable the «Use Knowledge Base» option.
- 2When the agent receives a question, it first searches semantically through KB files.
- 3If relevant information is found, it's included as context in the prompt before generating the response.
- 4If nothing relevant is found, it responds using the model's knowledge per the system prompt.
Reference
- Semantic search
- The agent doesn't search for exact words — it searches for meaning. «product X cost» will find chunks about price even if they don't use the word «cost».
- Top-K chunks
- The system retrieves the K most relevant chunks (configurable). Default: 3.
- Citation
- The agent can cite the source if the system prompt instructs it to do so.
- Scope
- The KB is shared by all agents in the account. There is no per-flow KB.
Common errors
- Agent responds with incorrect information
- Verify the KB file is up to date and the relevant chunk is correctly indexed.
- Generic responses despite KB
- Increase Top-K or refine the system prompt so the agent prioritizes KB over general knowledge.
Next step
Learn about the consumption and billing model.