The Knowledge Base Optimizer is a testing tool that shows you which fragments of your training data the chatbot finds for any question. It uses the bot's knowledge retrieval and language settings for a standalone question. It does not replay a whole conversation or call the bot's store and other actions, so it is not an exact trace of every live reply.
It is read-only: testing a question here does not change your training data and does not affect your chatbot in any way.
Where to Find It
Select your chatbot in the main dashboard and open the Training tab. In the left column, below the list of source categories, click Knowledge Base Optimizer.
If you have not trained your chatbot yet, start with adding training data first - the optimizer can only search knowledge that has already been trained.
Testing a Question
- Type a question into the Message field - ideally a real question your visitors ask, or one the chatbot recently answered poorly.
- Click Submit.
- After a moment, the matching knowledge fragments appear below, ordered by the retrieval ranking and language policy.
Reading the Results
Each result row represents one fragment of your training data:
- Match - the percentage on the left shows how closely the fragment matches your question. Use it as a similarity signal, not a percentage probability that an answer is correct. Language preferences and reranking can also affect the order.
- Source - the row header shows the source type icon and name, for example the URL of the trained page, a file name, or a Q&A entry.
- Language badge - the small badge next to the source shows which language the fragment is tagged with. Sources without a language tag show "any", which means they are used for every language.
- Fragment content - click a row to expand it and read the exact text the chatbot would receive.
The order matters. Results are ranked by relevance, and the chatbot reads them in this order, from the top, until its knowledge context budget is full. The budget depends on the bot's Chat Context Size and memory settings - fragments that do not fit within the budget are cut off from the bottom. If the fragment you expected is missing or sits very low in the list, the chatbot most likely is not using it when answering.
Language Policy
Above the message field, the Language policy line explains how your bot treats source languages during the search. For a bot with no language filtering it searches all sources together. With Multi-language, the configured policy can restrict retrieval to the main language or the visitor's language, with the selected fallback and language-independent sources. Read the displayed policy before interpreting missing results.
For multilingual bots, an extra info line appears under the message field after each search. It shows the Detected message language (the language the tool recognized in your question), the Searched languages (which source languages were included in the search), and, when the tool rephrased your question to search better, the Refined query it actually used.
When to Use It
- The chatbot answers incorrectly or says it does not know. Test the same question here. If the right fragment is missing, check the original source, its completed training status, language tag and the displayed language policy first. Missing results can also reflect ranking or the context budget; they do not prove the information is absent. Add or correct content only after identifying the gap.
- After retraining. When you retrain your sources, run a few typical questions to sanity-check that the refreshed content is retrieved as expected.
- Before going live. Test the most common questions your visitors will ask and confirm each one returns relevant fragments near the top.
If the results reveal gaps, improve your training data and test again - the changes become available after training completes. Then test the answer in Overview, including a realistic follow-up question. For a broader guide, see How to improve chatbot responses.