text stringlengths 0 59.1k |
|---|
{ type: "meanScore", min: 0.8 }, |
{ type: "passRate", min: 0.9, scorerId: "exactMatch" }, |
]; |
``` |
All criteria must pass for the run to succeed. Criteria marked `severity: "warn"` don't fail the run but are reported in the summary. |
#### `label` and `description` |
Human-readable strings for dashboards and logs: |
```ts |
label: "Nightly Regression Suite", |
description: "Validates prompt changes against production scenarios." |
``` |
#### `tags` |
Array of strings attached to the run for filtering and search: |
```ts |
tags: ["nightly", "production", "v2-prompts"]; |
``` |
#### `metadata` |
Arbitrary key-value data included in the run result: |
```ts |
metadata: { |
branch: "feature/new-prompts", |
commit: "abc123", |
environment: "staging", |
} |
``` |
#### `experiment` |
Binds the run to a named experiment in VoltOps: |
```ts |
experiment: { |
name: "support-regression", |
id: "exp-123", // optional - explicit experiment ID |
autoCreate: true, // optional - create experiment if missing (default: true) |
} |
``` |
When `autoCreate` is true and the experiment doesn't exist, VoltOps creates it on first run. |
#### `voltOps` |
VoltOps integration settings: |
```ts |
voltOps: { |
client: voltOpsClient, // optional - SDK instance |
triggerSource: "ci", // optional - "ci", "manual", "scheduled", etc. |
autoCreateRun: true, // optional - defaults to true |
autoCreateScorers: true, // optional - register scorers in VoltOps |
tags: ["regression", "v2"], // optional - additional tags |
} |
``` |
## Dataset Items |
Each item in the dataset has this structure: |
```ts |
interface ExperimentDatasetItem { |
id: string; // unique identifier |
input: unknown; // passed to runner |
expected?: unknown; // passed to scorers |
label?: string | null; // human-readable description |
extra?: Record<string, unknown> | null; // additional metadata |
datasetId?: string; // VoltOps dataset ID (auto-populated) |
datasetVersionId?: string; // VoltOps version ID (auto-populated) |
datasetName?: string; // Dataset name (auto-populated) |
metadata?: Record<string, unknown> | null; // item-level metadata |
} |
``` |
The `input` and `expected` types are generic - use any structure your runner and scorers expect. |
## Scorers |
Scorers compare runner output to expected values or apply custom validation. Each scorer returns a result with: |
- `status` - `"success"`, `"error"`, or `"skipped"` |
- `score` - Numeric value (0.0 to 1.0 for normalized scorers) |
- `metadata` - Additional context (e.g., token counts, similarity details) |
- `reason` - Explanation for the score (especially for LLM judges) |
- `error` - Error message if status is `"error"` |
### Heuristic Scorers (No LLM Required) |
```ts |
import { scorers } from "@voltagent/scorers"; |
// String comparison |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.