- Generate synthetic benchmark datasets to test evaluator accuracy and coverage
- Use few-shot examples to guide LLM generation for more consistent outputs
- Create agent-specific datasets that cover happy paths, edge cases, and adversarial scenarios
- Upload datasets to Phoenix and run experiments to validate your evaluators
Notebook Walkthrough
We will go through key code snippets on this page. To follow the full tutorial, check out the notebook or video above.Google Colab
colab.research.google.com
Strategy 1: Creating Synthetic Benchmark Datasets
Goal: Create a synthetic dataset that allows you to test the accuracy and coverage of your evaluator. Use Case: Feed the generated dataset into an LLM-as-a-Judge or other evaluator to ensure it correctly labels intent, identifies errors, and handles a variety of query types including edge cases and noisy inputs. Synthetic data is especially useful when you want to stress-test evaluators such as an LLM-as-a-Judge across a wide range of scenarios. By generating examples systematically, you can cover straightforward cases, tricky edge cases, ambiguous queries, and noisy inputs, ensuring your evaluator captures different angles of behavior.Generate Customer Support Queries
Upload Dataset to Phoenix

Test LLM Judge Effectiveness
Now let’s test how well an LLM-as-a-Judge performs on our synthetic dataset:
Strategy 2: Using Few-Shot Examples for Dataset Generation
Goal: Guide the LLM to generate synthetic examples that reflect different types of queries and scenarios while maintaining consistent labeling and structure. Few-shot prompting allows you to guide an LLM by showing a handful of examples, which helps produce more consistent and realistic outputs. This approach is particularly useful for testing evaluators because it ensures the synthetic dataset reflects patterns, labels, and structures the evaluator is expected to handle.Generate Examples with Few-Shot Prompting
Upload Few-Shot Dataset

Test LLM Judge Effectiveness

Strategy 3: Creating Synthetic Datasets for Agents
Goal: Build synthetic test data that captures a wide range of queries to evaluate an agent’s reliability and safety. Use Case: Test how an agent handles in-scope requests, refuses out-of-scope queries, and manages edge cases, adversarial inputs, and noisy data. When creating synthetic datasets for agents, first define the agent’s capabilities and boundaries (tools, in-scope vs. out-of-scope). Then organize queries into categories to ensure balanced coverage:- Happy-path: simple, common requests
- Complex: multi-step or reasoning-heavy
- Adversarial / refusal: out-of-scope or unsafe
- Edge cases: ambiguous or incomplete inputs
- Noise: typos, slang, multilingual
Generate Agent Test Dataset
Upload Agent Dataset

Best Practices for Synthetic Dataset Generation
- Set Clear Goals – Define scenarios, edge cases, and failure modes to test.
- Structure Prompts – Use JSON schemas, validation rules, and explicit output formats.
- Ensure Coverage – Mix positive/negative cases, edge conditions, and diverse inputs.
- Validate Data – Check schema compliance, logical consistency, and realism.
- Refine Iteratively – Test, find gaps, and improve prompts and datasets.


