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: .agents/conventions.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,6 +141,7 @@ Grader types use kebab-case everywhere.
141
141
- Internal TypeScript may keep shared LLM grader implementation names, but new authored evals should not use `llm-grader` as a public type.
142
142
- Output `scores[].type`: use the authored grader type when available, such as `"llm-rubric"`, `"g-eval"`, or `"is-json"`.
143
143
- Registry keys: `registry.register('llm-rubric', ...)` for the authored rubric surface, with `llm-grader` retained as internal/shared implementation plumbing.
144
+
- Public SDK assertion helpers and authored YAML schemas must not expose `llm-grader`; use `llmRubricGrader()` / `type: llm-rubric` or `type: agent-rubric`.
144
145
145
146
Source of truth: `GRADER_KIND_VALUES` in `packages/core/src/evaluation/types.ts`.
146
147
@@ -149,10 +150,10 @@ Backward compatibility:
149
150
- Snake_case is accepted in YAML by `normalizeGraderType()` in `grader-parser.ts`, for example `llm_rubric` -> `llm-rubric`.
150
151
- Single-word types such as `contains`, `equals`, `regex`, `latency`, and `cost` are unchanged.
151
152
152
-
Two type definitions exist and must stay in sync:
153
+
Public and internal type definitions intentionally differ for internal-only grader plumbing:
153
154
154
-
-`EvaluatorKind` in `packages/core/src/evaluation/types.ts`
155
-
-`AssertionType` in `packages/sdk/src/assertion.ts`
155
+
-`GraderKind` in `packages/core/src/evaluation/types.ts` includes internal/runtime keys such as `llm-grader`.
156
+
-`AssertionType` in `packages/sdk/src/assertion.ts` includes public authored assertion types only.
Copy file name to clipboardExpand all lines: apps/web/src/content/docs/docs/v4.42.4/evaluation/eval-cases.mdx
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ tests:
86
86
target: gpt4_target
87
87
assertions:
88
88
- name: depth_check
89
-
type: llm-grader
89
+
type: llm-rubric
90
90
prompt: ./graders/depth.md
91
91
```
92
92
@@ -111,7 +111,7 @@ tests:
111
111
skip_defaults: true
112
112
assertions:
113
113
- name: custom_eval
114
-
type: llm-grader
114
+
type: llm-rubric
115
115
# Does NOT get latency_check
116
116
```
117
117
@@ -330,14 +330,14 @@ The `criteria` field is a **data field** that describes what the response should
330
330
331
331
### No `assertions` — implicit LLM grader
332
332
333
-
When a test has no `assertions` field, a default `llm-grader` grader runs automatically and uses `criteria` as the evaluation prompt:
333
+
When a test has no `assertions` field, a default `llm-rubric` grader runs automatically and uses `criteria` as the evaluation prompt:
334
334
335
335
```yaml
336
336
tests:
337
337
- id: simple-eval
338
338
criteria: Assistant correctly explains the bug and proposes a fix
339
339
input: "Debug this function..."
340
-
# No assertions → default llm-grader evaluates against criteria
340
+
# No assertions → default llm-rubric evaluates against criteria
341
341
```
342
342
343
343
Suite-level `preprocessors` also apply to this implicit grader. That matters when the agent output is a `ContentFile` block rather than plain text:
@@ -355,13 +355,13 @@ tests:
355
355
356
356
### `assertions` present — explicit graders only
357
357
358
-
When `assertions` is defined, only the declared graders run. No implicit grader is added. Graders that are declared (such as `llm-grader`, `code-grader`, or `rubrics`) receive `criteria` as input automatically.
358
+
When `assertions` is defined, only the declared graders run. No implicit grader is added. Graders that are declared (such as `llm-rubric`, `script`, or `rubrics`) receive `criteria` as input automatically.
359
359
360
360
If `assertions` contains only deterministic graders (like `contains` or `regex`), the `criteria` field is not evaluated and a warning is emitted:
361
361
362
362
```
363
363
Warning: Test 'my-test': criteria is defined but no grader in assertions
364
-
will evaluate it. Add 'type: llm-grader' to assertions, or remove criteria
364
+
will evaluate it. Add 'type: llm-rubric' to assertions, or remove criteria
365
365
if it is documentation-only.
366
366
```
367
367
@@ -373,7 +373,7 @@ tests:
373
373
criteria: Response is helpful and mentions the fix
Copy file name to clipboardExpand all lines: apps/web/src/content/docs/docs/v4.42.4/graders/llm-graders.mdx
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,14 +12,14 @@ LLM graders use a language model to evaluate agent responses against custom crit
12
12
13
13
## Default Grader
14
14
15
-
When a test defines `criteria` but has **no `assertions` field**, a default `llm-grader` runs automatically. The built-in prompt evaluates the response against your `criteria` and `expected_output`:
15
+
When a test defines `criteria` but has **no `assertions` field**, a default `llm-rubric` runs automatically. The built-in prompt evaluates the response against your `criteria` and `expected_output`:
16
16
17
17
```yaml
18
18
tests:
19
19
- id: simple-eval
20
20
criteria: Correctly explains the bug and proposes a fix
21
21
input: "Debug this function..."
22
-
# No assertions needed — default llm-grader evaluates against criteria
22
+
# No assertions needed — default llm-rubric evaluates against criteria
23
23
```
24
24
25
25
When `assertions`**is** present, no default grader is added. To use an LLM grader alongside other graders, declare it explicitly. See [How criteria and assertions interact](/docs/v4.42.4/evaluation/eval-cases/#how-criteria-and-assertions-interact).
@@ -31,12 +31,12 @@ Reference an LLM grader in your eval file:
31
31
```yaml
32
32
assertions:
33
33
- name: semantic_check
34
-
type: llm-grader
34
+
type: llm-rubric
35
35
prompt: file://graders/correctness.md
36
36
target: grader_gpt_5_mini # optional: route this grader to a named LLM target
37
37
```
38
38
39
-
Use `target:` when you want different `llm-grader` entries in the same eval to run on different grader models. This is useful for grader panels, majority-vote ensembles, and grader A/B benchmarks.
39
+
Use `target:` when you want different `llm-rubric` entries in the same eval to run on different grader models. This is useful for grader panels, majority-vote ensembles, and grader A/B benchmarks.
40
40
41
41
## Prompt Files
42
42
@@ -100,26 +100,26 @@ tests:
100
100
row: 1
101
101
assertions:
102
102
- name: dexter_semantic
103
-
type: llm-grader
103
+
type: llm-rubric
104
104
prompt: file://prompts/dexter-grader.md
105
-
rubrics:
105
+
value:
106
106
- operator: correctness
107
-
criteria: Uses the provided ticker and company.
107
+
outcome: Uses the provided ticker and company.
108
108
```
109
109
110
110
## Per-Grader Target
111
111
112
-
By default, an `llm-grader` uses `defaults.grader` from the resolved config graph.
112
+
By default, an `llm-rubric` uses `defaults.grader` from the resolved config graph.
113
113
Override it per grader when you need multiple grader models in one run:
114
114
115
115
```yaml
116
116
assertions:
117
117
- name: grader-gpt
118
-
type: llm-grader
118
+
type: llm-rubric
119
119
target: grader_gpt_5_mini
120
120
prompt: ./prompts/pass-fail.md
121
121
- name: grader-haiku
122
-
type: llm-grader
122
+
type: llm-rubric
123
123
target: grader_claude_haiku
124
124
prompt: ./prompts/pass-fail.md
125
125
```
@@ -178,7 +178,7 @@ When using TypeScript templates, configure them in YAML with optional `config` d
178
178
```yaml
179
179
assertions:
180
180
- name: custom-eval
181
-
type: llm-grader
181
+
type: llm-rubric
182
182
prompt:
183
183
command: [bun, run, ../prompts/custom-grader.ts]
184
184
config:
@@ -190,7 +190,7 @@ The `config` object is available as `ctx.config` inside the template function.
190
190
191
191
## Preprocessing File Outputs
192
192
193
-
If an agent returns a `ContentFile` block instead of plain text, you can preprocess that file into text before `llm-grader` builds the candidate prompt.
193
+
If an agent returns a `ContentFile` block instead of plain text, you can preprocess that file into text before `llm-rubric` builds the candidate prompt.
194
194
195
195
AgentV always tries a default UTF-8 text read first. That is enough for text-based formats such as CSV, JSON, SQL, Markdown, YAML, HTML, XML, and plain text. For binary formats such as `.xlsx`, `.pdf`, or `.docx`, add a preprocessor command:
196
196
@@ -205,7 +205,7 @@ tests:
205
205
input: Generate the spreadsheet report
206
206
assertions:
207
207
- name: spreadsheet-check
208
-
type: llm-grader
208
+
type: llm-rubric
209
209
prompt: |
210
210
Check whether the transformed spreadsheet text contains the revenue rows:
211
211
@@ -220,7 +220,7 @@ Resolution order:
220
220
- if no preprocessor matches, AgentV falls back to a UTF-8 text read
221
221
- if the fallback read looks binary or invalid, the grader receives a warning note instead of failing the test run
222
222
223
-
The implicit default `llm-grader` also inherits suite-level `preprocessors`, so you can omit `assertions` and still preprocess file outputs before grading.
223
+
The implicit default `llm-rubric` also inherits suite-level `preprocessors`, so you can omit `assertions` and still preprocess file outputs before grading.
224
224
225
225
See [`examples/features/preprocessors/`](../../../../../examples/features/preprocessors/) for a runnable example with a file-producing target and a custom preprocessor script.
0 commit comments