Knowledge Base
Give agents access to your documents through retrieval-augmented generation (RAG).
What is a Knowledge Base?
A knowledge base is a collection of documents indexed for semantic search. Chocolate Factory creates each knowledge base with an Amazon Bedrock knowledge base and an S3 data source, so uploaded files are automatically stored, indexed, and made available for retrieval.
Knowledge bases let agents search your organization’s documents and answer questions using retrieval-augmented generation (RAG).
When an agent is connected to a knowledge base, it can search indexed documents during a conversation and use the results to produce grounded answers. Retrieved sources may appear as citations below the agent’s response.
When to Use Knowledge Bases
Use knowledge bases when you want agents to answer questions from your own documents:
- Policies and procedures → HR handbooks, compliance guides, or internal operating procedures.
- Product and technical documentation → user guides, API references, or release notes.
- Reports and reference material → research papers, regulatory circulars, or training content.
- Project-specific context → documentation scoped to a team or initiative.
For live structured data in databases, use Database connectors instead. For external APIs and third-party services, use MCP servers.
Tips for Effective Prompts
To get the best results from knowledge base search, be clear about what you are looking for:
- Name the topic or document type → “What does our remote work policy say about equipment allowances?” instead of “tell me about remote work.”
- Ask for citations → “Cite the specific section” or “Include the document name and date” when accuracy matters.
- Scope your question → reference a time period, product version, or department if the knowledge base covers multiple areas.
- Use the knowledge base description → when creating a KB, write agent instructions that describe its contents and retrieval rules. Agents use this context when searching.
When an agent searches a knowledge base, you will see a Knowledge base search indicator in the chat. Citations may appear below the response showing which documents were referenced. Expand them to review the source material.
See Chat with Agents for more guidance on reviewing tool activity and citations.
Ready to create your first knowledge base? See Setup & Configuration.