scripts: add thinking probes for measuring what controls reasoning#6
Conversation
Companion to spine-probes, different question: whether a model actually
reasons, and what controls it.
render_check.py compares what the chat template renders per kwarg value via
/apply-template, deterministic and needing no statistics,
and optionally diffs that against a local jinja2 render of
the same file to show when the server overrides the template
thinking_ab.py interleaved sampling across the same arms, classifying
reasoned-and-parsed vs reasoned-but-unparsed vs not-reasoned
persona_ab.py crosses a persona system prompt against the kwarg, with the
two structurally-impossible cells as a control
These come out of getting a result wrong (TheTom#5). We reported the enable_thinking
kwarg as inert on Laguna S 2.1, reasoning from the template source, which sets
default(false). The template reading was correct; the conclusion was not,
because the server supplies that kwarg itself when the client omits it, so the
default is unreachable.
Two habits are baked in as a result. Reading is not measuring, so render_check
inspects rendered output rather than source. And a finding needs a cell where it
cannot happen, so both sampling tools carry a control arm.
Both sampling tools interleave arms, vary prompt shape, disable the prompt cache
with a unique nonce per request, and hold max_tokens fixed with no retry. Our
first pass did none of that and produced 5/5 against 0/5 that was mostly
artifact. Manufactured consistency is indistinguishable from a strong result by
inspection.
Signed-off-by: Christopher Maher <chris@mahercode.io>
|
Read all four files before commenting, since that is the house style here. This is a genuinely useful addition and I hope it merges. The Two observations from our stack, one of which might earn a README line. 1. Server-vs-local disagreement has a second cause the README does not name: the server may not be running the template file you passed. We hit this in the wild. Our rev 2. Scope note, fine to leave as-is: The raw JSON from the #5 runs would be worth having in-repo alongside these, since the scripts encode the method and the JSON is the evidence. |
Follow-up to #5, as offered there.
Three small tools, standard library only, no install step. They live in
scripts/thinking-probes/rather than alongside the spine probes, since theymeasure a different thing: whether the model reasons, not how it behaves under
integrity pressure. Happy to move or merge them if you would rather one
directory.
render_check.py/apply-template. Deterministic, no sampling, no statistics. Optionally diffs against a local jinja2 render of the same file.thinking_ab.pypersona_ab.pyrender_check.pyis the one I would reach for first. Against our endpoint itreproduces the whole of #5 in a single command:
That
SERVER OVERRIDES TEMPLATEline is the thing I wish had existed a weekago. It is the difference between reading a template and measuring one.
The README states the two habits these encode: reading is not measuring, and a
finding needs a cell where it cannot happen. It also documents the artifact that
produced our wrong result, since the failure mode is invisible from the outside.
Verified against a live gfx1151 endpoint before opening: all three run, exit
clean, no em or en dashes in any added file so
check_guides.pyis unaffected.I have not committed the raw JSON from the #5 runs, 280KB across 117 requests
with full response bodies and reasoning traces. Say the word and I will add it
here or attach it to the issue, whichever you prefer.
Assisted-by: Claude Code (Opus), reviewed and run by me against a live endpoint