The Challenge
When testing multi-turn agent conversations, teams often model tests as scripted dialogues:Approach 1: User Simulation Agent
Instead of testing exact conversation paths, test whether the agent achieves the intended outcome.How It Works
- Define the test by its goal, not its transcript
- Use an LLM to simulate the user dynamically, adapting to whatever the agent responds
- Evaluate the outcome against your success criteria
Implementation
Example Usage
Approach 2: Turn-by-Turn Evaluation
If you have a reference conversation flow, you can test your agent’s ability to respond appropriately at each stage by progressively replaying the conversation and evaluating each response independently. Key difference from Approach 1: Instead of letting the conversation evolve naturally (where the agent’s response affects the next user message), this approach uses a fixed sequence of user messages from a reference transcript. This allows you to test each turn independently without compounding effects.How It Works
- Take a reference transcript showing the desired conversation flow
- At each user message, generate a fresh response from your agent given the conversation history so far
- Evaluate the generated response against your criteria
- Use the reference assistant response (not your agent’s response) for the conversation history when testing the next turn
- Aggregate scores across all turns
Implementation
Example Usage
Turn-Specific Criteria
Different turns may have different expectations. You can specify criteria per turn and allow for multiple correct behaviors: Adding multiple criteria allows you to specify that clarifying, acknowledging, or directly answering are all acceptable behaviors.