Prerequisite: You need a customer support agent integrated with Netra. If you haven’t set this up yet, follow the Tracing LangChain Agents cookbook first.
What You’ll Learn
Configure Simulation Evaluators
Select session-level evaluators that measure goal achievement, fact accuracy, and conversation quality
Create Multi-Turn Scenarios
Build scenarios with goals, user data, fact checkers, and different personas
Wrap Your Agent in BaseTask
Implement the BaseTask interface to connect your agent to the simulation engine
Compare Persona Performance
Run the same scenario with Neutral, Friendly, Frustrated, and Confused personas and compare results
Why Simulate Customer Support?
Customer support agents engage in goal-oriented, multi-turn conversations where subtle failures compound:
Simulation addresses this by creating realistic conversations with a simulated user who has a goal, a persona, and context data — then scoring the entire session.
Now, let’s walk through the process of simulating customer support conversations:
Step 1: Select Simulation Evaluators
Go to Evaluation → Evaluators, switch to the Library tab, and filter by Multi turn. Add the following four evaluators:
See Simulation Evaluators for the full library and configuration options.
Step 2: Create a Multi-Turn Dataset
Go to Evaluation → Datasets and click Create Dataset. Select Multi-turn as the type.1
Configure basics
Set the dataset name to “Customer Support Scenarios” and add tags like
support, refunds. Select Multi-turn as the type and Add manually as the data source.2
Configure the scenario
Define the first scenario:Scenario Goal:Behavior Instructions (optional):Max Turns: 5User Persona: FrustratedProvider and Model: Choose the LLM that will generate simulated user responses (e.g., OpenAI / GPT-4.1).
3
Add user data and facts
Simulated User Data — context the simulated user can reference:
Fact Checker — facts the agent must communicate correctly:
4
Select evaluators
Add the four evaluators from Step 1 — Goal Fulfillment, Factual Accuracy, Conversation Completeness, and Guideline Adherence. Configure variable mappings to connect evaluator inputs to scenario fields, agent responses, and conversation metadata.
5
Configure evaluators
Select a provider and model for each evaluator (e.g., OpenAI / GPT-4.1). Optionally rename evaluators to match your use case (e.g., “Refund Goal Fulfillment”). Review and click Create Dataset.
Step 3: Add More Scenarios
Add two more scenarios to the same dataset, each with a different persona and goal: Scenario 2 — Order Status Inquiry (Neutral persona)
Scenario 3 — Return Policy Question (Confused persona)
Under Evaluation → Datasets, you should now see the “Customer Support Scenarios” dataset with three scenarios and four evaluators.
Step 4: Implement the BaseTask Wrapper
Wrap your customer support agent in aBaseTask so the simulation engine can call it turn by turn. The run() method receives the simulated user’s message and a session_id for conversation continuity.
Step 5: Trigger the Simulation
Copy the Dataset ID from the dataset page and run the simulation.Step 6: Analyze Results
Go to Evaluation → Test Runs and filter by Multi turn to find your simulation run.Summary Metrics
The top of the detail view shows aggregated data — total scenarios, pass/fail counts, total cost, and average latency. Use this for a quick health check before diving into individual scenarios.Conversation Transcripts
Click on any scenario to open the detail view. The Conversation tab shows the full turn-by-turn dialogue between the simulated user and your agent. Look for:- Where the conversation stalled — did the agent ask for information the user already provided?
- Fact accuracy — did the agent state the correct refund timeline?
- Resolution confirmation — did the agent explicitly confirm the action before ending?
Exit Reasons
Each scenario ends with one of four exit reasons:Evaluation Scores
The Evaluation Results tab shows scores for each evaluator. Compare scores across the three scenarios to spot persona-specific weaknesses:
In this example, the Confused persona scenario scores lowest on Completeness — the agent may not be explaining things clearly enough for users who need extra clarification.
Debugging with Traces
Click View Trace on any conversation turn to inspect the full execution — LLM inputs, tool calls (if applicable), token usage, and latency. This connects simulation results directly to your observability traces.Interpreting Scores and Improving Quality
When evaluator scores are low, use this table to identify the likely cause and fix:
After making changes, re-run the simulation against the same dataset and compare results across test runs.
Continuous Simulation Strategy
For production support agents, run simulations regularly:- On every prompt change — Verify that updated instructions don’t break existing conversation patterns
- After adding new tools — Ensure the agent correctly integrates new capabilities into conversations
- After model upgrades — Compare conversation quality across model versions
- Weekly regression runs — Catch gradual degradation in goal achievement or fact accuracy
See Also
Trace Your LangChain Agent
Set up comprehensive tracing for your support agent before simulating
Simulation Overview
Deep dive into Netra’s simulation framework: datasets, evaluators, and test runs
