Log in

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, 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):
    • 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 identifyUser or the Chat API's userData, and page context from extendContext.
    • 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.
  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.

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:

  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 seeLikely causeFix it here
"I don't know" when the answer is in your contentNot synced, or retrieval too strictImprove your bot's answers, Retrieval settings
Wrong or made-up answerOld or conflicting content, loose retrieval, no rule against guessingImprove your bot's answers
Right answer on the first question, lost on the follow-upFollow-ups searched without contextTurn on Enhanced knowledge retrieval: Retrieval settings
Answers questions it shouldn'tNo boundaries in the instructionsKeep the bot on topic
Answers too long or ramblingNo length rule, too much contextMake answers shorter
Replies in the wrong languageNo language ruleControl which language the bot answers in, Languages
New or changed pages not reflectedSource not re-synced, or new pages not addedKeep your bot's knowledge up to date
Doesn't know about today's news or prices on other sitesNo live web accessGoogle Search, Browse web page
Never uses a power-up, or uses it at the wrong timeVague power-up description, or unsupported modelHow power-ups work
Forgets something said earlier in a long chatHistory limit reachedRaise Max message history: Settings reference
Leaves customers stuck when it can't helpNo fallback rule or escape hatchSay "I don't know" and hand over, Hand off to a human
Ignores who the visitor isVisitor details not passed inIdentify 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

    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