For AI agents: the complete documentation index is available at https://viteval.dev/llms.txt, the full documentation bundle is available at https://viteval.dev/llms-full.txt, and this page is available as Markdown at https://viteval.dev/index.md.
V1 release candidate available. V0 support ends at the v1 launch.Migrate to v1 →
Star on GitHub
v1.0.0-rc.3

Evaluate prompts and agentsin TypeScript.

Test extraction, routing, and generated answers against reference cases. Score each output, inspect failures locally, and fail CI when a case falls below your threshold. Built on Vitest.

order-extraction.eval.ts
❯pnpm exec viteval run
RUN v5.0.3
src/order-extraction.eval.ts / Order extraction
✓Where is order ORD-1042?5ms
✓Please cancel ord-2087.1ms
✓How do I update my address?1ms
Test Files1 passed(1)
Tests3 passed(3)
ScorerExactMatch: 1 on each case
Duration355ms
Used by

Why Viteval

Evals belong beside your tests.

Keep your application code, TypeScript, and Vitest workflow. Viteval adds the evaluation pieces.

Built on Vitest

Import your application functions into evaluations. Use Vitest configuration, watch mode, retries, and CI exit codes.

Built-in and custom scorers

Check exact answers and structured output, or use embeddings and LLM judges. Set a per-case threshold to fail regressions.

Local-first by default

Run evaluations and inspect results on your machine. Connect a hosted provider only when you choose.

Run on your infrastructure

The same evaluations on your laptop, in CI, or on a runner you control. You choose where the data lives.

Evaluation workflow

Evaluate order-ID extraction

Check normalization and missing values without an API key.

order-extraction.eval.ts
import { evaluate, scorers } from 'viteval';
import { orderMessages } from './order-extraction.dataset';

evaluate('Order extraction', {
  data: orderMessages,
  task: ({ input }) => input.match(/\bORD-\d+\b/i)?.[0].toUpperCase() ?? '',
  scorers: [scorers.exactMatch()],
});

Integrations

Dataset and result storage

Keep results in local JSON, or connect your preferred storage and evaluation tools.

View integrations

Run your first evaluation.

Open source. No hosted account required.