Hard checks drive gains in LLM answer selection, paper finds

An arXiv paper tackles a common step in using large language models (LLMs) and vision-language models (VLMs): a model produces several candidate answers and something has to pick the best one. According to the authors, that choice usually relies on the model's own confidence, a learned judge model or a domain check, and each has a known weakness. An answer can be fluent but insecure, mathematically plausible but physically infeasible, or rated highly by a judge while quietly breaking a task requirement.

The proposed scoring framework combines a small set of hard checks that every answer must pass with a wider set of softer checks, whose scores are blended into one number per candidate. It has three components: a drafting model that produces the candidates, a configuring model that selects and weights the checks for each task, and scoring models that rate properties no grounded tool can compute.

The authors apply the method to four tasks: writing code that is both correct and secure (CWEval), generating robot manipulation plans (LIBERO with added safety variants), passing hidden tests in competitive programming (LiveCodeBench) and answering questions from retrieved documents (HotpotQA).

An ablation study, which isolates what each component contributes, finds that the largest gains come from combining hard checks with candidate comparison. On tasks where the first sampled answer is often broken or unsafe, this pairing lifts joint correctness-and-safety by up to +0.21 on retrieval-augmented question answering and code-generation safety by up to +0.28 on CWEval. The size of the gain tracks how weak the first sample is. Where that sample is already strong, the gain falls to near zero or turns slightly negative.

One part of the design did not pay off. The per-task layer that selects and weights the softer checks added no measurable value over simpler alternatives. The authors conclude that the grounded hard checks, not the soft-factor configuration, are the source of the gain.

Key facts

  • The framework pairs a few must-pass hard checks with a wider set of softer checks blended into one score per candidate answer.
  • Three components do the work: a drafting model, a configuring model that selects and weights checks per task, and scoring models for properties no grounded tool can compute.
  • It was applied to four tasks, using CWEval, LIBERO with added safety variants, LiveCodeBench and HotpotQA.
  • Hard checks plus candidate comparison lifted joint correctness-and-safety by up to +0.21 (retrieval-augmented QA) and code safety by up to +0.28 (CWEval).
  • The per-task selection and weighting layer added no measurable value over simpler alternatives, and gains neared zero or turned slightly negative where the first sample was already strong.

Why it matters

Choosing among several answers is only as good as the method doing the choosing. The authors point to gaps in the usual options: model confidence, learned judges and domain checks can let through answers that are insecure, physically infeasible or in breach of a task requirement. Their ablation also separates which part of a layered scorer does the work. The credit goes to grounded hard checks used to compare candidates, while the adaptive layer for softer checks showed no measurable benefit.

Who it affects

The work is relevant to people who build systems that sample several outputs from an LLM or VLM and keep one. The tasks studied cover secure code generation, robot manipulation planning, competitive programming and question answering over retrieved documents. It also concerns researchers who rely on judge models or elaborate per-task weighting to rank candidates.

How to use it

The practical reading of the results is to start with checks that every answer must pass and apply them across several candidates. The payoff should be expected mainly where the first sampled answer is often broken or unsafe. Where first answers are already strong, the paper reports gains near zero or slightly below it. The finding on the per-task layer suggests testing simpler alternatives before building a configuring step that selects and weights softer checks.

How solid is it

This is an arXiv preprint, and the results are the authors' own. The method was applied to four tasks, and an ablation study isolated the contribution of each component. The authors also report a negative result about part of their own design, the per-task selection and weighting layer. The headline figures are upper bounds, given for two settings: retrieval-augmented question answering and CWEval. The text used here gives no baseline values and no separate gain figures for LIBERO or LiveCodeBench.

Risks and caveats

Both +0.21 and +0.28 are "up to" values, and they apply to different measures: joint correctness-and-safety in one case, code-generation safety in the other. Their units are not explained. The gain shrinks as the first sample gets stronger and can turn slightly negative, so the method should not be assumed to help everywhere. The text does not say which tasks saw that outcome, and it reports no compute cost, latency or number of candidates per task.

“The per-task layer that selects and weights the softer checks adds no measurable value over simpler alternatives.”

— The paper's authors, in the arXiv abstract