The Knowledge Base Optimizer is a testing tool that shows you which fragments of your training data the chatbot finds for any question. It runs the exact same knowledge search the chatbot performs in real conversations, so what you see in the results is what the AI receives when answering.
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 the blue Knowledge Base Optimizer button.
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, ranked from the best match down.
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. Higher means more relevant.
- 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 single-language bot it searches all sources together. If you have Multi-language enabled, the search can be limited to the visitor's language plus language-independent sources, and the tool reflects the same behavior.
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 from the results, the information is not in your training data (or is phrased too differently) - add it as a new source or a correction.
- 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 are picked up as soon as training completes. For a broader guide, see How to improve chatbot responses.