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/next/evaluation/eval-files.mdx
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,8 +105,9 @@ Raw cases are just case data:
105
105
```yaml
106
106
# evals/cases/refund-smoke.cases.yaml
107
107
- id: damaged-item
108
-
input: The item arrived damaged. What should support do?
109
-
expected_output: Offer a replacement or refund path.
108
+
vars:
109
+
question: The item arrived damaged. What should support do?
110
+
expected_output: Offer a replacement or refund path.
110
111
```
111
112
112
113
A run-focused eval stays ordinary eval YAML while choosing a target and run controls:
@@ -126,7 +127,10 @@ tests:
126
127
- id: local-edge-case
127
128
vars:
128
129
question: Can a final-sale item be refunded after damage in transit?
129
-
expected_output: Explain the final-sale exception for damaged transit.
130
+
expected_output: Explain the final-sale exception for damaged transit.
131
+
assert:
132
+
- type: llm-rubric
133
+
value: "Matches the reference answer: {{ expected_output }}"
130
134
```
131
135
132
136
The `experiments/` directory is optional and user-owned. AgentV does not infer
@@ -156,7 +160,10 @@ tests:
156
160
- id: addition
157
161
vars:
158
162
question: What is 15 + 27?
159
-
expected_output: "42"
163
+
expected_output: "42"
164
+
assert:
165
+
- type: llm-rubric
166
+
value: "Matches the reference answer: {{ expected_output }}"
160
167
```
161
168
162
169
### Top-level Fields
@@ -214,6 +221,9 @@ prompts:
214
221
default_test:
215
222
vars:
216
223
audience: engineers
224
+
assert:
225
+
- type: llm-rubric
226
+
value: "Matches the reference answer: {{ expected_output }}"
217
227
218
228
targets:
219
229
- id: local-mini
@@ -232,15 +242,15 @@ tests:
232
242
- id: release-notes
233
243
vars:
234
244
topic: the July release notes
235
-
expected_output: concise release-note summary
245
+
expected_output: concise release-note summary
236
246
assert:
237
247
- Identifies the most important change
238
248
- Avoids unsupported details
239
249
- id: roadmap
240
250
vars:
241
251
audience: executives
242
252
topic: the next roadmap phase
243
-
expected_output: concise roadmap summary
253
+
expected_output: concise roadmap summary
244
254
assert:
245
255
- Identifies the main product direction
246
256
- Uses the requested audience framing
@@ -662,16 +672,18 @@ tests:
662
672
- id: capital
663
673
vars:
664
674
question: What is the capital of France?
665
-
expected_answer: Paris
675
+
expected_output: Paris
666
676
criteria: "Answers {{ vars.question }} correctly"
667
-
expected_output: "{{ vars.expected_answer }}"
677
+
assert:
678
+
- type: llm-rubric
679
+
value: "Matches the reference answer: {{ expected_output }}"
668
680
```
669
681
670
682
### Behavior
671
683
672
684
- `vars`is defined per test as an object, with optional defaults from `default_test.vars`
673
685
- `{{ vars.name }}`and dotted paths like `{{ vars.user.name }}` are supported
674
-
- Substitution applies to `prompts`, `criteria`, `expected_output`, assertion values/metrics, and conversation turn `input` / `expected_output` / assertions
686
+
- Substitution applies to `prompts`, `criteria`, `vars.expected_output`, assertion values/metrics, and conversation turn `input` / `expected_output` / assertions
675
687
- When the whole string is a single placeholder, the original JSON value is preserved
676
688
- Missing variables render as empty strings following Nunjucks semantics
677
689
- `vars` interpolation is separate from environment interpolation: `{{ vars.question }}`uses test data, `{{ env.PROJECT_NAME }}` uses environment variables
0 commit comments