When your agent has a knowledge base linked, it searches the KB before generating every response. This page explains what that search looks like, how the agent cites what it finds, and how users can explore the sources behind any answer.Documentation Index
Fetch the complete documentation index at: https://docs.brainstormer.io/llms.txt
Use this file to discover all available pages before exploring further.
Retrieval flow
- A user sends a message.
- Brainstormer searches your linked knowledge base(s) for passages that are semantically similar to the question.
- The most relevant passages are included in the agent’s context alongside the conversation history.
- The agent generates a response that draws on both its training and the retrieved passages.
- The response is returned with numbered citations and a list of sources.
The knowledge base search uses semantic similarity, not keyword matching. This means paraphrased or loosely worded questions still find relevant content — the agent is matching on meaning, not exact words.
Citations
When the agent references information from the knowledge base, it includes numbered citations inline — for example:Based on our setup guide [1], you’ll need to configure the environment variables before starting the service [2].Each citation number corresponds to a specific passage that was retrieved from the KB. Citations only appear when the agent actually found and used KB content — the agent does not fabricate source references.
Citation tooltips
Hovering over a citation number opens a tooltip that shows:- Knowledge base name — which KB the passage came from
- Source document — the file name or URL of the source
- Relevance score — a 0–100% score indicating how closely the passage matched the question
- Chunk text — the exact passage the agent retrieved
Sources panel
Every response that includes citations has a Sources button. Clicking it opens a slide-in panel on the right side of the chat showing all sources retrieved for that response. The sources panel groups results by knowledge base, so if your agent has multiple KBs linked, you can see at a glance which KB each source came from. Each source card shows:- The source document name or URL
- A relevance score bar — color-coded to indicate how strong the match was
- The full chunk text (expandable)
What the agent cites
The agent only cites passages it actually retrieved and used. It will not:- Invent citation numbers that don’t correspond to real retrieved passages
- Cite a source it didn’t retrieve in the current query
- Mix up citation numbers across different retrieved passages