---
title: "How your bot answers a message"
description: "What happens between a customer's message and your bot's reply, why answers go wrong, and which setting or page fixes each problem."
canonical_url: "https://chatthing.ai/docs/improve/how-your-bot-answers"
last_updated: "2026-09-25"
---

# How your bot answers a message

Every reply your bot writes is built from the same few ingredients: your instructions, the pieces of your knowledge that match the question, the conversation so far, anything you've told it about the visitor, and the power-ups it can use. When an answer is wrong, one of those ingredients is missing or misleading. Knowing which one saves you guessing.

## From message to reply

When someone sends your bot a message, Chat Thing works through these steps on every channel.

1. **Checks.** Chat Thing checks the message against your **Maximum message length** limit and your team's token allowance. If a teammate has [taken over the conversation](https://chatthing.ai/docs/manage/human-takeover), the message goes to them and the bot stays quiet.
2. **Finds matching knowledge.** Chat Thing searches your synced data sources for pieces of content (called documents) that match the message. This happens automatically on every message; the bot doesn't decide whether to look.
   - Only documents that score above **Document relevance** (default 0.75) count as a match.
   - At most **Max context documents** are used (0 to 12). Set it to `0` and the bot doesn't search your knowledge at all.
   - With **Enhanced knowledge retrieval** on, a follow-up such as "and how much is that?" is first rewritten into a complete question using the last few messages, so the search looks for the right thing. This uses a few extra message tokens.
   - If nothing scores high enough, the bot gets no knowledge for that message and answers from its instructions and the model's general knowledge.
