Choosing What Not to Flag: Steering LLM Judges Along the Precision-Recall Curve with Demonstrations

Automated error detectors, whether they flag grammar mistakes, mispronunciations or hallucinated sentences in a summary, fail in two ways that do not cost the same. A missed error leaves a flaw in place. A false alarm does active harm: a refinement model then "fixes" text that was fine, a learner gets discouraged, a valid summary gets rejected. Large language models used as judges, meaning frontier models prompted to evaluate other models' outputs, now power many of these detectors, and they reliably lean toward false alarms. On long-document summarization they catch inconsistencies well but flag many correct sentences. Older detectors offered a dial for this: a threshold, or a decoding penalty. A judge that writes out a rationale and a list of flagged spans has no obvious dial.

This note proposes that the in-context demonstrations given to a judge can serve as that dial. These are the worked examples placed in the prompt, and the proposal pays particular attention to clean "near-miss" examples that look suspicious but should not be flagged. The proposal also makes a sharper claim that could turn out false. Post-hoc thresholding only slides a fixed judge along its existing precision-recall curve. Demonstrations of what not to flag might reshape the curve itself, so that the judge ranks errors better and is not merely more cautious. If they only slide along the same curve, thresholding is the cheaper tool and we should say so. If they push the curve outward, demonstrations become a training-free way to buy precision. Separately, we test whether the shift that demonstrations induce can be extracted as a single internal direction in the network and scaled continuously at the cost of one forward pass.

Core Claim

The claim has two parts, each with its own falsification test. First, near-miss clean demonstrations raise an LLM judge's precision at fixed recall beyond what any threshold on the zero-shot judge can reach, which means the precision-recall frontier moves outward. Second, the difference between internal summaries of a "conservative" and an "aggressive" demonstration set can be injected into a query-only forward pass and scaled. This yields a continuous operating-point control for span-level judges whose output is a generated list rather than a single yes/no token.

What the literature gives and where it stops

The motivating evidence comes from three places. A Tale of Evaluating Factual Consistency meta-evaluates eleven evaluators on four long-document benchmarks. Zero-shot GPT-4o and Gemini judges correlate with humans at about r = 0.51–0.54 on UniSumEval, against 0.05–0.21 for entailment-based (NLI) models, but they flag valid sentences often. That paper evaluates only static zero-shot prompts, and we add the steering. LLMRefine shows that in critic-guided refinement, critic precision matters far more than recall, because a low-precision critic makes the generator invent fixes. LLMRefine gets its critic by fine-tuning on human error annotations, whereas we ask whether a frozen judge can be moved there in context. Human evaluators of grammatical error correction prefer high-precision systems (Human Evaluation of Grammatical Error Correction Systems), which is why the BEA-2019 shared task scores systems with $F_{0.5}$, a measure that weights precision twice as heavily as recall.

The existing precision controls all sit outside the prompt. Align-and-Predict Decoding scales the probability of copying the source token during beam search, which traces a precision-recall curve for sequence-to-sequence correctors. It depends on token alignment with a source sentence, so it cannot apply to a judge that writes explanations. Adapting LLMs for Minimal-edit GEC suppresses overcorrection with staged fine-tuning, which fixes one operating point in the weights. The AIP-Tohoku system puts a binary gatekeeper in front of correction, at a known cost to recall. Noisy but Valid takes a judge's true and false positive rates as fixed and corrects for them statistically using a small human calibration set. It also shows that the number of human labels needed grows as the gap between those rates shrinks. That result gives us a downstream payoff to measure: moving the judge to a better point reduces the number of human labels needed for certification.

The method comes from mechanistic work on in-context learning. In-Context Learning Creates Task Vectors shows that demonstrations are compressed into one intermediate-layer activation. Patching that activation into a query-only pass recovers 80–90% of in-context accuracy on single-token tasks. Understanding Task Vectors in In-Context Learning proves that this vector acts as a single rank-one "representative demonstration", which fails on bijection tasks (100% drops to 55% on LLaMA-7B), and it proposes multi-vector injection (TaskV-M) as a fix. This is a constraint on our design. Error detection is plausibly not a monotone mapping, so we must test multi-vector injection rather than assume one vector suffices.

Two papers constrain the interpretation. Dual Operating Modes of In-Context Learning argues that a few demonstrations mainly retrieve a pre-trained task, and only many demonstrations override the prior. If that holds, a few clean examples may do nothing beyond nudging a default "evaluate strictly" behavior. The Illusion of Progress reports that few-shot examples made judging more reliable but did not remove bias, which is consistent with that worry. Token-based Decision Criteria Are Suboptimal in In-context Learning warns that raw label-token probabilities in in-context classification are miscalibrated. That warning affects how we build the thresholding baseline, and it is not evidence that thresholding is useless.

Research Program

We build span-level judges from open-weight models (the Qwen-2.5 and Llama families, so that internal activations are accessible) on three tasks. The first is grammatical error detection framed as a gatekeeper. The judge sees a source sentence and each edit proposed by a fixed high-recall corrector, then accepts or rejects each edit, and the accepted edits are scored with ERRANT on BEA-2019. The second is sentence-level factual-consistency flagging on UniSumEval, LongEval and DiverSumm. The third is binary hallucination detection on HaluEval summarization, where a single yes/no token exists and thresholding is at its strongest.

We vary demonstrations along three axes chosen independently. The first is the ratio of clean to erroneous examples. The second is the kind of clean example: random clean sentences, or near-misses mined as sentences the zero-shot judge wrongly flags on a held-out split. The third is the number of demonstrations $k$, from 2 to as many as fit in context. That third axis probes the retrieval-versus-learning question directly. If precision gains appear only at large $k$, the behavior is being learned. If they saturate at $k=2$ regardless of content, the model is only retrieving a prior.

