You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/web/src/content/docs/docs/evaluation/eval-files.mdx
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -264,6 +264,34 @@ For local sources, omit `checkout.resolve`. If you need to pin the local clone t
264
264
MY_REPO_LOCAL_PATH=/home/dev/repos/my-repo
265
265
```
266
266
267
+
## Per-Test Template Variables
268
+
269
+
Eval YAML also supports per-test `vars` for data-driven prompt templates. Use `{{name}}` placeholders in test-facing text fields, and AgentV resolves them when the suite loads.
270
+
271
+
```yaml
272
+
input: "Answer clearly: {{question}}"
273
+
274
+
tests:
275
+
- id: capital
276
+
vars:
277
+
question: What is the capital of France?
278
+
expected_answer: Paris
279
+
criteria: "Answers {{question}} correctly"
280
+
input:
281
+
- role: user
282
+
content: "Question: {{question}}"
283
+
expected_output: "{{expected_answer}}"
284
+
```
285
+
286
+
### Behavior
287
+
288
+
- `vars`is defined per test as an object
289
+
- `{{name}}`and dotted paths like `{{ user.name }}` are supported
290
+
- Substitution applies to suite-level `input`, test `input`, `input_files`, `criteria`, `expected_output`, and conversation turn `input` / `expected_output`
291
+
- When the whole string is a single placeholder, the original JSON value is preserved
292
+
- Missing variables are left unchanged, so unrelated template syntax is not silently blanked out
293
+
- `vars` interpolation is separate from environment interpolation: `{{question}}`uses test data, `${{ PROJECT_NAME }}` uses environment variables
294
+
267
295
## JSONL Format
268
296
269
297
For large-scale evaluations, AgentV supports JSONL (JSON Lines) format. Each line is a single test:
0 commit comments