Chanl

Knowledge Base

Upload docs, FAQs, and policies — your agents search them during conversations instead of hallucinating

Knowledge Base

Your agent gets asked about your refund policy. Without a knowledge base, it guesses — and guesses wrong. With one, it pulls the exact paragraph from your actual policy document and quotes it verbatim.

Chanl's knowledge base is a fully managed RAG pipeline. You upload documents, Chanl chunks them, generates embeddings, and stores them for semantic search. During conversations, your agent calls kb_search via MCP and gets relevant passages in milliseconds.

Building a RAG pipeline from scratch — chunking, embedding, vector storage, retrieval, reranking — is typically a 4-8 week project. Chanl does it in minutes.

How It Works

You Upload Chanl Processes Agent Searches PDFs Web Pages Text/FAQ Chunking Embeddings Vector Index kb_search Relevant Passages

Quick Start

Go to Build → Knowledge Base in the dashboard. Click Add Entry and choose your source:

  • Text — paste FAQ answers, policy snippets, product descriptions
  • URL — point to a help article or web page (Chanl crawls and indexes it)
  • File — upload a PDF, DOCX, or text file

Click Add Entry → File Upload, drag your PDF, and click Upload. Chanl starts processing immediately — you'll see a progress indicator.

curl -X POST "https://api.chanl.ai/api/v1/knowledge" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "text",
    "title": "Refund Policy",
    "content": "Refunds are available within 30 days of purchase. Items must be unused and in original packaging.",
    "folder": "policies"
  }'
const entry = await fetch('https://api.chanl.ai/api/v1/knowledge', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    source: 'text',
    title: 'Refund Policy',
    content: 'Refunds are available within 30 days of purchase...',
    folder: 'policies',
  }),
});
response = requests.post(
    'https://api.chanl.ai/api/v1/knowledge',
    headers={'Authorization': f'Bearer {access_token}'},
    json={
        'source': 'text',
        'title': 'Refund Policy',
        'content': 'Refunds are available within 30 days of purchase...',
        'folder': 'policies',
    },
)

Text entries are indexed immediately. URLs and files are processed asynchronously — Chanl returns a taskId you can poll:

curl "https://api.chanl.ai/api/v1/knowledge/tasks/<taskId>" \
  -H "Authorization: Bearer <access_token>"

Processing includes: content extraction → chunking → embedding generation → vector indexing. Most documents finish in under a minute.

Once indexed, your agent can search the knowledge base via MCP (kb_search) or the REST API:

curl -X POST "https://api.chanl.ai/api/v1/knowledge/search" \
  -H "Authorization: Bearer <access_token>" \
  -H "Content-Type: application/json" \
  -d '{"query": "what is the refund policy?", "limit": 5}'

The response includes matching passages ranked by relevance, with source attribution.

Source Types

SourceInputProcessingBest For
textcontent fieldSync (immediate)FAQ entries, policies, short content
urlurl fieldAsync (returns taskId)Web pages, help articles
fileMultipart uploadAsync (returns taskId)PDFs, DOCX, manuals

Organizing with Folders

Group related entries into folders. Your product docs go in products/, policies in policies/, FAQs in faq/. Folders make it easier to manage large knowledge bases and let you scope searches to specific content.

# Create entries in a folder
curl -X POST "https://api.chanl.ai/api/v1/knowledge" \
  -H "Authorization: Bearer <access_token>" \
  -d '{"source": "text", "title": "Shipping FAQ", "content": "...", "folder": "faq"}'

# Search within a folder
curl -X POST "https://api.chanl.ai/api/v1/knowledge/search" \
  -H "Authorization: Bearer <access_token>" \
  -d '{"query": "shipping times", "folder": "faq"}'

MCP Integration

When your agent is connected via MCP, it automatically gets kb_search as a tool. During a conversation, the agent calls it like any other tool:

{
  "name": "kb_search",
  "arguments": {
    "query": "what's the return window for electronics?",
    "limit": 3
  }
}

The agent receives relevant passages and uses them to answer the caller's question — grounded information instead of hallucinations.

You don't need to configure anything extra for MCP. Once you upload documents, they're automatically available to any agent connected to your workspace's MCP endpoint.

Keeping Content Fresh

Knowledge bases go stale. Your refund policy changes, your pricing updates, your product specs evolve. Two ways to stay current:

URL Sync — For web-sourced entries, re-crawl and re-index:

curl -X POST "https://api.chanl.ai/api/v1/knowledge/<id>/sync" \
  -H "Authorization: Bearer <access_token>"

Manual Update — For text entries, update the content directly:

curl -X PATCH "https://api.chanl.ai/api/v1/knowledge/<id>" \
  -H "Authorization: Bearer <access_token>" \
  -d '{"content": "Updated refund policy: 60-day window for all purchases."}'

Troubleshooting

What's Next

Memory

Give agents persistent memory — they remember customers across conversations

Tools

Create custom functions agents can call during conversations

Search API

Full API reference for knowledge search

Create Entry API

Full API reference for creating knowledge entries

On this page