For the steering dial, we take the mean activation at the final demonstration token under a conservative set and under an aggressive set, at layer $\ell$. Call these $v_{c}$ and $v_{a}$. For a query run without demonstrations, we replace its layer-$\ell$ state $h$ with

$$h' = h + \alpha\,(v_{c} - v_{a}),$$

where $\alpha$ is a scalar swept from negative to positive values. Each value of $\alpha$ gives one operating point, so the sweep traces a curve. We also test injecting several such vectors, one per error category, following TaskV-M. The layer and the range of $\alpha$ are selected on a development split only.

Every method is summarized by its full precision-recall curve on the same test items. The primary statistic is precision at matched recall levels, together with whether one curve dominates another. Secondary statistics are $F_{0.5}$ at the best operating point and the human calibration-set size that Noisy HT needs to certify at a fixed power. The last of these is computed from the measured true and false positive rates.

Baselines

The naive reference point is the zero-shot judge with a standard rubric and chain-of-thought rationale, the regime evaluated in A Tale of Evaluating Factual Consistency, run once at its default operating point. Next is instruction-only steering, a prompt that says "flag only errors you are certain of" or the opposite at several strength levels. This tests whether words alone do what demonstrations do.

The strongest competitor on the core question is post-hoc thresholding of the zero-shot judge. On HaluEval we threshold P(yes)/P(no), using the calibrated decision rule recommended in Token-based Decision Criteria rather than raw token probabilities. On the span tasks we sample the judge $N=16$ times and flag a span only if at least $m$ samples flag it, sweeping $m$. This vote threshold works for generated outputs, and it is the strongest competitor because it already provides a continuous dial with no new ideas. For each method we take its best curve, with the threshold chosen on the same development split, and compare at equal recall. Because vote thresholding uses 16 times the compute, we also report it at matched compute against the single-pass steering vector.

On BEA-2019, the strongest reported external reference is Align-and-Predict Decoding on BART: $F_{0.5}$ = 75.0 at $\lambda = 0.75$, precision 88.1 at $\lambda = 0.25$, and recall 72.0 at $\lambda = 2.50$ (APD), against 71.5 $F_{0.5}$ for a T5-11B baseline. The file gives no exact $F_{0.5}$ for staged-fine-tuned Gemma 2 9B, so that comparison will be rerun rather than quoted. For factual consistency, no reported precision-recall curve for LLM judges on UniSumEval was found on Lacuna; only correlations of about 0.51–0.54 are reported. For HaluEval summarization, the reported ChatGPT accuracy is 58.53% (HaluEval). As an upper reference we train a supervised critic in the style of LLMRefine on the same training split. Its threshold is swept, so we can see how close the training-free methods come.

Two ablations isolate the key ingredient. The first holds the clean-to-erroneous ratio fixed and swaps near-miss clean examples for random clean ones. The second holds the examples fixed and permutes their labels. Beating the strongest baseline means one of two things. The demonstration-steered judge reaches statistically higher precision than vote thresholding at two or more matched recall levels, with a paired bootstrap over items. Or the steering vector matches vote thresholding's curve within confidence intervals at one-sixteenth of the compute.

Why not just…?

Why not just threshold the judge's confidence? This is the real threat. If demonstration-steered operating points fall on the zero-shot judge's own thresholded curve, the first claim is false. Practitioners should then threshold, and the only remaining contribution is a cheaper dial. The matched-recall comparison against both logit and vote thresholding settles this directly. The near-miss ablation tells us whether any advantage comes from content (better ranking) or from label proportion (a shift in the prior that a threshold would reproduce).

Why not just fine-tune the critic? Staged fine-tuning (Adapting LLMs for Minimal-edit GEC) and supervised critics (LLMRefine) work, and we expect them to remain the upper reference. Their cost is that each operating point, domain or user preference requires curated data and a training run. The supervised-critic baseline measures how much of its curve the training-free methods recover. If the gap is large on every task, we will report demonstrations as a low-data convenience and not as a competitor.

Why not just correct the judge statistically, as in Noisy HT? Statistical correction keeps Type-I error valid for any judge (Noisy but Valid). Its power, however, depends on the gap between the true and false positive rates, and a judge that over-flags makes the required human calibration set large. Steering and correction therefore complement each other. We test this by recomputing the needed calibration size at each steered operating point. If steering does not widen the gap, it adds nothing to that pipeline.

Why not just use a decoding penalty like APD? APD scales a source-copy probability during aligned beam search. A judge that emits rationales and span lists has no such copy operation. On BEA-2019, where both apply, we report APD's published numbers next to the gatekeeper judge, so readers can see whether the judge route costs accuracy on the one task where the older dial exists.

Decisive Checks

Three outcomes decide the proposal. If near-miss demonstrations dominate the thresholded zero-shot curve on UniSumEval and BEA-2019, and random clean demonstrations at the same ratio do not, then demonstrations improve ranking and not just caution, and the main claim stands. If gains appear only once $k$ is large, the Dual Operating Modes account is confirmed for judging, and practitioners should be told that a handful of examples sets a prior rather than a boundary. If the scaled steering vector traces a smooth curve for multi-vector injection but not for a single vector, then error detection inherits the rank-one limit identified for bijection tasks. That would give a concrete reason to treat judging criteria as several directions rather than one. A null result on the first check is still useful: it would show cleanly that, for LLM judges, a threshold is all the in-context dial amounts to.