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.
- 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, the message goes to them and the bot stays quiet.
- 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
0and 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.
- 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):
- 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, details you pass with the JavaScript SDK's
identifyUseror the Chat API'suserData, and page context fromextendContext. - 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.
- 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.
- 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.
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.
- 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.
- 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 or Browse web page, 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:
- 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.
- 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.
- 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.
- 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.
- 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.
- 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, Retrieval settings |
| Wrong or made-up answer | Old or conflicting content, loose retrieval, no rule against guessing | Improve your bot's answers |
| Right answer on the first question, lost on the follow-up | Follow-ups searched without context | Turn on Enhanced knowledge retrieval: Retrieval settings |
| Answers questions it shouldn't | No boundaries in the instructions | Keep the bot on topic |
| Answers too long or rambling | No length rule, too much context | Make answers shorter |
| Replies in the wrong language | No language rule | Control which language the bot answers in, Languages |
| New or changed pages not reflected | Source not re-synced, or new pages not added | Keep your bot's knowledge up to date |
| Doesn't know about today's news or prices on other sites | No live web access | Google Search, Browse web page |
| Never uses a power-up, or uses it at the wrong time | Vague power-up description, or unsupported model | How power-ups work |
| Forgets something said earlier in a long chat | History limit reached | Raise Max message history: Settings reference |
| Leaves customers stuck when it can't help | No fallback rule or escape hatch | Say "I don't know" and hand over, Hand off to a human |
| Ignores who the visitor is | Visitor details not passed in | Identify the user, Pre-chat 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.
Next steps
- Improve your bot's answers: fixes for each problem, step by step.
- After launch: a routine for improving your bot: how to find bad answers before customers complain.
- Retrieval settings: every search setting and its range.
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.
- 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
Write the prompt that sets your bot's role, topics, tone, answer length, language, power-up use and handoff, with before-and-after examples.
Last updated