Constraint-Aware Test-Time Scoring for LLM and VLM Candidate Selection
Abstract
When an LLM or VLM produces several candidate answers, picking the best one usually relies on the model's own confidence, a learned judge model, or a domain check. 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. We propose a scoring framework that combines a small set of hard checks every answer must pass with a wider set of softer checks whose scores are blended into one number per candidate. This adaptive scoring framework consists of 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. We apply our proposed method to four tasks: writing code that is both correct and secure (CWEval), generating robot manipulation plans (LIBERO with added safety variants), passing competitive-programming hidden tests (LiveCodeBench), and answering questions from retrieved documents (HotpotQA). An ablation study isolates the contribution of each component and 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 (retrieval-augmented QA) and code-generation safety by up to +0.28 (CWEval), with the size of the gain tracking how weak the first sample is, falling to near zero or slightly negative where it is already strong. The per-task layer that selects and weights the softer checks adds no measurable value over simpler alternatives. This builds a unified scoring framework, together with an ablation that identifies the grounded hard checks, not the soft-factor configuration, as the source of the gain.
Create a lesson
Metadata
- Comments
- 25 pages, 1 figure, 7 tables
Related papers
HSRM: Hidden-State Reward Models for Test-Time Verification
Shared title terminologycs.AIXianzhi Li, Xiaodan Zhu
Rethinking the Test-Time Prompt Tuning Objective from the Perspective of Calibration
Shared title terminologycs.AIJungwon Choi, Hyeonseo Jang, Kibok Lee et al.
vSFT: Learning to Verbally Tune Agents at Test Time
Shared title terminologycs.AIQishuai Wen, Rui Chen, Haiwen Li et al.
Uncertainty-Aware Candidate Generation for Entity Linking in Cyber Threat Intelligence
Shared title terminologycs.AINasser Alkhulaifi, Direnc Pekaslan, Christian Wagner
MeterRouter: Budget-Aware Dynamic Routing for Multi-Agent Systems
Shared title terminologycs.AIYue Xu, Leikun Yin, Ruiming Min et al.
What Does Skill Lift Actually Measure? A Source-Code-Level Audit and Noise-Aware Reanalysis of SkillsBench
Shared title terminologycs.AIHaozhe Zhang, Zhen Long