Constraint-First prompting lifts LLM math accuracy on AIME
TL;DR
- CFR is a training-free two-stage prompt: extract the problem's constraints first, then solve while checking every step against them.
- On DeepSeek-V4-Pro, CFR reportedly lifts AIME 2024 accuracy from 90.8% to 95.8%, with an 8.5-point average gain across benchmarks.
- Routed-CFR uses a regex router to trigger the protocol only on constraint-heavy problems, keeping token overhead below the always-on variant.
A new arxiv paper, Constraint-First Reasoning, argues that many of the arithmetic errors modern LLMs still make on hard math contests are not reasoning failures at all but constraint-violation failures. The model derives a plausible object, then hands back a non-integer, skips a modular reduction, or ignores the encoded answer format the problem actually asked for. The proposed fix is deliberately small. Prompt the model in two stages: first to extract and summarize the constraints entailed by the problem, then to solve while checking intermediate and final results against that summary. No fine-tuning, no tools.
The reported gains are meaningful without being fantastical. On DeepSeek-V4-Pro the authors report an average +8.5 percentage points across benchmarks, with AIME 2024 climbing from 90.8% to 95.8%, AIME 2025 from 80.8% to 91.7%, and CMIMC 2025 from 28.1% to 36.9%. Smaller backbones see smaller lifts, roughly three points on Qwen3.5-35B-A3B and JustRL-1.5B. The always-on version of the protocol costs 1.71x to 2.45x more tokens than direct chain-of-thought, which is why the paper also introduces Routed-CFR, a text-only regex router that only turns the two-stage protocol on when the problem contains restrictive cues.
Why care if you are not on a math benchmark team: constraint-first is the kind of prompt scaffold that ports cleanly. Anywhere the answer has to live in a specific shape, a type signature, a valid JSON schema, a fixed citation form, the same extract-then-check pattern should apply, and it costs nothing but tokens to try.
The honest caveat is the one the paper itself makes. Benefits depend on recoverable constraints and on Stage 1 actually extracting them correctly; the authors' own audit shows a 15.6% hallucination rate in Stage 1 even on the strongest backbone. What the reporting does not give you is a head-to-head against retrieval-augmented verifiers, or a test on production traffic outside curated competition sets. Still, for teams shipping a math tutor or a code-gen tool with hard output-format rules this week, the technique is worth the afternoon it takes to A/B.
Shared on Bluesky by 2 AI experts
Originally reported by arxiv.org
Read the original article →Original headline: Constraint-First Reasoning: A Training-Free Protocol for Exploiting Answer-Space Constraints in Mathematical Problem Solving