Skip to main content

What Are Knowledge Bases?

Knowledge bases are collections of information that your AI agents can access during conversations. Instead of hardcoding everything in instructions, you can upload documents, scrape websites, or provide structured data that the AI references automatically.

Automatic Context

Relevant information is automatically injected into conversations. No manual retrieval needed.

Multiple Sources

Upload PDFs, scrape websites, or provide structured data. Mix and match sources.

Always Up-to-Date

Update knowledge bases anytime. Changes are immediately available to your agents.

Scalable

Handle large document sets. TopCalls automatically manages indexing and retrieval.

How Knowledge Bases Work

1

1. Create Knowledge Base

Upload documents, scrape websites, or provide text through the TopCalls dashboard. The content is indexed automatically.
2

2. Attach to Calls

When making a call, include knowledge_base_ids in the request to give the agent access to specific knowledge bases.
3

3. Automatic Retrieval

During the conversation, TopCalls automatically retrieves relevant information based on what the caller is asking about.
4

4. Context Injection

Relevant context is injected into the AI’s prompt, allowing it to answer questions accurately.

Creating Knowledge Bases

Knowledge bases are created and managed through the TopCalls dashboard. You can:
  • Upload files: PDFs, TXT, DOCX, or MD files
  • Scrape websites: Provide URLs to automatically extract content
  • Add text directly: Paste structured text like FAQs, product info, or support documentation

Using Knowledge Bases in Calls

Once created, attach knowledge bases when making API calls:
{
  "phone_number": "+14155551234",
  "task": "Answer customer questions about our products and services.",
  "knowledge_base_ids": ["kb_xyz789", "kb_abc123"]
}

Example: Customer Support Agent

Step 1: Create Knowledge Base

Through the dashboard, create a knowledge base with your support documentation:
Product Features:
- AI Voice Agents
- Campaign Management
- Custom Voices
- Function Calling

Common Issues:
- Call not connecting: Check phone number format (E.164)
- No audio: Verify microphone permissions
- Poor quality: Check internet connection

Step 2: Use in Calls

{
  "phone_number": "+14155551234",
  "instructions": "You are a customer support agent. Answer questions about our products and help troubleshoot issues. Use the knowledge base to provide accurate information.",
  "knowledge_base_ids": ["kb_support_123"]
}

Best Practices

Do This

  • Organize by topic: Create separate knowledge bases for different topics (products, pricing, support)
  • Keep it updated: Regularly update knowledge bases with new information
  • Use clear structure: Organize content with clear headers and sections
  • Test thoroughly: Test knowledge base retrieval with sample questions
  • Combine sources: Use multiple knowledge bases for comprehensive coverage

Avoid This

  • Too much information: Keep knowledge bases focused and relevant
  • Outdated content: Regularly review and update
  • Vague content: Use clear, specific information
  • Duplicate content: Avoid overlapping information across knowledge bases

Next Steps

Making Calls

Learn how to attach knowledge bases when making calls.

API Reference

See the complete API documentation.