by James Padolsey
The article shows that when an LLM evaluates if text meets a given criterion, the answer already sits in its hidden state before any token is generated. By capturing the hidden representation at a designated seed token and training a small MLP head (with optional LoRA sharpening and isotonic calibration), you get a fast, calibrated classifier that accepts arbitrary English criteria without per-criterion retraining.
- LLMs encode the yes/no answer to a criterion in their hidden states before generating any text, so you can extract a calibrated probability from the hidden state at a seed token (~70% layer depth) instead of generating output.
- A small probe (MLP/linear head) trained on hidden states from a few thousand labeled triples, plus isotonic calibration, generalizes to arbitrary unseen criteria without retraining.
- Training a LoRA to produce one-sentence verdicts (but only reading the resulting hidden state, never generating) sharpens the signal by reshaping the residual stream geometry at the seed position.
- Prefilling content once and treating criteria as short continuations enables cache-efficient scoring against many criteria, though it can fail on cases requiring deep criterion-content interaction, which still need full cross-encoder prompts.
When you feed a prompt that pairs some text with a criterion—say, “Does the writer currently like this product?”—an LLM already houses the yes/no answer in its hidden representations before it even spits out a word. Generation is just the model translating that decision into prose. By grabbing the hidden state at the last prompt token (around layer 70% up) and running it through a tiny probe—an MLP or even a linear head—you get a calibrated probability in milliseconds. No slow judge calls, no expensive token-by-token decoding.
James’s recipe uses an open-source model in the few-billion-parameter range (IBM’s Granite 4.0 micro, for example) and a fixed prompt template ending with a seed token like “Assessment:”. You generate a few thousand (criterion, content, label) triples via a larger model, run them through your base model, capture the hidden state at the seed, and fit your probe. A quick isotonic-regression step then turns raw probe outputs into proper probabilities. Once trained, you can drop any English-written criterion at inference time and get back a calibrated score—no retraining per criterion.
If you want sharper signals, add a LoRA trained not for classification but to write one-sentence verdicts. During LoRA training, a frontier model writes “ASSESSMENT: The content does satisfy the criterion because…” and your LoRA learns that next-token continuation. At inference you still never generate text; you only exploit the reshaped geometry in that seed position. The trick: you teach the model to crystallize the answer in its residual stream, then read that decision directly.
For cache-friendly scoring against many criteria, you can prefill the content once and reuse KV states, treating each new criterion as a short continuation. That late-interaction path matches full-prompt results on most real data but can fail when criterion-content interplay matters at every layer. In those edge cases you must run full cross-encoder prompts. Variation in seed token choice, seed position, and extraction layer all affect accuracy and need tuning.