r/PiCodingAgent • u/mrclrchtr • 6h ago
Use-case Sonnet didn't reach for Jev in `codemode` on its own: 38 wordings and ~700 runs to find a trigger that works
I asked Sonnet 5.5 in Pi "which of these 150 issues report a bug?" Jev was available and codemode was on. It listed the issues and judged them from the titles. Its reasoning: "most are clear from the title alone". It missed about a third of the bugs.
So I added a rule to the rules list of the system prompt saying when to use Jev. Nothing changed: 0 of 24 runs used it. I then spent two days benchmarking wordings and places for that one hint, 8 to 32 runs each:
| What I tried | Runs that used Jev |
|---|---|
| A long rule listing when to use it | 0 of 24 |
| A recommendation without a reason | 2 of 24 |
| Praise for Jev (fast, cheap, reliable, as accurate as you) | 3 of 48 |
| General doubt ("you have not read these texts") | 6 of 48 |
| "…judges better than their titles do" | 98 of 120 |
That last one worked, but only because it names the exact shortcut Sonnet was taking. I wanted something that doesn't depend on titles. What finally did it was one sentence appended to codemode's line in the tool list, telling the model what its question is:
Asking which of many texts are of a kind is a classification: run it with Jev (
models.classify) on each full text in the codemode script that fetches them. It is fast and costs almost nothing.
31 of 32 runs used Jev with that, and F1 went from 0.68 to 0.80 (found about 26 of the 32 bugs instead of 20).
Two things I learned on the way:
- Describing the tool does nothing. The model already believes it doesn't need it.
- Placement matters. The same sentence did better on the tool's line in the tool list than in the rules list (23 of 32 against 16 of 32).
It doesn't always pay off: on 300 code review comments the hint fired too, with the same answers and a slower run.
Method and results: Repo
Caveat: one model and one provider setup (Sonnet 5.5 through Claude Code). Through the plain Anthropic provider an earlier version of the hint fired in only 1 of 8 runs, and I don't know why yet. I will analyze it.


