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: docs/evals/README.md
+10-17Lines changed: 10 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,18 @@
1
1
# Skill evals
2
2
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/).
4
4
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:
6
6
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.
17
10
18
11
## Requirements
19
12
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.
23
16
-`TENSORX_API_KEY` — the model under test and the rubric grader both run on TensorX.
24
17
25
18
## Running
@@ -31,10 +24,10 @@ just eval --repeat 3 # agent runs are noisy; repeat b
31
24
just eval-view # dashboard for the latest run
32
25
```
33
26
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`):
0 commit comments