Powered by Vitest
Evaluate your existing AI code with Vitest handling execution, watch mode, and retries.
Run evaluations against real datasets, score outputs, and inspect results. Use your own models and infrastructure. Powered by Vitest.
Why Viteval
Keep your models and agent frameworks. Choose your scoring criteria, storage, and where evaluations run.
Evaluate your existing AI code with Vitest handling execution, watch mode, and retries.
Check exact answers and structured output, or use embeddings and LLM judges. Set a per-case threshold to fail regressions.
Start with local datasets and results, or connect supported storage and evaluation platforms.
Run the same evaluations on your laptop, in CI, or in your cloud. You choose the infrastructure.
Evaluation workflow
Write an eval, run your cases, and inspect failures.
import { evaluate, scorers } from 'viteval';
import { classifyTicket } from './support-agent';
evaluate('Support routing', {
data: [
{ input: 'I was charged twice.', expected: 'billing' },
{ input: 'Reset my password.', expected: 'account' },
{ input: 'Cancel my subscription.', expected: 'billing' },
],
task: ({ input }) => classifyTicket(input),
scorers: [scorers.exactMatch()],
});❯ pnpm exec viteval run
RUN v5.0.3
src/support-routing.eval.ts (3 cases)
2 passed1 failed3 cases
Process exited with code 1
Results
| Name | Output | Mean | Threshold | Result |
|---|---|---|---|---|
| billing | 1.00 | 1 | Passed | |
| account | 1.00 | 1 | Passed | |
| account | 0.00 | 1 | Failed | |
Integrations
Load datasets and save results with local files, cloud storage, or supported evaluation platforms.