Skip to content

Query Knowledge Base

Native tool that lets the agent run semantic search over one or more knowledge bases in your organization. When the agent needs specific information (product docs, FAQ, internal policies, manuals), it calls this tool and gets relevant excerpts to use in the response.

It’s the heart of the RAG (Retrieval-Augmented Generation) pattern in SquadOS.

  • Support that needs to answer based on manuals, product docs, or FAQ.
  • Internal agents that look up policies, procedures, or company rules.
  • Sales that needs to cite technical specs, prices, or product descriptions.
  • Any case where you want to reduce model hallucination by anchoring answers in controlled content.
  1. In the agent’s Tools tab, click + Add Tool.
  2. Under NATIVE TOOLS, pick Query Knowledge Base.
  3. Toggle the switch at the top of the form.
  4. Fill Description — explain to the AI when to use the search (e.g., “Use to look up product info, prices, and internal policies”).
  5. Check the knowledge bases this agent can query (one or many).
  6. Click Save and Close.

The description is the most important signal for the model to decide when to call the search. The more specific, the better — avoid “use whenever you need info”.

You need at least one knowledge base in the organization. If the list is empty, go to Knowledge Bases in the side menu and create one, adding documents, URLs, or free text. See Knowledge Bases.

The agent decides to call this tool when the user’s question matches the description you wrote. For example, with the description “looks up info about our products”, the agent calls the search when someone asks “how much is the Pro plan?”.

The return is a set of relevant excerpts (with similarity score). The agent then uses them to compose the answer — and can cite the source if you guide that in the prompt.

  • No base selected = useless tool. The tool shows as not configured (yellow) and the agent can’t use it.
  • Quality depends on content. Poorly organized, duplicated, or outdated documents produce bad answers. Curate the base.
  • Semantic search, not exact search. The agent finds excerpts by meaning, not by literal keyword. For cases needing exact match (product code, order number), consider a custom HTTP tool pointing to your database.
  • Prompt cost grows. Each returned excerpt enters the model’s context, consuming tokens. Very large bases can make every turn expensive.
  • Combine with AutoLearn. This second tool logs the questions the current base couldn’t answer, helping you evolve the content.