Why Run Experiments?
Test Safely
Data-Driven Decisions
Save Costs
Prevent Regressions
Experiment Workflow
Navigate to Prompts
Start a New Experiment

Start button to initiate a new prompt experiment
Select Base Prompt

Selecting a base prompt for comparison
Edit the Prompt

Editing a prompt variant for testing
- Different instructions or tone
- More/fewer examples
- System prompt modifications
- Response format changes
Configure Experiment Settings
- Dataset - Select existing dataset or generate random samples
- Model - Same as baseline or test a different model
- Provider Keys - Which API keys to use

Experiment configuration with dataset and model selection
Review and Run

Diff viewer showing prompt changes
Analyze Results

Experiment results showing base vs variant outputs
- Compare outputs side-by-side
- Review response quality
- Check token usage and cost
- Identify where variants perform better
What to Test
Prompt Variations
Test different approaches to the same task:- Base Prompt
- Variant A: More Context
- Variant B: Step-by-Step
Model Comparison
Compare different models on the same prompt:- GPT-4o vs GPT-4o-mini - Does the cheaper model work as well?
- GPT-4o vs Claude 3.5 Sonnet - Which provider is better for your use case?
- GPT-4o vs GPT-4o-2024-08-06 - Test new model versions
Parameter Tuning
Experiment with model parameters:Creating Effective Datasets
Use Representative Data
Your test dataset should cover:- Common queries (80% of traffic)
- Edge cases (10%)
- Error-prone scenarios (10%)
Dataset Size Guidelines
- Quick validation: 10-20 examples
- Thorough testing: 50-100 examples
- Statistical significance: 200+ examples
Building Datasets Programmatically
Create datasets from production data:Evaluating Results
Manual Review
For each output pair, ask:- Is the variant more helpful?
- Is it more accurate?
- Is the tone appropriate?
- Is it more concise?
- Does it follow instructions better?
Automated Metrics
Track quantitative improvements:Using External Evaluators
Integrate with evaluation frameworks:- RAGAS Evaluation
- Custom Scoring
Best Practices
Test One Thing at a Time
Test One Thing at a Time
Document Your Hypothesis
Document Your Hypothesis
- What you’re changing
- Why you think it will improve results
- How you’ll measure success
Include Edge Cases
Include Edge Cases
Consider Cost vs Quality Trade-offs
Consider Cost vs Quality Trade-offs
Re-run Experiments Periodically
Re-run Experiments Periodically
Migration Path
- Version control for all prompt changes
- A/B testing in production with traffic splitting
- Real-time comparison of version performance
- Automatic rollback if quality degrades
Alternative Approaches
Production A/B Testing
Test in production with traffic splitting:Variant property to compare real-world performance.
