A knowledge base is a set of sources (web pages, files and text) that Tried splits into chunks and indexes. On every caller turn, the agent searches its linked knowledge bases and adds the best matching chunks to the prompt, so it can answer questions about prices, policies or products without all of it living in the prompt.
Create a knowledge base#
- Open Knowledge Base and select Add knowledge base.
- Enter a Knowledge Base Name (up to 40 characters).
- Add sources with Add web pages, Crawl a site, Upload files or Add text.
- Save. The status shows
in_progresswhile sources are fetched, chunked and embedded, thencomplete. - In the agent, open Knowledge Base in the settings panel and add it.
Sources#
| Source | How to add | Notes |
|---|---|---|
| Web pages | Add web pages | Paste URLs. HTML is converted to text. |
| Whole site | Crawl a site | Find pages reads the site's sitemap.xml, or follows same-site links when there is none. Pick the pages to add. |
| Files | Upload files | .pdf, .docx, .xlsx, .xls, .pptx, .txt, .md, .csv, .html. Spreadsheets are read sheet by sheet; slides are read slide by slide. |
| Text | Add text | A title and content, for example "Opening hours". |
| Synced folders | Synced sources | A Google Drive folder, OneDrive folder or Notion page kept in sync. |
Images can also be uploaded through the API. Their text is read with OCR when the platform has tesseract installed; otherwise the file is listed with a placeholder.
Limits#
| Limit | Value |
|---|---|
| Files per knowledge base | 25 |
| File size | 50 MB |
| URLs per knowledge base | 500 |
| Text snippets per knowledge base | 50 |
Documents from synced folders do not count toward these limits.
Chunking#
Each source is split into overlapping chunks before it is embedded. Set both under Chunking when you create the knowledge base:
| Setting | Field | Range | Default |
|---|---|---|---|
| Chunk size (characters) | chunk_size |
200 to 4,000 | 800 |
| Overlap (characters) | chunk_overlap |
0 to 1,000, smaller than chunk size | 100 |
Smaller chunks are more precise; larger chunks keep more context around each answer. Text is split on paragraph and sentence boundaries where possible.
Embeddings use OpenAI text-embedding-3-small. Without an OpenAI key, a local hash embedding is used so knowledge bases still work in mock mode, with lower match quality.
Keep sources fresh#
Auto-refresh web pages#
Auto-refresh web pages (enable_auto_refresh) re-fetches every URL source once every 24 hours and re-indexes it. Refresh now in the More actions menu runs it immediately (Refresh knowledge base).
Auto add future pages (on a crawled site) adds pages that newly appear in the sitemap on each refresh.
Synced sources#
Synced sources keeps a folder in sync with the knowledge base. Choose Google Drive, OneDrive or Notion, enter the Folder ID (or Notion page ID), then connect your account or paste an access token. On OneDrive, leave the folder empty to sync the whole drive.
Each sync adds new documents, re-indexes changed ones and removes deleted ones. Connections re-sync daily, and Sync now runs one immediately.
Needs keys Synced sources need the Google, Microsoft or Notion OAuth app configured on the platform, or a pasted access token. Without access, the sync loads sample documents so you can try it.
Connect to an agent#
In the agent's settings panel, Knowledge Base lists linked knowledge bases and their retrieval settings.
| Setting | Field | Range | Default |
|---|---|---|---|
| Linked knowledge bases | knowledge_base_ids |
none | |
| Chunks to retrieve | kb_config.top_k |
1 to 10 | 3 |
| Similarity Threshold | kb_config.filter_score |
0 to 1 | 0.6 |
| Retrieval instruction | kb_instruction |
up to 500 characters | none |
knowledge_base_ids, kb_config and kb_instruction are set on the Retell LLM or conversation flow. Conversation flow nodes can override knowledge_base_ids and kb_instruction, so a billing node searches only billing documents.
How retrieval works#
On each caller turn:
- The caller's words are rewritten into a standalone search query using the last six turns. "What about Saturday?" after a question about opening hours becomes a query about Saturday opening hours. The Retrieval instruction steers this rewrite, for example "Prices are in the Fees document. Prefer the most recent policy."
- The query is compared with every chunk in the linked knowledge bases.
- Chunks scoring below the Similarity Threshold are dropped, and up to Chunks to retrieve remain.
- They are added to the prompt under
## Related Knowledge Base Contexts, each prefixed with its source title.
If the search takes longer than 1.5 seconds or fails, the turn continues without knowledge base context.
Retrieval time is recorded in the call's latency.knowledge_base.
If the agent misses answers that are in your documents, lower the Similarity Threshold a little or raise Chunks to retrieve. If it quotes irrelevant passages, do the opposite. Tell the agent in the prompt to use the knowledge base for facts and to say it does not know when nothing relevant is found.
See what was retrieved#
Every retrieval is logged against the call: the query, the rewritten query and the chunks with their scores. Open the call in Call History and select the Knowledge and workflows tab to see them, or download the JSON from the call's knowledge_base_retrieved_contents_url signed URL.
Pricing#
Agents with a linked knowledge base add $0.01 per minute.
API#
| Action | Endpoint |
|---|---|
| Create | Create knowledge base |
| Add sources | POST /add-knowledge-base-sources/{knowledge_base_id} |
| Delete a source | DELETE /delete-knowledge-base-source/{knowledge_base_id}/source/{source_id} |
| Update settings | PATCH /update-knowledge-base/{knowledge_base_id} |
| Refresh | POST /refresh-knowledge-base/{knowledge_base_id} |
| Preview a crawl | POST /knowledge-base-crawl-preview |
| Synced sources | POST /add-knowledge-base-synced-source/{knowledge_base_id}, POST /sync-knowledge-base-source/{sync_id} |
Create accepts JSON or multipart form data with knowledge_base_files uploads:
curl https://api.tried.com.au/create-knowledge-base \
-H "Authorization: Bearer $TRIED_API_KEY" \
-F knowledge_base_name="Clinic FAQ" \
-F 'knowledge_base_urls=["https://example.com/faq"]' \
-F 'knowledge_base_texts=[{"title":"Opening hours","text":"Monday to Friday, 8am to 6pm."}]' \
-F knowledge_base_files=@fees.pdf