Skip to main content
This tutorial walks you through a complete evaluation workflow with a practical example. You’ll create a simple dataset, run evaluations, and view results—giving you hands-on experience before diving into advanced concepts.
Time: 20-30 minutesPrerequisites:
  • ABV SDK installed (Python or JS/TS)
  • API key configured
  • Basic understanding of traces

The Example: Email Response Quality

We’ll build an evaluation system for an AI that generates customer service email responses. Our goal is to measure:
  • Politeness: Is the tone professional and courteous?
  • Completeness: Does it address all customer questions?
  • Accuracy: Is the information correct?
This is a common real-world use case that demonstrates key evaluation concepts.

Step 1: Create a Simple Dataset

First, let’s create a small dataset with 3 test cases. Each case has an input (customer email) and expected qualities.
What we did:
  • Created a dataset named email-responses-v1
  • Added 3 test cases covering different scenarios (damaged product, password help, frustrated customer)
  • Each case has input data and expected qualities we want to verify

Step 2: Run Your First Evaluation

Now let’s run our AI model on each test case and evaluate the results.
What we did:
  • Created a dataset run to track this specific evaluation
  • Generated AI responses for each test case
  • Recorded outputs so we can score them

Step 3: Score the Results

Now we’ll add scores to evaluate quality. We’ll use both automated and manual scoring.

Option A: LLM-as-a-Judge (Automated)

Use another LLM to evaluate the responses:

Option B: Custom Scoring (Rule-Based)

Create simple rules to check specific criteria:

Step 4: View Results in the Platform

Now go to the ABV platform to see your results:
  1. Navigate to EvaluationsDatasets
  2. Find your dataset: email-responses-v1
  3. Click on the run: “Initial evaluation”
  4. Review scores for each test case
You’ll see:
  • Overall score statistics (average, min, max)
  • Individual test case results
  • Scores breakdown by dimension (politeness, completeness)
  • Comments explaining each score
What to look for:
  • Which test cases scored lowest? Those need attention.
  • Are scores consistent across dimensions?
  • Do comments explain the reasoning clearly?

Step 5: Iterate and Improve

Based on the results, let’s improve our AI and re-evaluate:
Now you can compare the two runs side-by-side in the platform to see improvements!

What You’ve Learned

Congratulations! You’ve completed a full evaluation workflow: Created a dataset with realistic test cases ✅ Ran evaluations on your AI outputs ✅ Applied scores using both LLM-as-a-Judge and custom rules ✅ Viewed results in the ABV platform ✅ Iterated by running a second evaluation with improvements

Expand Your Dataset

  • Add 10-20 more test cases covering edge cases
  • Include examples from production errors
  • Balance positive and negative examples
Read: Datasets Best Practices

Advanced Scoring

Automation

Integration


Common Questions

Start with 10-20 high-quality test cases covering key scenarios. Add more as you find gaps. Quality > quantity—focus on representative, real-world examples.
Use both! Custom scoring is fast and deterministic for clear criteria (e.g., “contains word X”). LLM-as-a-Judge is better for nuanced qualities like tone or helpfulness.
  • During development: Every time you change prompts or models
  • In production: Daily or weekly automated runs
  • For experiments: Before and after each change to measure impact
Yes! You can score production traces directly without creating datasets. This is called “online evaluation.” See Evaluations Overview for details.

Troubleshooting

Dataset not showing up?
  • Wait a few seconds for the data to sync
  • Check your API key permissions
  • Verify you’re looking in the correct project
Scores not calculating?
  • Ensure observations are created before scoring
  • Check that score values are between 0 and 1
  • Verify your scoring function returns the correct format
Can’t compare runs?
  • Both runs must be on the same dataset
  • Scores must have the same names across runs
  • Allow time for score aggregation to complete
For more help, see Evaluations Troubleshooting FAQ

Complete Example Code

Want the full working example? Here’s everything in one place:

You’re now ready to build comprehensive evaluation systems for your LLM applications! 🎉