> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vizra.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Vizra Evals

> Write agent evals as Pest tests. Keep every result — scores, judge reasoning, cost — with baselines, regression gates, and a dashboard.

Your AI agent passed yesterday. Vizra Evals is how you prove it didn't get worse today.

Pest tells you whether a test passed *this run*. Vizra Evals records **every** run — sampled scores, pass rates, LLM-judge reasoning, tool calls, token cost — so you can hold a baseline, fail CI when quality regresses, and watch your agent trend over time. Built for agents on the official [Laravel AI SDK](https://github.com/laravel/ai).

```php tests/Evals/SupportBotTest.php theme={null}
use App\Agents\SupportBot;

it('answers support questions from documented policy', function () {
    expect(SupportBot::class)->toPassEval(fn ($eval) => $eval
        ->dataset(base_path('evals/support.jsonl'))
        ->samples(3)
        ->assert(fn ($a, $row) => $a
            ->notEmpty()->gate()
            ->contains($row->expected())
            ->costBelow(0.02))
        ->judge('Answers using only documented store policy.', min: 7)
        ->gate(minScore: 0.8, maxRegressions: 0)
    );
});
```

```bash Terminal theme={null}
./vendor/bin/pest             # evals skipped — zero tokens, zero cost
./vendor/bin/pest --evals     # evals run against the real model, every result recorded
```

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/evals/quickstart">
    Your first recorded eval — from install to a baseline-gated CI check in five minutes.
  </Card>

  <Card title="Baselines & Regressions" icon="chart-line" href="/evals/baselines-and-regressions">
    The core idea: every run compared against the run you trusted, row by row.
  </Card>

  <Card title="The LLM Judge" icon="gavel" href="/evals/judge">
    Structured-output scoring with persisted reasoning — and calibration against human labels.
  </Card>

  <Card title="Assertions Reference" icon="list-check" href="/evals/assertions">
    30+ checks against the real AgentResponse: tool calls, cost, tokens, multi-turn.
  </Card>

  <Card title="Dashboard" icon="chart-mixed" href="/evals/dashboard">
    Score trends, per-sample drill-downs, judge reasoning, and run comparison in your browser.
  </Card>

  <Card title="Datasets" icon="database" href="/evals/datasets">
    JSONL, CSV, Eloquent — or replay real production conversations.
  </Card>
</CardGroup>

## Why recorded evals?

<CardGroup cols={2}>
  <Card title="Agents are nondeterministic" icon="dice">
    One sample proves nothing. Every row runs N times; results are pass rates and score distributions, not single booleans.
  </Card>

  <Card title="Pass/fail is a policy, not a verdict" icon="scale-balanced">
    Scores are the primary output. Gates — minimum score, pass rate, zero regressions — are applied at the run level, where they belong.
  </Card>

  <Card title="A run that isn't persisted is worthless" icon="database">
    Every run, sample, assertion, and judge rationale lands in your database. Six weeks from now you can answer "when did quality drop, and on which inputs?"
  </Card>

  <Card title="Cheap checks first, expensive checks last" icon="filter">
    Deterministic assertions run before LLM judges; gate failures skip the judge entirely. Broken samples never burn judge tokens.
  </Card>
</CardGroup>

<Info>
  Using **pestphp/pest-plugin-evals**? The two coexist happily — see [Vizra Evals vs pest-plugin-evals](/evals/vs-pest-plugin-evals). Coming from the **Vizra ADK** evaluation system? See the [migration guide](/evals/migrate-from-vizra-adk).
</Info>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.