
Simulation Testing
Overview
Simulation testing in AGO provides:- Automated Quality Assurance: Test agents against expected behaviors
- Regression Detection: Catch issues when changing prompts or models
- Tool Validation: Verify agents call the right tools with correct parameters
- Performance Tracking: Monitor success rates over time
Prerequisites
System Requirements
- AGO platform deployed and accessible
- Admin access to create datasets and run simulations
Knowledge Required
- Understanding of your agent’s expected behavior
- Familiarity with common user questions
How It Works
- Create a Dataset with related test cases
- Define Test Cases with questions and expected outcomes
- Run Simulation against a specific agent
- System uses LLM Evaluation to score responses
- Review Results and track success rates
Creating Test Datasets
- Navigate to AI Studio → Agent Lab
- Select the Simulations tab, then click Create Dataset
- Configure dataset:
- Name: Descriptive identifier (e.g., “Support Agent Q4 Tests”)
- Description: Purpose and scope
- Agent: (Optional) Pre-bind to specific agent
- Click Save
Dataset Configuration
Defining Test Cases
Test Case Types
Single-Turn Test Cases
Single-turn tests validate a single question-and-answer exchange.Answer Type
For validating text responses:- In the dataset, click Add Test Case
- Set Expected Type to “Answer”
- Configure the test:
- Question: The user message to test (e.g., “What are your business hours?”)
- Expected Answer: The expected response content
- Click Save
Note: The expected answer doesn’t need to be exact. The LLM evaluator checks semantic similarity.
Tool Call Type
For validating tool usage:- In the dataset, click Add Test Case
- Set Expected Type to “Tool Call”
- Configure the test:
- Question: The user message that should trigger the tool
- Expected Tool Name: The tool that should be called (e.g., “ago_ticketing”)
- Expected Tool Arguments: (Optional) Expected argument values
- Click Save
Multi-Turn Test Cases
Multi-turn tests validate a full conversation flow across multiple exchanges. This is useful for testing workflows that require back-and-forth interactions, such as collecting information or guiding users through a process.- In the dataset, click Add Test Case
- Toggle from Single Turn to Multi-Turn
- For each conversation step:
- User Message: What the user says at this step
- Expected Type: “Answer” or “Tool Call”
- Expected Answer / Tool: The expected outcome for this step
- Click Add Step to add more conversation turns
- Click Save
Generating Test Cases with AI
Instead of writing every test case by hand, you can generate them from the agent’s knowledge base:- Open the dataset and go to the Test Cases tab
- Click Generate with AI
- Pick the agent, the generation mode, the number of test cases (1–50), and the maximum number of user messages per conversation (1–10)
- Click Generate with AI in the dialog
- From knowledge documents (default) — questions cover the topics found in the agent’s knowledge documents, phrased the way real users write.
- From a user profile — you describe the type of user and how they behave (for example, “a new payroll manager, in a hurry, who asks short and sometimes vague questions about leave management”). Questions are written the way that user would ask them, and expected answers stay grounded in the knowledge documents.
Generation reads the selected agent’s knowledge documents (or the whole knowledge base when the agent has no sources assigned). If no documents with readable content are found, no test cases are created.
Test Case Fields
Personas
Personas let you customize test behavior by simulating different user profiles. Each persona can override the agent, adjust LLM temperature, and include behavior notes that influence how tests are evaluated.Creating a Persona
- In the dataset builder, navigate to the Personas section
- Click Create Persona
- Configure:
- Name: Descriptive label (e.g., “Premium Customer”, “New User”)
- Role: Short role description
- Behavior Notes: Free-text instructions describing how this persona behaves
- Override Agent: (Optional) Use a different agent for tests with this persona
- LLM Temperature: (Optional) Override the LLM temperature
- API Data Overrides: (Optional) Mock API data source responses during simulation
- Click Save
API Data Overrides
When a persona has API data overrides configured, simulation tests using that persona will return the mocked data instead of making real API calls. This lets you test how your agent behaves with specific API responses without modifying your actual data sources. To add API overrides to a persona:- In the persona creation dialog, click Add API Override
- Select the API data source to mock from the dropdown
- Enter the JSON response the source should return during simulation
- Add multiple overrides for different data sources as needed
Using Personas
- Set a Default Persona on the dataset to apply it to all test cases automatically
- Override the persona on individual test cases when needed
- Test cases without a persona use the dataset’s default persona (if set)
Running Simulations
- Navigate to AI Studio → Agent Lab
- Select the Simulations tab, then select the dataset to run
- Click Run Simulation
- Select target agent (if not pre-bound)
- Optionally check Detect knowledge gaps (see below)
- Monitor progress in real-time
Detecting Knowledge Gaps from a Run
Check Detect knowledge gaps when starting a run to turn failed tests into actionable reports. When the run completes, AGO analyzes the conversations behind failed answer tests and files a Knowledge Update Request for each gap it finds, with the source “Simulation lab”. Each request includes the question, what was missing, and suggested edits to your knowledge base. Combined with AI-generated test cases, this gives you a full audit loop: generate questions from your knowledge base, run them against the agent, and review the gap reports for everything the agent could not answer correctly. Tool call and agent routing failures are not analyzed — only answer-type tests can reveal knowledge gaps.Monitoring Progress
The simulation dashboard shows:- Total Tests: Number of test cases in the dataset
- Passed Tests: Tests that met expectations
- Failed Tests: Tests that didn’t meet expectations
- Success Rate: Percentage of passed tests
- Duration: Time since simulation started
Run Statuses
Understanding Results
Viewing Result Details
Click on any test result to see:Evaluation Criteria
The LLM evaluator scores responses on:Success Rate Calculation
Best Practices
Creating Effective Test Cases
-
Cover Core Functionality
- Include the most common user questions
- Test key workflows from start to finish
-
Test Edge Cases
- Ambiguous questions
- Out-of-scope requests
- Multiple intents in one message
-
Validate Tool Usage
- Test escalation scenarios
- Verify correct tool selection
- Check argument accuracy
-
Use Realistic Questions
- Base tests on actual user queries
- Include typos and variations
Organizing Datasets
Running Simulations
- Before Deployment: Run full suite before any changes
- After Prompt Changes: Validate no regressions
- After Model Updates: Test new model configurations
- Weekly: Scheduled regression testing
Interpreting Results
API Reference
For programmatic simulation management, see the Public API v1 Reference.Troubleshooting
Issue: Tests failing unexpectedly
Issue: Tests failing unexpectedly
Problem: Tests that should pass are marked as failed.Solutions:
- Review expected answer - may be too specific
- Check LLM evaluation reasoning for insights
- Adjust expected answer to be more semantic
- Verify agent has access to required knowledge
Issue: Tool call not detected
Issue: Tool call not detected
Problem: Agent uses correct tool but test fails.Solutions:
- Check exact tool name spelling
- Verify expected_tool_args are not too strict
- Review actual_tool_calls in results
- Check if tool was called with different argument names
Issue: Simulation runs too slowly
Issue: Simulation runs too slowly
Problem: Large test suites take very long.Solutions:
- Run tests in parallel (configured automatically)
- Break large datasets into smaller focused sets
- Use faster LLM for non-critical tests
- Run full test suites only before releases
Issue: Inconsistent results
Issue: Inconsistent results
Problem: Same test passes sometimes and fails others.Solutions:
- Lower agent temperature for consistency
- Make expected answers more flexible
- Add multiple acceptable variations
- Check for time-sensitive content in responses
Related
- AI Debugger — Debug agent responses
- Agents — Agent configuration reference
- Monitor and Improve Performance — Analytics workflow
