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
Adds suite metadata inheritance and structured llm-grader prompt context via existing input, metadata, and rubrics variables. Supports reusable prompt files for rubric/score-range modes and Dexter-style rubric criteria aliases.
Copy file name to clipboardExpand all lines: apps/web/src/content/docs/docs/graders/llm-graders.mdx
+41-7Lines changed: 41 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Reference an LLM grader in your eval file:
29
29
assertions:
30
30
- name: semantic_check
31
31
type: llm-grader
32
-
prompt: ./graders/correctness.md
32
+
prompt: file://graders/correctness.md
33
33
target: grader_gpt_5_mini # optional: route this grader to a named LLM target
34
34
```
35
35
@@ -69,12 +69,44 @@ Score the response from 0.0 to 1.0 based on:
69
69
| `output_text` | Last candidate response content |
70
70
| `expected_output_text` | Last expected message content |
71
71
| `criteria` | Test `criteria` field |
72
-
| `input` | Full resolved input array, JSON-serialized |
73
-
| `expected_output` | Full resolved expected array, JSON-serialized |
74
-
| `output` | Full provider output array, JSON-serialized |
72
+
| `input` | Resolved input text |
73
+
| `expected_output` | Reference answer text |
74
+
| `output` | Candidate answer text |
75
+
| `metadata` | Test metadata as formatted JSON |
76
+
| `metadata_json` | Test metadata as compact JSON |
77
+
| `rubrics` | LLM-grader rubric items as formatted JSON |
78
+
| `rubrics_json` | LLM-grader rubric items as compact JSON |
75
79
| `file_changes` | Unified diff of workspace file changes (populated when `workspace` is configured) |
76
80
| `tool_calls` | Formatted summary of tool calls from agent execution (tool name + key inputs per call) |
77
81
82
+
Use `prompt: file://path/to/prompt.md` to reuse a markdown prompt file. Bare `prompt: "..."` strings are treated as inline prompt text, not file paths.
83
+
84
+
Structured task input belongs in `input`. If `input` is a message whose `content` is a JSON object, `{{input}}` renders that object as formatted JSON for the grader prompt; no separate grader-only input field is required. Use `metadata` for provenance or suite-level source fields, and `rubrics_json` for rubric arrays.
85
+
86
+
Suite-level `metadata` is inherited by every test. When rubric items vary per test, keep the grader on each test and reuse the prompt file:
0 commit comments