Skip to content

Commit ff2380c

Browse files
committed
Clean up eval config
1 parent a1fc084 commit ff2380c

5 files changed

Lines changed: 33 additions & 33 deletions

File tree

‎docs/evals/README.md‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,18 @@
11
# Skill evals
22

3-
Promptfoo evals for the two agent skills in `src/wagtail_cli/.agents/skills/`, run through the OpenCode SDK provider on TensorX with `z-ai/glm-5.3-flash` as the default model under test.
3+
Evaluation suites for the agent skills that are [bundled with the CLI](../agent-skills.md). Running with Promptfoo, with models taken from [Wagtail agentic engineering recommendations](https://wagtail.org/ai/agentic-engineering-recommendations/).
44

5-
Each suite (`wagtail_api_skill.yaml`, `wagtail_docs_skill.yaml`) runs every test against two arms that differ by exactly one tool:
5+
For each skill, we run two suites: a baseline with nothing loaded, and one with our skills. We test:
66

7-
| Arm | Tools | Question answered |
8-
| --- | --- | --- |
9-
| baseline | none | What can the model do from its own knowledge? |
10-
| skill | `skill`, allowed to load only that suite's skill | Does loading the skill help? |
11-
12-
- Skill activation: rows restricted to the skill arm assert with `skill-used` that a fundamental task phrased the way a user would (no CLI named) actually loads the skill, and that an unrelated task does not.
13-
- Task completion: both arms are asked for the exact terminal commands, and a grader runs them. `graders/run_api_commands.py` injects `--dry-run --json` into every `wt … api` invocation and runs the block against dummy credentials, then grades the exact requests (method, URL, params, body) — a hallucinated flag exits 2 and matches nothing, and no live Wagtail site is needed. `graders/run_docs_commands.py` runs `wt docs` commands as-is and checks the retrieved content.
14-
- Gotchas with no command answer are graded by rubric, using a second model (`deepseek/deepseek-v4.1-flash`) from a different family so the suite is not grading itself.
15-
16-
Caveats: dry-run grading proves the CLI accepts the commands and builds the right request, not that a live site would accept the payload; the `--dry-run` rewrite drops `VAR=$(wt …)` capture, so prompts supply concrete inputs rather than values discovered from earlier commands. The `read`, `grep`, `glob` and `list` tools are disabled explicitly on both arms: the promptfoo opencode:sdk provider turns them on by default whenever `working_dir` is set, even with `'*': false`, which let the baseline read the repo (including the eval configs, the skills and this README) and answer from there instead of from its own knowledge. The skill arm gets `read` back, scoped with an OpenCode permission rule to `src/wagtail_cli/.agents/skills/**`, so it can follow SKILL.md's links into `references/`; `grep` and `glob` stay off everywhere because their permission rules match the search pattern rather than the file path and so cannot be scoped the same way. This makes the arms differ by the skill tool plus a references-only read, not a single tool — measured, the alternative (no read at all) cost the skill arm its command syntax, which lives in `references/commands.md`. The repo's `AGENTS.md` is still injected into the context of both arms by OpenCode; it describes the project but not the CLI, so it does not teach the baseline any commands.
7+
- Skill activation: whether the skill activates when mentioning potential related tasks, without necessarily directly prompting for "use Wagtail CLI".
8+
- Task completion: whether the CLI commands provided by the agent actually exist, and work as explained, and help in completing the task.
9+
- Gotchas with no command answer. Graded by rubric, using a separate model family.
1710

1811
## Requirements
1912

20-
- promptfoo 0.123.1 or newer (the `skill-used` assertion needs the session-history skill detection missing in 0.122) and `@opencode-ai/sdk` — `just eval-init` installs both.
21-
- The OpenCode CLI, from https://opencode.ai/docs/.
22-
- `wt` on PATH — the graders run the CLI the model names.
13+
- Promptfoo with the OpenCode AI SDK (`just eval-init`)
14+
- [OpenCode CLI](https://opencode.ai/docs/)
15+
- `wt` on PATH. The graders run the CLI from there.
2316
- `TENSORX_API_KEY` — the model under test and the rubric grader both run on TensorX.
2417

2518
## Running
@@ -31,10 +24,10 @@ just eval --repeat 3 # agent runs are noisy; repeat b
3124
just eval-view # dashboard for the latest run
3225
```
3326

34-
`WT_EVAL_MODEL` picks the model under test; it must be registered in `opencode.json` (default `z-ai/glm-5.3-flash`):
27+
`EVAL_MODEL` picks the model under test; it must be registered in `opencode.json` (default `z-ai/glm-5.3-flash`):
3528

3629
```sh
37-
WT_EVAL_MODEL=qwen/qwen3.8-27b just eval
30+
EVAL_MODEL=qwen/qwen3.8-27b just eval
3831
```
3932

4033
## Results snapshot

‎docs/evals/opencode.json‎

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,31 @@
33
"provider": {
44
"tensorx": {
55
"models": {
6-
"z-ai/glm-5.3-flash": {
7-
"name": "GLM 5.3 Flash"
8-
},
9-
"qwen/qwen3.8-27b": {
10-
"name": "Qwen 3.8 27B"
11-
},
12-
"qwen/qwen3.5-9b": {
13-
"name": "Qwen 3.5 9B"
14-
}
6+
"z-ai/glm-5.3-flash": { "name": "GLM 5.3 Flash" },
7+
"qwen/qwen3.8-27b": { "name": "Qwen 3.8 27B" },
8+
"qwen/qwen3.5-9b": { "name": "Qwen 3.5 9B" }
159
},
1610
"name": "TensorX",
1711
"npm": "@ai-sdk/openai-compatible",
1812
"options": {
1913
"apiKey": "{env:TENSORX_API_KEY}",
2014
"baseURL": "https://api.tensorx.ai/v1"
2115
}
16+
},
17+
"neuralwatt": {
18+
"name": "Neuralwatt",
19+
"npm": "@ai-sdk/openai-compatible",
20+
"options": {
21+
"apiKey": "{env:NEURALWATT_API_KEY}",
22+
"baseURL": "https://api.neuralwatt.com/v1"
23+
},
24+
25+
"models": {
26+
"deepseek-v4.1-flash": { "name": "Deepseek V4.1 Flash" },
27+
"glm-5.3-flash": { "name": "GLM 5.3 Flash" },
28+
"glm-5.3": { "name": "GLM 5.3" },
29+
"qwen-3.8-27b": { "name": "Qwen 3.8 27B" }
30+
}
2231
}
2332
},
2433
"skills": {

‎docs/evals/wagtail_api_skill.yaml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@ providers:
2121
- id: opencode:sdk
2222
label: baseline
2323
config: &opencode
24-
provider_id: tensorx
25-
model: '{{ env.WT_EVAL_MODEL | default("z-ai/glm-5.3-flash", true) }}'
26-
apiKey: '{{ env.TENSORX_API_KEY }}'
24+
provider_id: '{{ env.EVAL_PROVIDER | default("tensorx", true) }}'
25+
model: '{{ env.EVAL_MODEL | default("z-ai/glm-5.3-flash", true) }}'
2726
working_dir: ../..
2827
tools:
2928
'*': false

‎docs/evals/wagtail_docs_skill.yaml‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ providers:
1010
- id: opencode:sdk
1111
label: baseline
1212
config: &opencode
13-
provider_id: tensorx
14-
model: '{{ env.WT_EVAL_MODEL | default("z-ai/glm-5.3-flash", true) }}'
15-
apiKey: '{{ env.TENSORX_API_KEY }}'
13+
provider_id: '{{ env.EVAL_PROVIDER | default("tensorx", true) }}'
14+
model: '{{ env.EVAL_MODEL | default("z-ai/glm-5.3-flash", true) }}'
1615
working_dir: ../..
1716
# The arms differ in the `skill` tool and permission. Note: with
1817
# `working_dir` set, the promptfoo opencode:sdk provider turns on the

‎justfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ eval *args="":
8787
shift
8888
fi
8989
for config in ${configs}; do
90-
OPENCODE_CONFIG="$PWD/docs/evals/opencode.json" promptfoo eval -c "${config}" --no-cache "$@"
90+
OPENCODE_CONFIG="$PWD/docs/evals/opencode.json" promptfoo eval -c "${config}" "$@"
9191
done
9292
9393
# Open the promptfoo viewer for the most recent eval results.

0 commit comments

Comments
 (0)