Skip to main content
Source Code: eval/scenarios/

Overview

Scenarios are YAML files that define multi-turn conversations the eval agent will simulate against the live Agent UI. Each scenario specifies a persona, documents to index, user objectives per turn, and ground truth for scoring. The runner discovers scenarios automatically via recursive glob under eval/scenarios/. Place your YAML file in the appropriate category subdirectory and it will be picked up on the next run.

Scenario YAML Format

Here is the complete schema with all fields documented:

Key Field Rules

When expected_answer is non-null, the judge applies strict automatic-zero rules: wrong numbers (>5% deviation), wrong names, lazy refusals (saying “I can’t find that” without calling the query tool), and hallucinated sources all result in a correctness score of 0.

Categories

Place scenario files in the appropriate subdirectory under eval/scenarios/:
Category is a free-text label used for grouping and --category filtering — the runner does not validate it against a fixed enum, so you can introduce a new category simply by using it. The categories above are the ones currently in the suite.

Personas

Each scenario specifies a persona that shapes how the eval agent crafts user messages. Nine personas are built in (any non-empty custom string is also accepted):
Use power_user for straightforward RAG tests. Use adversarial_user for scenarios that test failure modes. Use casual_user to test whether the agent handles real-world ambiguity.

Step-by-Step: Write a Custom Scenario

Step 1: Choose Your Category and Persona

Decide what aspect of agent behavior you’re testing, and which user persona best exercises it.

Step 2: Identify or Create Corpus Documents

Check eval/corpus/manifest.json for existing documents. If you need a new document:
  1. Add the file to eval/corpus/documents/
  2. Update eval/corpus/manifest.json with the document entry and facts (see Corpus Management below)

Step 3: Write the YAML

Create a new file at eval/scenarios/<category>/<your_scenario_id>.yaml:

Step 4: Validate

Run your scenario in isolation:
Review the trace file at eval/results/<run_id>/traces/budget_threshold_check.json for detailed scoring and reasoning.

Step 5: Iterate

If the scenario is flaky (passing/failing inconsistently):
  • Make success_criteria more specific
  • Add expected_answer with exact values
  • Add note fields to clarify edge cases for the judge
  • Consider whether the persona is too ambiguous

Corpus Management

The test corpus lives in eval/corpus/ with a manifest that defines documents and their ground truth facts.

Directory Structure

Manifest Format

The manifest (eval/corpus/manifest.json) defines documents and their ground truth facts:

Adding a New Document

  1. Create the document file in eval/corpus/documents/:
  1. Add a document entry to manifest.json:
  1. Validate the manifest:

Document Formats

Fact Difficulty Levels


The 7 Scoring Dimensions In-Depth

Correctness (25%)

Factual accuracy against ground truth. The most heavily weighted dimension. Scoring guide:
  • 10 = Exact match with ground truth
  • 7 = Minor omission but core fact correct
  • 4 = Partially correct
  • 0 = Wrong answer, hallucination, or invented facts
Automatic zero rules (when expected_answer is non-null):
  • Wrong number: ground truth is specific and response deviates >5%
  • Wrong name: different person or entity named
  • Lazy refusal: says “I can’t find that” without calling the query tool
  • Hallucinated source: claims a fact “from the document” that contradicts ground truth
Numerical precision:

Tool Selection (20%)

Whether the agent chose the right tools in the right order.
  • 10 = Optimal tool chain
  • 7 = Correct tools with 1-2 extra calls
  • 4 = Wrong tool but recovered
  • 0 = Completely wrong tools or skipped required tools

Context Retention (20%)

Whether the agent used information from prior turns.
  • 10 = Perfect recall and pronoun resolution
  • 7 = Mostly remembered, minor gaps
  • 4 = Missed key context from prior turns
  • 0 = Completely ignored conversation history
Capped at 4 if the agent re-asks for information already established in a prior turn.

Completeness (15%)

Whether all parts of the question were answered.
  • 10 = Every aspect addressed
  • 7 = Most parts answered
  • 4 = Partial answer
  • 0 = Didn’t answer the question

Efficiency (10%)

Whether the agent took the optimal path.
  • 10 = Minimal necessary tool calls
  • 7 = 1-2 extra steps
  • 4 = Redundant work
  • 0 = Tool loop (3+ identical calls)

Personality (5%)

GAIA voice and tone compliance.
  • 10 = Concise, direct, professional
  • 7 = Neutral tone
  • 4 = Generic AI hedging (“As an AI, I…”)
  • 0 = Sycophantic or overly verbose

Error Recovery (5%)

Graceful handling of failure conditions.
  • 10 = Graceful fallback with helpful message
  • 7 = Recovered after retry
  • 4 = Partial recovery
  • 0 = Gave up without explanation

Real Examples

RAG Quality: Simple Factual Lookup

Context Retention: Cross-Turn File Recall

Personality: Honest Limitation

Adversarial: Empty File

Tool Selection: Smart Discovery


Best Practices

What Makes a Good Scenario

Do

  • Use specific, verifiable ground truth facts
  • Test one behavior per scenario (single responsibility)
  • Provide both ground_truth AND success_criteria
  • Include expected_answer with exact values when possible
  • Add note fields to clarify ambiguous cases
  • Test negative cases (expected_answer: null)

Don't

  • Write vague success criteria (“Agent responds helpfully”)
  • Test multiple unrelated behaviors in one scenario
  • Assume the agent has context from other scenarios
  • Use subjective quality judgments as pass criteria
  • Create scenarios that depend on external services
  • Omit ground_truth when exact answers are available

Avoiding Flaky Scenarios

A flaky scenario passes and fails inconsistently across runs. Common causes:
  1. Vague success criteria — “Agent provides a good answer” is too subjective. Be specific: “Agent states the Q3 revenue was $14.2 million.”
  2. Missing expected_answer — Without an exact expected value, the judge has more latitude. Always provide expected_answer when the fact is deterministic.
  3. Ambiguous persona behavior — If user_message is omitted, the eval agent generates messages from objective + persona. For critical tests, provide an explicit user_message to remove variability.
  4. Timing-sensitive tests — Don’t test time-dependent behavior (e.g., “What day is it?”). Ground truth must be static.
  5. External dependencies — Don’t rely on external URLs, APIs, or services that may be unavailable.

Next Steps

Getting Started

Run your first eval and read the scorecard

CI/CD Integration

Automate eval runs in GitHub Actions

CLI Reference

Complete command reference for gaia eval agent

Agent Eval Benchmark

Architecture details, scoring pipeline, and internals