Skip to main content
Source Code: src/gaia/eval/

Overview

The Agent Eval framework is designed for CI/CD integration. You can run evaluations on every push, compare results against baselines, detect regressions, and control costs with per-scenario budgets and timeouts. This guide covers:
  • Setting up GitHub Actions workflows
  • Baseline management for regression detection
  • Cost budgeting strategies
  • Interpreting scorecard diffs between releases

Quick Start: GitHub Actions

Here’s a minimal workflow that runs the RAG quality scenarios on every push:
.github/workflows/agent-eval.yml
The Agent UI backend requires a running Lemonade Server for inference. In CI, you can either:
  • Use a cloud LLM provider via --backend pointing to a hosted instance
  • Pre-install Lemonade Server in your CI environment
  • Use a self-hosted runner with AMD hardware

Baseline Workflow

Regression detection works by comparing scorecard results between runs. The typical workflow:

1. Establish a Baseline

After a known-good release, save the scorecard as a baseline:
This writes eval/results/baseline.json. Commit this file to your repository.

2. Compare Against Baseline

On subsequent runs, compare the current results against the saved baseline:
When only one path is provided, it’s compared against eval/results/baseline.json automatically.

3. Explicit Two-File Comparison

Compare any two scorecards directly:

Complete Baseline CI Workflow

.github/workflows/agent-eval-regression.yml

Cost Budgeting

Per-Scenario Budget

The --budget flag sets the maximum USD spend per scenario:
When a scenario exceeds its budget, it receives the BUDGET_EXCEEDED status and is excluded from quality metrics.

Typical Costs

Costs depend on the judge model. The default claude-sonnet-4-6 is cost-effective. Using claude-opus-4.1 as the judge increases costs ~5x but may improve scoring accuracy for edge cases.

Cost-Optimized CI Strategy

Run different tiers of evaluation based on the trigger:
.github/workflows/agent-eval-tiered.yml

Interpreting Scorecard Diffs

When you run --compare, the output shows per-scenario deltas:

Regressions (PASS to FAIL)

Regressions are highlighted and should block the PR. The trace file (traces/simple_factual_rag.json) contains the full conversation, dimension scores, and reasoning to help diagnose the issue.

Improvements (FAIL to PASS)

Score Drops Within Same Status

Even if the status stays PASS, a score drop of more than 2.0 points triggers a warning — the scenario is getting closer to failing.

Category-Level Changes


JUnit Output for CI

Generate JUnit XML output for integration with CI dashboards (e.g., GitHub Actions test summary):
The JUnit output maps:
  • Each scenario = one test case
  • PASS = test passed
  • FAIL = test failed (with failure message from root cause analysis)
  • BLOCKED_BY_ARCHITECTURE = test skipped
  • Infrastructure statuses = test errored

Timeout Management

The --timeout flag sets the base timeout per scenario in seconds. The runner automatically scales it based on scenario complexity:
CI recommendations:

Custom Scenario Directories

Use --scenario-dir to include scenarios from external directories:
Similarly, use --corpus-dir for additional corpus directories:

Best Practices for CI

Do

  • Run --audit-only on every push (free)
  • Use --category to limit CI costs on PRs
  • Save baselines after each release
  • Upload eval/results/ as artifacts
  • Set timeout-minutes on the job
  • Use --budget to cap per-scenario costs
  • Trigger full benchmarks via workflow_dispatch

Don't

  • Run the full benchmark (all scenarios) on every commit
  • Skip --compare — regressions are the whole point
  • Use --fix in CI (patches should be reviewed by humans)
  • Ignore BLOCKED_BY_ARCHITECTURE — track these as known issues
  • Set budget too low ($0.50) — scenarios may hit BUDGET_EXCEEDED
Never use --fix in CI pipelines. Fix mode patches source code directly and should only be used in local development where changes can be reviewed before committing.

Next Steps

Getting Started

Run your first eval and read the scorecard

Scenario Authoring

Write custom scenarios with YAML and ground truth

CLI Reference

Complete flag reference for gaia eval agent

Agent Eval Benchmark

Architecture deep-dive and scoring internals