Skip to content

Plumb effort through prompt config; bump reviewer to Opus 5 - #27

Merged
mattgodbolt merged 1 commit into
mainfrom
molty/effort-plumbing
Jul 29, 2026
Merged

Plumb effort through prompt config; bump reviewer to Opus 5#27
mattgodbolt merged 1 commit into
mainfrom
molty/effort-plumbing

Conversation

@mattgodbolt-molty

Copy link
Copy Markdown
Contributor

Check-up step two: the effort experiment plus the reviewer-model bump.

Effort plumbing: model.effort in a prompt YAML now flows through as output_config: {effort: ...}, validated at load. The prompt-test runner also now calls build_api_payload directly rather than duplicating the thinking/temperature resolution, so experiments run exactly what production would send.

Sweep verdict — production unchanged. Across all 21 cases with thinking disabled, effort made no measurable difference to latency (7.2 s p50 at every level) or cost (within 1.5%), and accuracy was best at the default high (18/21 vs 16/21 at medium/low). Effort mostly modulates thinking depth, and with thinking off there is nothing to modulate. So app/prompt.yaml deliberately does not set it; the plumbing is for the useThinking path and future experiments. Findings recorded in CLAUDE.md.

Reviewer: default bumped from Opus 4.7 to Opus 5 (same $5/$25, better reviews). One behavioural fix that the bump forced: on Opus 5 an omitted thinking field runs adaptive by default, which would have silently turned --reviewer-thinking off into thinking-on. The reviewer now always sends an explicit thinking config, and thinking-enabled reviews get max_tokens: 4096 since thinking counts against the budget. Smoke-tested in both modes.

🤖 Generated with Claude Code

https://claude.ai/code/session_012jJRqmqhE11VAc3biKbxUY

- Prompt supports optional model.effort (low/medium/high/xhigh/max),
  emitted as output_config: {effort: ...}; validated at config load.
- prompt_testing runner now calls build_api_payload directly instead of
  mirroring its thinking/temperature logic - one source of truth, and
  experiments exercise exactly what production sends.
- Reviewer default claude-opus-4-7 -> claude-opus-5 (same price, better
  review). Thinking is now always explicit on the reviewer request: on
  Opus 5 an omitted thinking field runs adaptive by default, which would
  silently defeat --reviewer-thinking off. Thinking-enabled reviews get
  max_tokens 4096 since thinking counts against the budget.
- Effort sweep results (21 cases, thinking disabled): latency and cost
  flat across low/medium/high, accuracy best at high (18/21 vs 16/21).
  Production therefore stays on the API default (high); the plumbing
  matters for the useThinking path and future experiments. Variant YAMLs
  kept for reproducibility; findings recorded in CLAUDE.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012jJRqmqhE11VAc3biKbxUY
@mattgodbolt
mattgodbolt merged commit 1f5934a into main Jul 29, 2026
2 checks passed
@mattgodbolt
mattgodbolt deleted the molty/effort-plumbing branch July 29, 2026 23:37
mattgodbolt-molty added a commit that referenced this pull request Jul 30, 2026
…tent (#29)

Final check-up documentation pass. **Stacked on #28** (both touch
CLAUDE.md); GitHub will retarget this to main when #28 merges — merge
#28 first.

- **Records the prompt-caching evaluation and rejection** with the data:
~104 fresh Claude calls/day against a 5-minute cache TTL and a prefix
fragmented by language/arch/audience/type; generous math says
~$0.40/fortnight saved of ~$22 spend, and the restructuring needed to
clear Sonnet 5's 1024-token minimum cacheable prefix isn't paid for. The
note includes the revisit threshold (~50x traffic, or sustained >3
same-combo req/hour for the 1-hour TTL) and the CloudWatch query to
rerun the analysis.
- **Condenses the whole document** (137 -> 103 lines, nothing
load-bearing lost): merges Project Structure and the workflow notes into
Overview/Development Commands, adds the prompt-test workflow as a
first-class step before prompt changes, drops historical narration (the
1536-token era), dedupes the thinking gotchas, and documents the
`build_api_payload` single-source-of-truth rule established in #27.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_012jJRqmqhE11VAc3biKbxUY

---------

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants