Should you set the rules before an AI starts writing, rather than hoping it follows them as it goes?
Does constraint-setting before generation change what LLMs can contribute?
This explores whether stating constraints, preconditions, or setup before a model starts writing changes what an LLM is useful for, compared with asking it to honor those constraints while it generates.
This explores whether stating constraints up front, before the model starts generating, changes what an LLM is useful for, compared with asking it to honor constraints as it goes. The corpus says yes, and the reason is architectural. An autoregressive model can't take back a token it has already emitted, while constraint solving depends on discarding invalid partial answers Why does autoregressive generation fail at constraint satisfaction?. Constraints can't be reliably enforced mid-generation. They have to be in place beforehand, or checked by something outside the model. Scale doesn't fix this: across constrained-optimization tasks, models plateau near 55–60% constraint satisfaction regardless of size, architecture, or training Do larger language models solve constrained optimization better?.
What up-front constraint-setting does unlock is knowledge the model already has. LLMs often fail not because they lack the relevant facts but because they never bring unstated preconditions forward as things that matter, which is the old frame problem in a new setting. Forcing the model to list preconditions first raised accuracy from 30% to 85% Do language models fail at identifying unstated preconditions?. Here the constraint-setting is the contribution: it turns latent knowledge into an explicit checklist that generation can then lean on. The same logic works at the system level. Routers pick which model handles a query before any generation happens, by estimating how hard the query is, and cut costs 40–50% Can routers select the right model before generation happens?.
But setting constraints doesn't turn the model into a solver, and apparent success can be misleading. Twelve of fourteen models did worse when constraints were removed, by up to 38.5 percentage points. They were defaulting to the harder-looking option, not evaluating anything Are models actually reasoning about constraints or just defaulting conservatively?. Models don't run iterative numerical methods internally. They pattern-match to memorized solutions Do large language models actually perform iterative optimization?, and RL fine-tuning seems to sharpen that memorization rather than install procedures, since performance drops on out-of-distribution variants Do fine-tuned language models actually learn optimization procedures?. Extra context doesn't supply structure either: long-context models match RAG on semantic lookup but can't execute relational joins Can long-context LLMs replace retrieval-augmented generation systems?. The division of labor this suggests is that people or symbolic solvers hold and check the constraints, and the LLM proposes, enumerates, and fills in.
Two other notes suggest that constraints coming before generation is a design choice rather than a law. Diffusion LLMs refine reasoning and answer together using bidirectional attention, so reasoning can be embedded in place instead of sitting in a prefix Can reasoning and answers be generated separately in language models?. That hints that the ordering problem belongs to left-to-right generation specifically. MAGPIE goes the other way. Given nothing but the pre-query template tokens, aligned models generated 4M instruction pairs that matched human-curated data Can aligned LLMs generate their own training data?. The barest setup unlocks a contribution, data generation, that heavier prompting wasn't needed for. The corpus has little direct evidence on human-facing practices like writing a careful brief before prompting. What it does show is where the architecture forces the issue.
Sources 10 notes
The performance ceiling on constraint satisfaction problems is not a model-quality issue but an architectural limitation: autoregressive transformers cannot retract emitted tokens, while CSP solvers fundamentally depend on discarding invalid partial assignments. Symbolic solver integration works because it supplies what the architecture lacks.
Across constrained-optimization tasks, LLMs converge to ~55–60% constraint satisfaction independent of architecture, parameter count, or training regime. Reasoning models do not systematically outperform standard models, suggesting a fundamental ceiling rather than a scaling gap.
LLMs struggle not from lacking world knowledge but from failing to bring background conditions forward as relevant constraints. Prompting that forces explicit enumeration of preconditions raises accuracy from 30% to 85%, revealing the frame problem persists in statistical systems.
RouteLLM and Hybrid-LLM both achieve 40-50% cost reduction by routing to a single model based on query difficulty prediction, not response evaluation. Single-model routing minimizes latency compared to ensemble or cascade alternatives.
Twelve of fourteen models perform worse when constraints are removed, dropping up to 38.5 percentage points. Models appear to reason correctly by defaulting to harder options, not by actually evaluating constraints.
Show all 10 sources
Research shows LLMs cannot perform iterative procedures in latent space. They recognize optimization problems as template-similar and emit plausible-looking but incorrect values, a failure mode that persists across model scale and training approaches.
Even GRPO-trained models show sharp performance drops on out-of-distribution variants (N-1 test sets) compared to in-distribution problems, indicating RL optimizes template-matching rather than genuine problem-solving procedures.
The LOFT benchmark shows LCLMs match RAG on semantic retrieval without explicit training, but cannot execute relational queries requiring joins across structured tables. Context length alone cannot bridge this gap.
ICE shows that bidirectional attention in diffusion LLMs enables in-place prompting—embedding reasoning directly in masked positions refined alongside answers. Answer confidence converges early while reasoning continues refining, allowing early-exit mechanisms to cut compute by 50% while maintaining accuracy.
MAGPIE shows that aligned models like Llama-3-Instruct auto-regressively generate diverse, high-quality instructions when given only pre-query formatting tokens, without prompt engineering. 4M generated pairs matched human-curated datasets in quality and outperformed external sources in downstream fine-tuning.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Can Large Language Models Reason and Optimize Under Constraints?
- Beyond Accuracy: Evaluating the Reasoning Behavior of Large Language Models -- A Survey
- Towards Agentic RAG with Deep Reasoning: A Survey of RAG-Reasoning Systems in LLMs
- Branch-Solve-Merge Improves Large Language Model Evaluation and Generation
- ZebraLogic: On the Scaling Limits of LLMs for Logical Reasoning
- SoftCoT: Soft Chain-of-Thought for Efficient Reasoning with LLMs
- Reasoning Strategies in Large Language Models: Can They Follow, Prefer, and Optimize?
- The Illusion of Thinking: Understanding the Strengths and Limitations of Reasoning Models via the Lens of Problem Complexity