Retrieval settings
When someone sends a message, your bot searches your data sources for the most relevant pieces of content (called documents) and reads them before it answers. These settings control that search. They are in your bot's General settings tab: the toggles for sources are under General settings, the rest under Model settings (advanced).
Settings
| Setting | What it does | Default | Range |
|---|---|---|---|
| Document relevance | How closely a document must match the message before the bot is given it. Higher = only very relevant documents; lower = more, looser matches. | 0.75 | 0.25–0.9 (0.25–0.75 on bots using a newer embedding model) |
| Max context documents | The maximum number of documents given to the bot for each message. 0 turns knowledge retrieval off. | 4 (6 for bots created from the dashboard form) | 0–12 |
| Max context size (base tokens) | The token budget for each reply's prompt, knowledge and conversation history. Documents that don't fit are left out. | The model's default | 1,024 up to the model's context window |
| Enhanced knowledge retrieval | Before searching, rewrites the latest message into a standalone question using the conversation so far. Makes follow-up questions ("how much does it cost?") find the right content. Uses extra message tokens. | Off | On / off |
| Include sources for responses | Shows links to the pages an answer came from. Only web data sources are shown. | Off | On / off |
| Document character limit | The maximum size of each document when your content is split up during syncing. | 2,000 | 1,000–4,000 |
When to change them
The bot says it doesn't know, but the answer is in your content
- Check the data source has finished syncing and contains the page (see manage data sources).
- Lower Document relevance a little (for example from 0.75 to 0.6). Short content, such as product feeds or one-line FAQ entries, often needs 0.5.
- Raise Max context documents to 8–10 so more content reaches the bot.
- Turn on Enhanced knowledge retrieval if it fails mainly on follow-up questions.
The bot uses irrelevant content or drifts off topic
Raise Document relevance so only close matches are used, and tighten your instructions.
Replies use too many tokens
Lower Max context documents or Max context size (base tokens). Keep Max context size above about 2,560: below that, the settings warn "This is quite low & could mean your bot won't be given any context documents."
Answers are cut off mid-topic or miss surrounding detail
Raise Document character limit so each document holds more text. The new size applies the next time your data sources sync; see keep it up to date.
Change a setting
- Open your bot and go to the General settings tab.
- For sources, use the Include sources for responses toggle under General settings. For everything else, scroll to Model settings (advanced).
- Adjust the setting.
- Click Update bot.
- Ask the questions that were failing and check the answers. If Include sources for responses is on, check the cited pages are the right ones.
You can also change these settings from an AI assistant with the update_bot MCP tool (documentRelevance, maxContextAmount, enhancedRetrieval, includeSources, documentChunkSize).
Related
- Improve your bot's answers
Fix a bot that says "I don't know", gives wrong or made-up answers, goes off-topic, rambles, forgets context or replies in the wrong language.
- Bot settings reference
Every setting on your bot's General settings tab - what it does, its default and range, and which plans include it.
- Structure your content for better answers
Split data sources sensibly, pick the right CSS selectors for your CMS, and write content your bot can find and quote accurately.
Last updated