3. **Builds what the model reads.** The model is given the following (for how to write instructions that fit around it, see [What the bot sees with every message](https://chatthing.ai/docs/bot-settings/instructions#what-the-bot-sees-with-every-message)):
   - Your **Prompt** (the bot's instructions), or the default prompt if you left it blank.
   - Today's date, in the visitor's time zone when it's known.
   - What you know about the visitor: answers to your [pre-chat form](https://chatthing.ai/docs/channels/website/lead-form), details you pass with the JavaScript SDK's [`identifyUser`](https://chatthing.ai/docs/developers/javascript-sdk#identify-the-user) or the Chat API's `userData`, and page context from [`extendContext`](https://chatthing.ai/docs/developers/javascript-sdk#give-the-bot-page-context).
   - The matching documents from step 2.
   - Recent conversation history, up to **Max message history** earlier messages (default 12). In long conversations the oldest messages are dropped first so everything fits within **Max context size (base tokens)**.
   - The new message.
4. **Writes the reply, using power-ups if they help.** The model sees every power-up that's turned on, with its **Description**, and decides whether to use one. It can use several in a row, for example searching the web, reading a page and then emailing your team, before it writes the final reply. See [How power-ups work](https://chatthing.ai/docs/power-ups/how-power-ups-work).
5. **Adds sources.** If **Include sources for responses** is on, the reply lists the pages it drew on. Only website sources are shown in the chat.

The **model** you choose shapes every step after retrieval: how well it follows your instructions, how it uses power-ups, and how long and careful its answers are. **Creativity (temperature)** controls how varied the wording is (default 0.3). See [Models](https://chatthing.ai/docs/bot-settings/models).

## What your bot knows, and what it doesn't

- **It knows your synced content.** A page the bot hasn't synced, or a change you made after the last sync, is invisible to it. See [Keep your bot's knowledge up to date](https://chatthing.ai/docs/knowledge/keep-it-up-to-date).
- **It also knows what the model learned in training.** The default prompt lets the bot use general knowledge when your content doesn't cover a question, and tells it to say so when it isn't sure. If you only want answers from your content, say so in your **Prompt**. See [Answer only from your knowledge](https://chatthing.ai/docs/bot-settings/instructions#answer-only-from-your-knowledge).
- **It doesn't learn from conversations.** Chats, corrections and thumbs-down ratings don't change future answers. To change an answer, change the knowledge or the instructions.
- **It only reads the live web with a power-up.** Without [Google Search](https://chatthing.ai/docs/power-ups/google-search) or [Browse web page](https://chatthing.ai/docs/power-ups/browse-webpage), the bot can't look anything up online.
- **It sees each message's best matches, not your whole knowledge.** A question that needs facts from many pages at once (such as "list every product under £20") may only get a few of them. A single summary page or manual entry helps.

## Why answers go wrong

Most bad answers come from one of these causes, roughly in order of how often we see them:

1. **The answer isn't in the knowledge.** The page was never added, hasn't synced, or the website sync missed content that loads with JavaScript.
2. **The search didn't find it.** **Document relevance** is too strict for short entries, **Max context documents** is too low, or a follow-up question was searched without its context.
3. **The search found the wrong thing.** Loose relevance, or pages that cover several topics, pull in content that's only loosely related. Out-of-date or contradictory pages lead to confident wrong answers.
4. **The instructions pull the wrong way.** No rule about what to do when the answer is missing, rules that are too strict, or no guidance on length, tone or language.
5. **The model or its settings don't suit the job.** High creativity makes guessing more likely; some models write longer answers or handle power-ups less reliably.
6. **A power-up was used wrongly, or not at all.** Its **Description** doesn't say clearly when to use it, or the model doesn't support power-ups.

## Match the symptom to the fix

| What you see | Likely cause | Fix it here |
| --- | --- | --- |
| "I don't know" when the answer is in your content | Not synced, or retrieval too strict | [Improve your bot's answers](https://chatthing.ai/docs/improve/improve-answers#the-bot-says-i-dont-know-when-the-answer-is-in-your-content), [Retrieval settings](https://chatthing.ai/docs/knowledge/retrieval-settings) |
| Wrong or made-up answer | Old or conflicting content, loose retrieval, no rule against guessing | [Improve your bot's answers](https://chatthing.ai/docs/improve/improve-answers#the-bot-gives-wrong-or-made-up-answers) |
| Right answer on the first question, lost on the follow-up | Follow-ups searched without context | Turn on **Enhanced knowledge retrieval**: [Retrieval settings](https://chatthing.ai/docs/knowledge/retrieval-settings) |
| Answers questions it shouldn't | No boundaries in the instructions | [Keep the bot on topic](https://chatthing.ai/docs/bot-settings/instructions#keep-the-bot-on-topic) |
| Answers too long or rambling | No length rule, too much context | [Make answers shorter](https://chatthing.ai/docs/bot-settings/instructions#make-answers-shorter) |
| Replies in the wrong language | No language rule | [Control which language the bot answers in](https://chatthing.ai/docs/bot-settings/instructions#control-which-language-the-bot-answers-in), [Languages](https://chatthing.ai/docs/channels/website/languages) |
| New or changed pages not reflected | Source not re-synced, or new pages not added | [Keep your bot's knowledge up to date](https://chatthing.ai/docs/knowledge/keep-it-up-to-date) |
| Doesn't know about today's news or prices on other sites | No live web access | [Google Search](https://chatthing.ai/docs/power-ups/google-search), [Browse web page](https://chatthing.ai/docs/power-ups/browse-webpage) |
| Never uses a power-up, or uses it at the wrong time | Vague power-up description, or unsupported model | [How power-ups work](https://chatthing.ai/docs/power-ups/how-power-ups-work#my-bot-never-uses-the-power-up) |
| Forgets something said earlier in a long chat | History limit reached | Raise **Max message history**: [Settings reference](https://chatthing.ai/docs/bot-settings/settings-reference#model-settings-advanced) |
| Leaves customers stuck when it can't help | No fallback rule or escape hatch | [Say "I don't know" and hand over](https://chatthing.ai/docs/bot-settings/instructions#say-i-dont-know-and-hand-over-to-a-person), [Hand off to a human](https://chatthing.ai/docs/power-ups/talk-to-a-human) |
| Ignores who the visitor is | Visitor details not passed in | [Identify the user](https://chatthing.ai/docs/developers/javascript-sdk#identify-the-user), [Pre-chat form](https://chatthing.ai/docs/channels/website/lead-form) |

Not sure which row you're in? Open the conversation in **Conversations** and click **Ask Otto about this chat**. Otto reads the exchange and the sources used, and tells you the cause. See [Otto](https://chatthing.ai/docs/get-started/otto#diagnose-a-bad-answer).

## Next steps

- [Improve your bot's answers](https://chatthing.ai/docs/improve/improve-answers): fixes for each problem, step by step.
- [After launch: a routine for improving your bot](https://chatthing.ai/docs/improve/after-launch): how to find bad answers before customers complain.
- [Retrieval settings](https://chatthing.ai/docs/knowledge/retrieval-settings): every search setting and its range.

## Related

- [Improve your bot's answers](https://chatthing.ai/docs/improve/improve-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.
- [Retrieval settings](https://chatthing.ai/docs/knowledge/retrieval-settings): Control how much of your knowledge your bot reads for each message - document relevance, context documents, enhanced retrieval, sources and chunk size.
- [Write your bot's instructions](https://chatthing.ai/docs/bot-settings/instructions): Write the prompt that sets your bot's role, topics, tone, answer length, language, power-up use and handoff, with before-and-after examples.
