Skip to content

Commit 94e91a5

Browse files
authored
fix(eval): remove public preprocessor authoring (#1656)
1 parent f0f768f commit 94e91a5

21 files changed

Lines changed: 59 additions & 57 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Plain assertion strings are short-form rubric criteria: AgentV groups them into
113113
`llm-rubric` and writes each criterion to `grading.json.assertion_results` for the
114114
Dashboard. Use explicit `type: llm-rubric` when you need weights, required flags, or
115115
`score_ranges`, or when you need a custom grader prompt, grader target, or
116-
preprocessing; use string `value` for free-form rubric checks. Executable
116+
output transforms; use string `value` for free-form rubric checks. Executable
117117
graders use `type: script`.
118118

119119
The target can be an eval-local object when this eval needs target settings of its own:

apps/web/src/content/docs/docs/next/evaluation/eval-cases.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ default_test:
416416
? output.find((block) => block?.type === "file" && block.path?.endsWith(".xlsx"))
417417
: undefined;
418418
if (!file) return output;
419-
const result = Bun.spawnSync(["bun", "run", "scripts/preprocessors/xlsx-to-csv.ts"], {
419+
const result = Bun.spawnSync(["bun", "run", "scripts/transforms/xlsx-to-csv.ts"], {
420420
stdin: JSON.stringify({ path: file.path, media_type: file.media_type })
421421
});
422422
if (result.exitCode !== 0) throw new Error(new TextDecoder().decode(result.stderr).trim());

apps/web/src/content/docs/docs/next/evaluation/examples.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ default_test:
117117
? output.find((block) => block?.type === "file" && block.path?.endsWith(".xlsx"))
118118
: undefined;
119119
if (!file) return output;
120-
const result = Bun.spawnSync(["bun", "run", "../scripts/preprocessors/xlsx-to-csv.ts"], {
120+
const result = Bun.spawnSync(["bun", "run", "../scripts/transforms/xlsx-to-csv.ts"], {
121121
stdin: JSON.stringify({ path: file.path, media_type: file.media_type })
122122
});
123123
if (result.exitCode !== 0) throw new Error(new TextDecoder().decode(result.stderr).trim());
@@ -133,7 +133,7 @@ tests:
133133
- Output contains the transformed spreadsheet text including the revenue rows
134134
```
135135

136-
See [`examples/features/preprocessors/`](../../../../../examples/features/preprocessors/) for a runnable end-to-end example with a file-producing target and custom grader target.
136+
See [`examples/features/file-transforms/`](../../../../../examples/features/file-transforms/) for a runnable end-to-end example with a file-producing target and custom grader target.
137137

138138
## Tool Trajectory
139139

apps/web/src/content/docs/docs/next/graders/llm-graders.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ LLM graders use a language model to evaluate agent responses against custom crit
1212

1313
Put semantic grading requirements in `assert`. Plain strings are
1414
handled by the built-in `llm-rubric` rubric grader. Use `type: llm-rubric` when you
15-
need a custom prompt, target, or grader-specific preprocessing:
15+
need a custom prompt, target, or grader-specific transform:
1616

1717
```yaml
1818
tests:
@@ -207,7 +207,7 @@ default_test:
207207
? output.find((block) => block?.type === "file" && block.path?.endsWith(".xlsx"))
208208
: undefined;
209209
if (!file) return output;
210-
const result = Bun.spawnSync(["bun", "run", "scripts/preprocessors/xlsx-to-csv.ts"], {
210+
const result = Bun.spawnSync(["bun", "run", "scripts/transforms/xlsx-to-csv.ts"], {
211211
stdin: JSON.stringify({ path: file.path, media_type: file.media_type })
212212
});
213213
if (result.exitCode !== 0) throw new Error(new TextDecoder().decode(result.stderr).trim());
@@ -235,7 +235,7 @@ Resolution order:
235235
- if no transform is configured, AgentV falls back to a UTF-8 text read
236236
- if the fallback read looks binary or invalid, the grader receives a warning note instead of failing the test run
237237

238-
See [`examples/features/preprocessors/`](../../../../../examples/features/preprocessors/) for a runnable example with a file-producing target and a spreadsheet conversion script.
238+
See [`examples/features/file-transforms/`](../../../../../examples/features/file-transforms/) for a runnable example with a file-producing target and a spreadsheet conversion script.
239239

240240
## Available Context Fields
241241

examples/features/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Focused examples for specific AgentV capabilities. Find your use case below, the
2222
| [assert-set](assert-set/) | Safety gate and weighted assertion groups |
2323
| [threshold-grader](threshold-grader/) | Pass a test if a configurable percentage of sub-graders pass |
2424
| [multi-turn-conversation](multi-turn-conversation/) | Grade a multi-turn conversation with per-turn score breakdowns |
25-
| [preprocessors](preprocessors/) | Convert `ContentFile` outputs with `default_test.options.transform` before `llm-rubric` runs |
25+
| [file-transforms](file-transforms/) | Convert `ContentFile` outputs with `default_test.options.transform` before `llm-rubric` runs |
2626

2727
---
2828

@@ -159,7 +159,7 @@ Focused examples for specific AgentV capabilities. Find your use case below, the
159159
| [local-cli](local-cli/) | Workspace & targets |
160160
| [multi-turn-conversation](multi-turn-conversation/) | LLM grading |
161161
| [nlp-metrics](nlp-metrics/) | Deterministic assertions |
162-
| [preprocessors](preprocessors/) | LLM grading |
162+
| [file-transforms](file-transforms/) | LLM grading |
163163
| [prompt-template-sdk](prompt-template-sdk/) | TypeScript SDK |
164164
| [repo-lifecycle](repo-lifecycle/) | Workspace & targets |
165165
| [rubric](rubric/) | LLM grading |

examples/features/preprocessors/.agentv/providers/file-output.ts renamed to examples/features/file-transforms/.agentv/providers/file-output.ts

File renamed without changes.

examples/features/preprocessors/.agentv/providers/grader-check.ts renamed to examples/features/file-transforms/.agentv/providers/grader-check.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ writeFileSync(
1717
score: passed ? 1 : 0,
1818
assertions: [
1919
{
20-
text: 'preprocessed file content reached the llm grader',
20+
text: 'transformed file content reached the llm grader',
2121
passed,
2222
evidence: passed
2323
? 'found transformed spreadsheet text in prompt'
File renamed without changes.

examples/features/preprocessors/README.md renamed to examples/features/file-transforms/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Demonstrates how `default_test.options.transform` turns `ContentFile` outputs in
1313

1414
```bash
1515
# From repository root
16-
bun apps/cli/src/cli.ts eval examples/features/preprocessors/evals/suite.yaml --target file_output
16+
bun apps/cli/src/cli.ts eval examples/features/file-transforms/evals/suite.yaml --target file_output
1717
```
1818

1919
Expected result: the eval passes because the grader sees the transformed spreadsheet text from `generated/report.xlsx`.
@@ -24,4 +24,4 @@ Expected result: the eval passes because the grader sees the transformed spreads
2424
- `.agentv/targets.yaml` - custom file-producing target and custom grader target
2525
- `.agentv/providers/file-output.ts` - emits a relative `ContentFile` path
2626
- `.agentv/providers/grader-check.ts` - passes only when transformed text reaches the grader prompt
27-
- `scripts/preprocessors/xlsx-to-csv.ts` - example spreadsheet conversion script
27+
- `scripts/transforms/xlsx-to-csv.ts` - example spreadsheet conversion script

examples/features/preprocessors/evals/suite.yaml renamed to examples/features/file-transforms/evals/suite.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ default_test:
2121
return matchers.some((matcher) => mediaType === matcher || filePath.endsWith(matcher));
2222
});
2323
if (!file || typeof file.path !== "string") return output;
24-
const result = Bun.spawnSync(["bun","run","../scripts/preprocessors/xlsx-to-csv.ts"], {
24+
const result = Bun.spawnSync(["bun","run","../scripts/transforms/xlsx-to-csv.ts"], {
2525
stdin: JSON.stringify({ path: file.path, media_type: file.media_type })
2626
});
2727
if (result.exitCode !== 0) {
28-
throw new Error(new TextDecoder().decode(result.stderr).trim() || "preprocessor command failed");
28+
throw new Error(new TextDecoder().decode(result.stderr).trim() || "transform command failed");
2929
}
3030
return new TextDecoder().decode(result.stdout).trim();
3131
})()

0 commit comments

Comments
 (0)