Chatbot Training Guide

Debug And Optimization Chatbots

Your training data won't cover every question your visitors ask. Review real conversations regularly, find the weak answers, and fix them. This page shows how.

Find the bad answer in Chat Logs, replay the whole conversation in the Playground, click Show debug info and check Sources. If the right content is missing, fix the data; if it is there, fix the prompt or model. Then click Revise to save the fix as a Q&A


Identify Issues

Open Dashboard > Chat Logs and read recent conversations. When an answer is not what you expected, note the visitor's question and the messages before it.

Dashboard > Chat Logs with the conversation list on the left and a conversation open on the right, where each AI reply has a Revise button

Debugging Issues

  1. Open the Playground of your chatbot.
  2. Replay the whole conversation: send the visitor's messages in the same order, not just the last question.
  3. Right after the bad reply, click Show debug info and look at Sources: the content the AI agent used to answer. It shows the latest reply, so check it before you send the next message.

Why replay the whole conversation? The AI agent uses earlier messages to decide what to look up. A question asked on its own may get a good answer, while the same question after a different topic may not, especially with unstructured data such as documents and web pages. Q&A pairs are structured data, so they are more likely to be found.

Debug information for a Playground reply: credits, first-byte time, model, the embedding text and the Sources the AI agent used

The right Q&A is not in Sources

  1. Is it saved? Check that the Q&A appears in Sources > Q&A.
  2. Has training finished? If you tested right after adding data, training may still be running. Wait, then test again.
  3. Too many topics? If the conversation covered several topics, the lookup may miss your Q&A, because the AI receives only a limited number of the most relevant text chunks for each question. Make the Q&A more specific, or remove off-topic text chunks that crowd it out.

The right content is in Sources

The data is fine, so check the instructions and the model:

  • Review your base prompt.
  • Smaller models may make things up ("hallucinate") and may not follow the context and base prompt strictly. Try a larger base model.

Still stuck? Email us at [email protected].

Fix Issues

In Chat Logs, click Revise on the bad reply and type the correct answer. The question and your corrected answer are saved as a Q&A pair automatically, so similar questions get the right answer next time.

An AI reply in Chat Logs with the Revise button
The Revise button in Chat Logs
A Q&A pair in Sources > Q&A with the question and the corrected answer
The Q&A pair created after you click Revise

Next step: when the answers look right, put your AI agent on your site with Embed Chatbots On Websites.

Related: Structured vs Unstructured Data · Chatbot Basic Configuration

Frequently Asked Questions

How should I start debugging a chatbot response that looks wrong?

Starting in `Chat Logs` by reviewing production conversations and locating the exact user query that produced the bad response. That query then becomes the starting point for reproducing and investigating the issue.

Why does the guide tell me to reproduce the full conversation when debugging?

It explains that the chatbot uses past conversation context to build the embedding query, so a direct one-off question can behave differently from the threaded conversation. Reproducing the full chat helps you inspect the actual sources and retrieval behavior that led to the incorrect answer.

What should I check if the expected Q&A is not showing in the sources?

Several checks: confirm the Q&A is actually saved in the database, confirm training had enough time to finish after upload, and consider whether previous messages or irrelevant text chunks are crowding out the expected result from the top retrieved sources.

How do I fix a bad chatbot answer after identifying the problem?

The guide says to use the `Revise` feature in Chat Logs to directly correct the response. That revision is then turned into a Q&A pair automatically, which helps improve future answers for similar cases.

Previous
Chatbots Real-time Product Updates