Knowledge Base Search
Empower your AI Agent to answer questions using your own internal content (wikis, SOPs, FAQs, product docs, support tickets, etc.). The Knowledge Base Search tool retrieves the most relevant document chunks, trims them to a token budget, and returns clean, ready‑to‑use context for reasoning and response generation.
Assign Knowledge Base to AI Agents vs Knowledge Base Search Tool
Knowledge Bases are standalone resources that can be assigned to multiple AI Agents. They contain ingested documents and their vector embeddings.
If you want to do a typical RAG system, it'd be enough to just assign a Knowledge Base to an AI Agent. The assistant can then use it for retrieval-augmented generation (RAG) and use that context to answer questions, find relevant documents / web pages, etc.
The Knowledge Base Search tool can be used to give the AI Agent ability to do a multi-step queries inside your knowledge base in an autonomous way. Your AI Agent can be instructed to try 10 different search queries inside your knowledge base until it finds the answer to a question. It will use the tool 10 times, each time with a different query. The tool will return the most relevant chunks for each query and the AI Agent can then use that context to generate a final answer.
Typical Use Cases
- Internal Q&A ("How do we onboard an enterprise customer?")
- Customer support deflection / macro drafting
- Sales engineering (feature / limitation clarification)
- Compliance & policy lookup
- Product documentation explanation & troubleshooting
- The tool helps with queries like: "Find my previous written blog posts relevant to AI Agents, make 5 different searches to understand and match my previous articles, use web search tool to gather additional information and create me a new blog post about
10 ways to improve your AI Agent, use the previous content to enhance the new blog and also add internal links."
Prerequisites
- A populated Knowledge Base (ingested & processed).
- An AI Agent with this tool enabled.
Configuration Fields
These map directly to the tool's runtime behavior.
| Field | Required | Description | Tips |
|---|---|---|---|
| Tool Name | Yes | The name of the tool the AI Agent will see and decide to call when it needs. | Use a short name for what your knowledge base contains: Previous Blog Posts Database |
| How the agent should use this tool? | Yes | Here you have to provide guidance for the AI Agent about when it should use this tool. | Be direct and describe what's inside your knowledge base: Use this tool when you want to search relevant information or blog posts I published on my website. It contains all of my previously written articles. |
| Input Parameter Name | Yes | Name of the single input parameter the agent will send (e.g. query, question). Must be a valid identifier. | Keep it simple: query is a safe default. |
| Input Parameter Description | Yes | Guidance for the AI about what to place in this input. | Be explicit: "Precise natural language question about internal policies." |
| Knowledge Base | Yes | The target knowledge base to search. | Make separate tools for different KBs (e.g. Policies vs Product Docs). |
| Max Chunks to Fetch | Yes | Hard cap of chunks returned after retrieval & reduction. | 6–12 is a good starting range. |
| Max Tokens to Keep | Yes | Global token ceiling across ALL returned chunks. Least relevant tail chunks are removed until under limit. | Tune to balance cost vs answer richness (e.g. 4000–6000). |
Adding the Tool
- Go to your AI Agent dashboard → Tools.
- Locate "Knowledge Base Search" → Configure.
- Fill in the configuration fields described above.
- Save.
- (Optional) Test by issuing a question in the built‑in test runner.
Example Configuration
- Input Parameter Name:
query - Input Parameter Description: "Natural language question about internal onboarding process."
- Knowledge Base:
Prod Onboarding Policies - Max Chunks to Fetch:
8 - Max Tokens to Keep:
5000
Example User Prompt: "What steps do we follow to provision SSO for a new enterprise customer?"
Returned Chunks: Policy excerpt, internal runbook section, checklist snippet, escalation notes, etc.
Best Practices
- Create multiple scoped tools if your corpus mixes very different domains ("HR Policies Search", "Product Architecture Search").
- Keep chunk size during ingestion reasonably small (300–800 tokens) to maximize recombination flexibility.
- Periodically re-index after large structural doc changes.
- Prefer neutral, specific questions. Model heuristics perform better with clarity.
- If answers feel shallow, raise Max Tokens to Keep before increasing Max Chunks to Fetch.
Monitoring Quality
| Symptom | Likely Cause | Adjustment |
|---|---|---|
| Irrelevant chunks | KB too broad or noisy | Split KB or tighten ingestion filters |
| Missing obvious info | Max Chunks too low | Increase from e.g. 6 → 10 |
| Truncated context | Token budget too small | Raise Max Tokens (e.g. 4000 → 6000) |
| Repetition across chunks | Redundant source docs | De-duplicate or consolidate sources |
Security & Governance
- Retrieval is read-only; it never mutates KB content.
- Access is constrained by the Knowledge Base (enforce RBAC upstream).
- Sensitive data: ensure only appropriate documents are ingested—retrieval will surface anything indexed.
FAQ
Q: Does it summarize the documents automatically?
A: No. It returns raw (cleaned) chunks so the AI Agent can cite or reason over them.
Q: How are tokens counted?
A: After formatting, each chunk's token count is computed with the platform's default model tokenizer and accumulated until the limit is reached.
Q: Can I force specific documents to always appear?
A: Not directly. Embed & structure content so key guidance is highly relevant to diverse phrasings.
Q: What happens if fewer documents than requested are relevant?
A: Only the available relevant chunks are returned; the tool will not pad with low-quality noise.
Q: Can I target multiple Knowledge Bases in one query?
A: Create separate tools per KB and let the agent decide which to call.
Troubleshooting
| Issue | Check | Fix |
|---|---|---|
| Empty result set | Wrong Knowledge Base | Verify KB / re-select KB |
| High token usage | Large chunks | Re-chunk at smaller sizes |
| Slow responses | Too many chunks fetched | Lower Max Chunks / reduce KB size |
Change Log (Initial Version)
- Retrieval Strategy: Multi-query + Re-rank
- Post-processing: Formatting + token-budget trimming
- Output: Plain concatenated chunk contents separated by blank lines
Need more? Reach out to support with a sample question, expected answer, and current configuration for targeted tuning.