- Search Lab shows which documents your knowledge base returns for a question, without running the agent.
- Self-improve analyzes a real conversation, explains what went wrong and suggests fixes you can apply in one click.
Search Lab
Use Search Lab to check whether the right documents come up for a question.1
Open Search Lab
Go to Knowledge > Advanced > Search Lab.
2
Run a search
Type the user’s question in Message, select the agent (its knowledge sources are searched), set Results to the number of documents to return, then click Search or press Ctrl + Enter (⌘ + Enter on Mac).
3
Review the results
Documents are ranked from the closest match to the furthest. Each result shows its title, its source and a Similarity score: the higher the score, the closer the match. The score is green above 0.7 (High), amber from 0.4 to 0.7 (Medium) and grey below (Low). Click a row to read the full document.
Self-improve
Self-improve analyzes a conversation and proposes changes to your agent’s instructions or to your documents.Open Self-improve
- Open a conversation in the admin interface.
- In the conversation sidebar, add an evaluation comment that describes what went wrong.
- Open the conversation menu and choose Self-improve.
What Auto Analysis looks at
The analysis reads the first ten messages of the conversation, the documents that were retrieved, and the tool calls the agent made: which tool or agent was called, with which arguments, whether it succeeded, and what it returned. This tells apart a failed action from a wrong answer built on a correct tool result. Router clarifying questions and the reply options they offered are included too. Very long tool inputs and results are shortened. The result shows the identified issue, a confidence level, and the most similar documents in your knowledge base with their similarity scores.Apply a suggested fix
Each suggested action shows what it will change. Review it, then click Apply.
When you edit proposed instructions, click Enter fullscreen to get a larger editor, and expand Current Prompt to compare with the existing instructions. Exit fullscreen or Escape returns to the smaller dialog without losing your edits.
For an Improve Document analysis, review the explanation, the document link and the proposed changes before applying them.
Common problems
The agent says it doesn't know, but the answer is documented
The agent says it doesn't know, but the answer is documented
- Run the user’s exact question in Search Lab with the same agent.
- If the document is missing from the results, check that its source is synced and assigned to the agent.
- If it appears low in the list, add the user’s phrasing as a related question, or improve the document’s title and headings.
A less relevant document ranks first
A less relevant document ranks first
Make the right document’s title and headings more specific, and split documents that cover several unrelated topics.
The agent calls the wrong tool
The agent calls the wrong tool
Run Auto Analysis on the conversation. If no documents were retrieved, the agent had no context to answer from. Otherwise, make the tool’s description more precise and state in the agent’s instructions when to use it. See Writing Tool Descriptions.
The same question gets answers of varying quality
The same question gets answers of varying quality
Compare the retrieved documents across conversations. Lower the agent’s temperature for more consistent answers, and pin the documents the agent must always see.
Related
- Simulation Testing: test agents against saved questions
- Agents: agent configuration reference
