Looking for agent evals? This page documents ADK’s legacy CSV-based evaluation system. Its successor, Vizra Evals, runs evals as Pest tests, records every run to a database, auto-baselines, and fails CI on regressions. Start with the Quickstart or the ADK migration guide.
Why Testing Matters - Just like you wouldn’t ship code without tests, don’t deploy AI agents without evaluations! Evaluations give you confidence that your agents will handle real-world scenarios gracefully, consistently, and professionally.
What Are Evaluations?
Think of evaluations as unit tests for your AI agents! They help you:CSV-Based Testing
Define test cases in simple CSV files - no complex setup required!
Automated Validation
Run hundreds of tests automatically with built-in assertions
LLM-as-Judge
Use AI to evaluate subjective qualities like helpfulness
Result Tracking
Export results to CSV for analysis and CI/CD integration
Creating Your First Evaluation
Step 1: Generate the Evaluation Class
Let’s create an evaluation to test a customer support agent! Run this magical command:Terminal
app/Evaluations/CustomerSupportEvaluation.php:
app/Evaluations/CustomerSupportEvaluation.php
Step 2: Add Your Test Data
Now for the fun part - adding test scenarios! The CSV file was automatically created with standard headers. Let’s populate it with different customer interactions:app/Evaluations/data/customer_support_evaluation.csv
Your Assertion Toolbox
Vizra ADK provides a rich collection of assertions to validate every aspect of your agent’s responses!Content Assertions
Length & Structure
Quality Checks
Safety & Security
LLM as Judge - The Ultimate Quality Check
Sometimes you need another AI to evaluate subjective qualities. That’s where LLM-as-Judge comes in!When to Use LLM Judge? - Perfect for evaluating:
- Helpfulness and professionalism
- Empathy and emotional intelligence
- Creativity and originality
- Accuracy of complex responses
- Overall response quality
Using LLM Judge Assertions
app/Evaluations/CustomerSupportEvaluation.php
Three Judge Patterns
1. Pass/Fail Judge For binary decisions - returns{"pass": true/false, "reasoning": "..."}
{"score": 8.5, "reasoning": "..."}
{"scores": {...}, "reasoning": "..."}
Running Your Evaluations
Time to put your agent to the test! Let’s see how it performs!Running from CLI
Terminal
What You’ll See
Watch the magic happen with a beautiful progress bar and detailed results!Console Output
Advanced Example - Putting It All Together
Ready for the full experience? Here’s a complete evaluation implementation that showcases all the techniques!app/Evaluations/CustomerSupportEvaluation.php
Analyzing Your Results
CSV Output Structure
When you export results with--output, you get a comprehensive CSV report!
CSV Columns Explained:
- Evaluation Name - The name of your evaluation
- Row Index - Which test case from your CSV
- Final Status - pass, fail, or error
- LLM Response - What your agent actually said
- Assertions (JSON) - Detailed results of each check
Creating Custom Assertions
Need something specific? Create your own reusable assertion classes!Simple Example: Product Name Assertion
Let’s create a simple assertion that checks if a product name is mentioned:app/Evaluations/Assertions/ContainsProductAssertion.php
Using Your Custom Assertion
app/Evaluations/ProductReviewEvaluation.php
Generate Assertion Classes with Artisan
Creating new assertions is super easy with our generator command!Terminal
Built-in Custom Assertions
Vizra ADK comes with several ready-to-use custom assertions:ContainsProductAssertion
Check if a product name is mentioned
JsonSchemaAssertion
Validate JSON structure against a schema
PriceFormatAssertion
Verify price formatting in any currency
EmailFormatAssertion
Check for valid email addresses
CI/CD Integration
Make testing automatic! Here’s how to add evaluations to your CI/CD pipeline!.github/workflows/evaluate.yml
Best Practices for Awesome Evaluations
Organization
- CSV Organization - Use clear test types and descriptive columns
- Thorough Testing - Combine multiple assertion types
- LLM Judge - Use for subjective quality checks
- CI/CD Integration - Run evaluations on every push
Quality
- Track Progress - Monitor performance over time
- Real Data - Include actual user queries
- Edge Cases - Test error scenarios too
- Consistency - Use the same criteria across agents
You’re Ready to Test Like a Pro!
With evaluations, you can ship AI agents with confidence! Your agents will be tested, validated, and ready for real-world challenges. Happy testing!Next: Tracing
Learn about debugging with traces
Evaluation API Reference
Detailed evaluation class documentation