Efficient Guided Generation for Large Language Models
Open accessAbstract
In this article we show how the problem of neural text generation can be constructively reformulated in terms of transitions between the states of a finite-state machine. This framework leads to an efficient approach to guiding text generation with regular expressions and context-free grammars by allowing the construction of an index over a language model's vocabulary. The approach is model agnostic, allows one to enforce domain-specific knowledge and constraints, and enables the construction of reliable interfaces by guaranteeing the structure of the generated text. It adds little overhead to the token sequence generation process and significantly outperforms existing solutions. An implementation is provided in the open source Python library Outlines
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404 · cited 1× · see citing works
“We are concerned with the problem of generating sequences of tokens from a large language model (LLM) [Vaswani et al., 2017, Radford et al., 2019] that conform to regular expressions or context-free grammars (CFGs).”
BackgroundNeural Machine Translation of Rare Words with Subword Units
Sennrich, R., Haddow, B., & Birch, A. (2016) · Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers) · doi:10.18653/v1/p16-1162 · Cited by 974 · cited 2× · see citing works
“The vocabularies, V, are composed of strings from a fixed alphabet [Sennrich et al., 2015] and N is often on the order of 104 or larger.”
BackgroundDille, G. E. (1930) · doi:10.1177/002205743011202012 · Cited by 802
PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models
Scholak, T., Schucher, N., & Bahdanau, D. (2021) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2021.emnlp-main.779 · Cited by 407 · cited 1× · see citing works
“…output usable under rigid formatting requirements that are either hard or costly to capture through fine-tuning alone [Beurer-Kellner et al., 2023, Scholak et al., 2021, Poesia et al., 2022a, Rabinovich et al., 2017, Weng, 2021, Dong et al., 2023, Poesia et al., 2022b, Geng et al., 2023, Wang et…”
BackgroundAbstract Syntax Networks for Code Generation and Semantic Parsing
Rabinovich, M., Stern, M., & Klein, D. (2017) · Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/p17-1105 · Cited by 395 · cited 1× · see citing works
“…under rigid formatting requirements that are either hard or costly to capture through fine-tuning alone [Beurer-Kellner et al., 2023, Scholak et al., 2021, Poesia et al., 2022a, Rabinovich et al., 2017, Weng, 2021, Dong et al., 2023, Poesia et al., 2022b, Geng et al., 2023, Wang et al., 2023].”
BackgroundGrammar Prompting for Domain-Specific Language Generation with Large Language Models
Wang, B.-L., Wang, Z., Wang, X.-Z., Cao, Y., Saurous, R. A., & Kim, Y. (2023) · Neural Information Processing Systems · doi:10.48550/arxiv.2305.19234 · Cited by 144 · cited 1×
“…under rigid formatting requirements that are either hard or costly to capture through fine-tuning alone [Beurer-Kellner et al., 2023, Scholak et al., 2021, Poesia et al., 2022a, Rabinovich et al., 2017, Weng, 2021, Dong et al., 2023, Poesia et al., 2022b, Geng et al., 2023, Wang et al., 2023].”
BackgroundPrompting Is Programming: A Query Language for Large Language Models
Beurer-Kellner, L., Fischer, M., & Vechev, M. (2023) · Proceedings of the ACM on Programming Languages · doi:10.1145/3591300 · Cited by 117 · see citing works
Sequential Monte Carlo Steering of Large Language Models using Probabilistic Programs
Lew, A. K., Zhi-Xuan, T., Grand, G., & Mansinghka, V. K. (2023) · arXiv.org · doi:10.48550/arxiv.2306.03081 · Cited by 97
Synchromesh: Reliable code generation from pre-trained language models
Poesia, G., Polozov, O., Le, V., Tiwari, A., Soares, G., Meek, C., & Gulwani, S. (2022) · arXiv · doi:10.48550/arxiv.2201.11227 · Cited by 72 · cited 1× · see citing works
“…under rigid formatting requirements that are either hard or costly to capture through fine-tuning alone [Beurer-Kellner et al., 2023, Scholak et al., 2021, Poesia et al., 2022a, Rabinovich et al., 2017, Weng, 2021, Dong et al., 2023, Poesia et al., 2022b, Geng et al., 2023, Wang et al., 2023].”
BackgroundGasser, U., & Mayer-Schönberger, V. (2024) · doi:10.2307/jj.6605394 · Cited by 29
CODEP: Grammatical Seq2Seq Model for General-Purpose Code Generation
Dong, Y., Li, G., & Jin, Z. G. (2023) · ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) · doi:10.1145/3597926.3598048 · Cited by 22 · cited 1× · see citing works
“…under rigid formatting requirements that are either hard or costly to capture through fine-tuning alone [Beurer-Kellner et al., 2023, Scholak et al., 2021, Poesia et al., 2022a, Rabinovich et al., 2017, Weng, 2021, Dong et al., 2023, Poesia et al., 2022b, Geng et al., 2023, Wang et al., 2023].”
BackgroundValidating Large Language Models with ReLM
Kuchnik, M., Smith, V., & Amvrosiadis, G. (2022) · arXiv · doi:10.48550/arxiv.2211.15458 · Cited by 12 · see citing works
Flagged first, then by citations
9 of the 21 references couldn’t be matched to a known paper.
Research works printed but not linked: 1
- Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
Cited by
Sorted by citations
Large language models for generative information extraction: a survey
Xu, D., Chen, W., Peng, W., Zhang, C., Xu, T., Zhao, X., Wu, X., Zheng, Y., Wang, Y., & Chen, E. (2024) · Frontiers of Computer Science · doi:10.1007/s11704-024-40555-y · Cited by 326 · see citing works
SGLang: Efficient Execution of Structured Language Model Programs
Zheng, L., Yin, L., Xie, Z., Sun, C., Huang, J., Yu, C. H., Cao, S., Kozyrakis, C., Stoica, I., Gonzalez, J. E., et al. (2023) · arXiv · doi:10.48550/arxiv.2312.07104 · Cited by 145 · see citing works
“To achieve this, we convert the regex into a Finite State Machine (FSM) to guide the generation process during decoding [54].”
RCAgent: Cloud Root Cause Analysis by Autonomous Agents with Tool-Augmented Large Language Models
Wang, Z., Liu, Z., Zhang, Y., Zhong, A., Wang, J., Yin, F., Fan, L., Wu, L., & Wen, Q. (2024) · Proceedings of the 33rd ACM International Conference on Information and Knowledge Management · doi:10.1145/3627673.3680016 · Cited by 99 · see citing works
Reducing hallucination in structured outputs via Retrieval-Augmented Generation
Ayala, O., & Bechard, P. (2024) · Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 6: Industry Track) · doi:10.18653/v1/2024.naacl-industry.19 · Cited by 97 · see citing works
Type-Constrained Code Generation with Language Models
Mündler-Sasahara, N., He, J.-X., Wang, H., Sen, K., Song, D., & Vechev, M. T. (2025) · Proc. ACM Program. Lang. · doi:10.1145/3729274 · Cited by 77 · see citing works
DeAL: Decoding-time Alignment for Large Language Models
Huang, J. Y., Sengupta, S., Bonadiman, D., Lai, Y.-A., Gupta, A., Pappas, N., Mansour, S., Kirchhoff, K., & Roth, D. (2024) · Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/2025.acl-long.1274 · Cited by 65 · see citing works
“…note that DeAL can allow the use of a costlier model for action selection ( LLM 1 ) and a cheaper one for lookahead ( LLM 2 ). tomaton (FSA) based (Willard & Louf, 2023; Geng et al., 2023), and push-down automaton (PDA) based (Deutsch et al., 2019; Wang et al., 2023b;a), our work extends these in…”
Syntactic and Semantic Control of Large Language Models via Sequential Monte Carlo
Loula, J., LeBrun, B., Du, L., Lipkin, B., Pasti, C., Grand, G., Liu, T., Emara, Y., Freedman, M., Eisner, J., et al. (2025) · International Conference on Learning Representations · doi:10.48550/arxiv.2504.13139 · Cited by 61
“…biasing or masking to incorporate signals at each step, for example to ensure that the complete sequence will fall in a specified regular or context-free language (e.g., Shin et al., 2021; Scholak et al., 2021; Poesia et al., 2022; Willard & Louf, 2023; Moskal et al., 2024; Ugare et al., 2024).”
Enforcing Temporal Constraints for LLM Agents
Kamath, A., Zhang, S., Xu, C., Ugare, S., Singh, G., & Misailovic, S. (2025) · arXiv.org · doi:10.48550/arxiv.2512.23738 · Cited by 45
“We present three case studies of the tasks where Agent-C performs better than the baselines to describe how Agent-C outperforms other agent frameworks.”
Adaptable Logical Control for Large Language Models
Kung, P.-N., Peng, N.-Y., den Broeck, G. V., Yoshida, M., & Zhang, H. (2024) · Neural Information Processing Systems · doi:10.48550/arxiv.2406.13892 · Cited by 44
“Some recent work as well as open source projects have proposed to use regular expressions (regex) to achieve structured generation from LLMs [23, 43].”
BackgroundAn overview of domain-specific foundation model: key technologies, applications and challenges
Chen, H., Chen, H., Zhao, Z., Han, K., Zhu, G., Zhao, Y., Du, Y., Xu, W., & Shi, Q. (2025) · Science China Information Sciences · doi:10.1007/s11432-025-4498-2 · Cited by 34 · see citing works
From Language Models over Tokens to Language Models over Characters
Vieira, T., LeBrun, B., Giulianelli, M., Gastaldi, J. L., DuSell, B., Terilla, J., O'Donnell, T. J., & Cotterell, R. (2024) · International Conference on Machine Learning · doi:10.48550/arxiv.2412.03719 · Cited by 39
“…→ Character-level constraints: Enforcing character-level constraints on allowed strings is a promising area that has received much recent attention (e.g., Scholak et al., 2021; Poesia et al., 2022; Geng et al., 2023; Microsoft, 2023; Willard & Louf, 2023; Koo et al., 2024; Loula et al., 2025).”
Steering LLM Thinking with Budget Guidance
Li, J.-Y., Zhao, W.-S., Zhang, Y., & Gan, C. (2025) · Annual Meeting of the Association for Computational Linguistics · doi:10.48550/arxiv.2506.13752 · Cited by 38
“A similar notion of guided generation has emerged in the context of LLMs (Willard and Louf, 2023), where it typically refers to constraining the model’s output to satisfy structural requirements, such as context-free grammars, to ensure syntactic correctness for downstream applications.”
AutoPDL: Automatic Prompt Optimization for LLM Agents
Spiess, C., Vaziri, M., Mandel, L., & Hirzel, M. (2025) · AutoML · doi:10.48550/arxiv.2504.04365 · Cited by 33
Code Pretraining Improves Entity Tracking Abilities of Language Models
Kim, N., Schuster, S., & Toshniwal, S. (2024) · arXiv.org · doi:10.48550/arxiv.2405.21068 · Cited by 32
“For this reason, we used regular expression-based constrained decoding using the outlines library (Willard & Louf, 2023).”
MethodFast Controlled Generation from Language Models with Adaptive Weighted Rejection Sampling
Lipkin, B., LeBrun, B., Vigly, J. H., Loula, J., MacIver, D., Du, L., Eisner, J., Cotterell, R., Mansinghka, V. K., O'Donnell, T. J., et al. (2025) · arXiv.org · doi:10.48550/arxiv.2504.05410 · Cited by 30
“Engineering advances have enabled at least partial compilation of constraints expressible as membership in regular (Deutsch et al., 2019; Willard & Louf, 2023; Kuchnik et al., 2023) or context-free (Koo et al., 2024; Ugare et al., 2024; Dong et al., 2024) languages as well as restricted classes of…”
Natural Language Outlines for Code: Literate Programming in the LLM Era
Shi, K.-S., Altınbüken, D., Anand, S., Christodorescu, M., Grünwedel, K., Koenings, A., Naidu, S., Pathak, A., Rasi, M., Ribeiro, F., et al. (2024) · SIGSOFT FSE Companion · doi:10.1145/3696630.3728541 · Cited by 30
“This issue can be remedied with the Constrained Generation approach, using constrained decoding [34], [35] to alter token probabilities in a way that prevents changing the code.”
Spotlight Your Instructions: Instruction-following with Dynamic Attention SteeringPreprint
Venkateswaran, P., & Contractor, D. (2025) · Conference of the European Chapter of the Association for Computational Linguistics · doi:10.48550/arxiv.2505.12025 · Cited by 27 · see citing works
“We also observe improvements when SpotLight is used in conjunction with repeated instructions.”
de Oliveira, R., Garber, M., Gwinnutt, J. M., Rashidi, E., Hwang, J.-H. (., Gilmour, W., Nanavati, J., Abidine, K. Z. E., & Mack, C. D. (2025) · JAMIA Open · doi:10.1093/jamiaopen/ooaf058 · Cited by 17 · see citing works
“Techniques such as declarative prompting 36,37 that constraint LLM output may help avoid such scenarios.”
Wordflow: Social Prompt Engineering for Large Language Models
Wang, Z. J., Chakravarthy, A., Munechika, D., & Chau, D. H. (2024) · Annual Meeting of the Association for Computational Linguistics · doi:10.48550/arxiv.2401.14447 · Cited by 23
DINGO: Constrained Inference for Diffusion LLMs
Suresh, T., Banerjee, D., Ugare, S., Misailovic, S., & Singh, G. (2025) · Neural Information Processing Systems · doi:10.48550/arxiv.2505.23061 · Cited by 19
“Generating JSON that adheres to a specified schema is extremely important for applications like tool use and function calling (Ugare et al., 2024b; Willard & Louf, 2023).”
Think Inside the JSON: Reinforcement Strategy for Strict LLM Schema Adherence
Agarwal, B., Joshi, I., & Rojkova, V. (2025) · arXiv.org · doi:10.48550/arxiv.2502.14905 · Cited by 19
“Instead of free-form text generation, the model is guided to fill in required slots, adhere to the correct format, and avoid extraneous or malformed outputs [BTW23].”
Controllable Generation via Locally Constrained Resampling
Ahmed, K., Chang, K.-W., & den Broeck, G. V. (2024) · International Conference on Learning Representations · doi:10.48550/arxiv.2410.13111 · Cited by 17
“C guarantees that an autoregressive model’s generations satisfy the constraint.”
InfluentialPriority Sampling of Large Language Models for Compilers
Grubisic, D., Seeker, V., Synnaeve, G., Leather, H., Mellor-Crummey, J., & Cummins, C. (2024) · EuroMLSys@EuroSys · doi:10.1145/3642970.3655831 · Cited by 17 · see citing works
“Priority Sampling outperforms Nucleus Sampling [21] for any number of samples, reaches 91% of the autotuner improvement over -Oz in just 5 samples, and even outperforms the autotuner used to generate labels for finetuning the original model with 30 samples (Figure 3).”
BackgroundMethodInformed Named Entity Recognition Decoding for Generative Language Models
Deußer, T., Hillebrand, L., Bauckhage, C., & Sifa, R. (2024) · IEEE International Conference on Big Data (BigData) · doi:10.1109/bigdata62323.2024.10825603 · Cited by 9 · see citing works
The Effectiveness of Large Language Models in Transforming Unstructured Text to Standardized Formats
Brach, W., Košťál, K., & Ries, M. (2025) · IEEE Access · doi:10.1109/access.2025.3573030 · Cited by 14 · see citing works
“2) Tools for structured generation : Frameworks such as Outlines [47] provide tools for utilizing open-source language models to generate Cooklang-compliant recipes without the necessity for fine-tuning.”
Grand, G., Tenen-baum, J., Mansinghka, V. K., Lew, A. K., & Andreas, J. (2025) · arXiv.org · doi:10.48550/arxiv.2504.07081 · Cited by 15
“…for specific classes of constraints (Hokamp & Liu, 2017; Koo et al., 2024; Lu et al., 2021; 2022; Poesia et al., 2022; Post & Vilar, 2018; Ugare et al., 2024; Willard & Louf, 2023) or guiding generation with neural models (Amini et al., 2023; Kumar et al., 2022; Li et al., 2022; Qin et al., 2022).”
Efficient Test-Time Scaling for Small Vision-Language Models
Kaya, M., Elliott, D., & Papadopoulos, D. P. (2025) · arXiv.org · doi:10.48550/arxiv.2510.03574 · Cited by 14
“We use the Outlines library (Willard & Louf, 2023) for structured generation.”
Tan, J. J., Kwan, B.-H., Ng, D., Hum, Y., Mokraoui, A., & Lo, S.-Y. (2025) · IEEE Transactions on Computational Social Systems · doi:10.1109/tcss.2025.3593323 · Cited by 13
“Meanwhile, we also treat it as multilabel classification instead of 4–5 binary classification tasks to avoid repeated training for each dimension, thereby reducing training time and computational resources.”
Typed Decision Models: An Early Evidence Audit and Evaluation Checklist
Tang, L.-J., & Zheng, Y.-M. (2026) · doi:10.48550/arxiv.2609.32160 · Cited by 12
“Reject option [13]; LLM cascades [2, 11] Cheap first stage with a native probability RL with proper scoring rewards [6, 15] Calibration is part of the product objective (RLCD) mass can depend on label wording, option order, recency, and surface form [26, 46, 51, 83, 84, 85].”
Dong, H., Su, Q., Gao, Y.-B., Li, Z., Ruan, Y., Pekhimenko, G., Maddison, C. J., & Si, X. (2024) · Annual Meeting of the Association for Computational Linguistics · doi:10.48550/arxiv.2406.13161 · Cited by 12 · see citing works
“Building on this, modules with specific functionality are invented, like unifying APIs (BerriAI, 2023), constraining LLM outputs (Willard & Louf, 2023; Liu, 2023) and parallelizing function calls (Kim et al., 2023), where APPL utilizes some of them as building blocks.”
Singh, A., Khurdula, H. V., Khemlani, Y. D., & Agarwal, V. (2026) · arXiv.org · doi:10.48550/arxiv.2604.25359 · Cited by 11
“A complementary line of work enforces grammar or schema compliance at generation time through constrained decoding (Willard & Louf, 2023; Dong et al., 2024; Zheng et al., 2024).”
PhysVid: Physics Aware Local Conditioning for Generative Video ModelsPreprint
Pathak, S., Pathak, Arani, E., Pechenizkiy, M., & Zonooz, B. (2026) · Computer Vision and Pattern Recognition · doi:10.48550/arxiv.2603.26285 · Cited by 10 · see citing works
“In addition, we apply constrained generation techniques to strictly enforce this structure in the output [51].”
Multimodal Structured Generation: CVPR's 2nd MMFM Challenge Technical ReportPreprint
Cesista, F. L. (2024) · arXiv.org · doi:10.48550/arxiv.2406.11403 · Cited by 10 · see citing works
“On the other end are "hard" constraints which zero-out the logits of invalid tokens altogether [3].”
Backgroundthis-that-model-1.0: A typed decision model that decides in 30 ms, for a millionth of a cent
Cheng, Z.-H., Dai, W., & Sun, J.-H. (2026) · doi:10.48550/arxiv.2609.23886 · Cited by 9
“Structured decoding — grammars, JSON schemas, regular-expression constraints [10, 25] — makes a generative model’s output parseable, but it remains a decoding loop, and the constraint is applied to the tokens rather than to the hypothesis space.”
Mitigating Bias in Locally Constrained Decoding via Tractable Proposals
Dang, M., Song, L.-X., Zhang, H., Zhao, J.-Y., den Broeck, G. V., & Ermon, S. (2026) · arXiv.org · doi:10.48550/arxiv.2606.01926 · Cited by 9
“Existing frameworks differ mainly in how constraints are represented: for example, Outlines (Willard & Louf, 2023) uses regular expressions and their corresponding DFA representations, while more recent systems such as XGrammar (Dong et al., 2025) rely on context-free grammars.”
Understanding Epistemic Language with a Language-augmented Bayesian Theory of Mind
Ying, L., Zhi-Xuan, T., Wong, L., Mansinghka, V. K., & Tenenbaum, J. B. (2024) · Transactions of the Association for Computational Linguistics · doi:10.1162/tacl_a_00752 · Cited by 9 · see citing works
Retrieval Augmented Structured Generation: Business Document Information Extraction as Tool Use
Cesista, F. L., Aguiar, R., Kim, J., & Acilo, P. (2024) · Conference on Multimedia Information Processing and Retrieval · doi:10.1109/mipr62202.2024.00042 · Cited by 9 · see citing works
“…using In-Context Learning [3]; (2) Supervised Finetuning which enhances the correctness of the extracted outputs; (3) Structured Generation which ensures that the outputs are parse-able by downstream programs [4]; and (4) Structured Prompting which infuses layout information into the prompt [5].”
BackgroundMethodMelcer, D., Fulton, N., Gouda, S. K., & Qian, H.-F. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2402.17988 · Cited by 9 · see citing works
“Constrained generation has been used in code completion [9, 10, 11, 12] and structured data extraction tasks [13, 14, 15, 16, 17, 18] to incorporate a language’s structure.”
MethodIbrahim, A., Alsukkar, M., Xu, Y., Hermaputi, R. L., Yin, S., & Xiao, Y. (2026) · Energy Sustainable Development/Energy for sustainable development · doi:10.1016/j.esd.2026.102104 · Cited by 10 · see citing works
Khan, S. (2026) · arXiv.org · doi:10.48550/arxiv.2606.17182 · Cited by 8 · see citing works
“…ones are sometimes configured, and even then greedy decoding is not fully deterministic [98] while constrained/grammar-guided generation [97] narrows toward our regime—and, non-hypothetically, durable-execution engines (Section 7.9) enforce deterministic replay in production, so within…”
InfluentialThe Hidden Cost of Structured Generation in LLMs: Draft-Conditioned Constrained DecodingPreprint
Reddy, A., Walker, T. T., Ide, J. S., & Bedi, A. S. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2603.03305 · Cited by 7 · see citing works
“Modern structured decoding systems (Willard & Louf, 2023; Dong et al., 2025; Suresh et al., 2025; Ugare et al., 2024a;b; OpenAI, 2024) extend these ideas to JSON schemas, type systems, and domain-specific languages, achieving efficient token-level filtering through optimized finite-state machines…”
UTF-8 Plumbing: Byte-level Tokenizers Unavoidably Enable LLMs to Generate Ill-formed UTF-8
Firestone, P., Ugare, S., Singh, G., & Misailovic, S. (2025) · arXiv.org · doi:10.48550/arxiv.2511.05578 · Cited by 7
“We examined various grammar-constrained generation systems and tested them to discover their behavior during partial generation decoding (Scholak et al., 2021; Poesia et al., 2022; Willard & Louf, 2023; Ugare et al., 2025b;a; Banerjee et al., 2025; Loula et al., 2025; Suresh et al., 2025).”
Feedback That Backfires: Why Small Language Model Agents Repeat the Call They Just Watched Fail
Gumaan, E. A. (2026) · arXiv.org · doi:10.48550/arxiv.2608.23651 · Cited by 6
“Constrained decoding is well developed as a format device [Willard and Louf, 2023], with known costs to free-form reasoning [Tam et al., 2024].”
Tuan, T. L. (2026) · arXiv.org · doi:10.48550/arxiv.2604.00555 · Cited by 6
“• Constrained Decoding : Restricting LLM output tokens to conform to grammatical or structural constraints [Willard and Louf, 2023].”
On the Power of (Approximate) Reward Models for Inference-Time Scaling
Zhu, Y.-H., & Lu, Y.-P. (2026) · arXiv.org · doi:10.48550/arxiv.2602.01381 · Cited by 6
“…to drive the error particle-based guidance, which reduces error by increasing the number of particles, and chain-based guidance, which reduces TV − 1TV Hastings corrections target the same limit through mixing : the contracts geometrically in TV, yielding 𝐻 = 𝑂 (cid:0) log ( 𝛿 − 1TV )…”
REFINESTAT: Efficient Exploration for Probabilistic Program Synthesis
Kanda, M., Ugare, S., & Misailovic, S. (2025) · International Conference on Learning Representations · doi:10.48550/arxiv.2509.01082 · Cited by 6
“These constraints can be partially precomputed and enforced more efficiently for regular (Deutsch et al., 2019; Willard & Louf, 2023; Kuchnik et al., 2023) or context-free (Koo et al., 2024; Ugare et al., 2024b; Dong et al., 2024b; Banerjee et al., 2025; Suresh et al., 2025; Firestone et al., 2025)…”
Calibrated Predictive Lower Bounds on Time-to-Unsafe-Sampling in LLMs
Davidov, H., Freidkin, G., Feldman, S., & Romano, Y. (2025) · arXiv.org · doi:10.48550/arxiv.2506.13593 · Cited by 6
“To understand the challenges, one can view the un-safe probability estimation as a process that independently generates multiple LLM responses for a given X , audits their safety, and computes the average of the resulting unsafe indicators.”
Hein, D., Christie, A., Holcomb, M. J., Xie, B., Jain, A., Vento, J., Rakheja, N., Shakur, A. H., Christley, S., Cowell, L. G., et al. (2025) · medRxiv · doi:10.1101/2025.02.11.25322107 · Cited by 6 · see citing works
“Future work could leverage guided-decoding backends 37,38 that can help constrain LLM generation to a predefined JSON schema.”
Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generation
Beurer-Kellner, L., Fischer, M., & Vechev, M. (2024) · arXiv · doi:10.48550/arxiv.2403.06988 · Cited by 5
“Regex-Based Decoding limited to regular expressions is supported by many frameworks (e.g., LMQL (Beurer-Kellner et al., 2023), O UTLINES (Willard & Louf, 2023), GUID - ANCE (Lundberg et al.)”
BackgroundMethodInfluentialNVIDIA-labs OO Agents: Native Python Object-Oriented Agents
Furgale, P., Klingler, S., Nolan, J., Staats, M., Lorenzo, G. D., Abad, E., Schüller, C., Dinu, R., Devoto, A., Bérard, P., et al. (2026) · arXiv.org · doi:10.48550/arxiv.2607.20709 · Cited by 5
“LMQL [13] frames prompting as a query language whose output constraints (including type constraints) are enforced at decoding time, and Outlines [55] enforces output structure during generation by compiling regular expressions to finite-state machines (and grammars to pushdown automata) that mask…”
Compile, Then Page: Executable SOP Programs and a Capability-Gated Runtime for Procedural LLM Agents
Yu, C.-L., Yin, L., Fan, Q., Yu, Y., Zhong, R., & Li, M. (2026) · arXiv.org · doi:10.48550/arxiv.2607.11346 · Cited by 5
“Figure 1 gives an overview.”
Constrained Decoding for Diffusion Language Models via Efficient Inference over Finite Automata
Dang, M., & Ermon, S. (2026) · arXiv.org · doi:10.48550/arxiv.2607.07026 · Cited by 5
“For autoregressive LLMs, a common practice is to mask out next tokens that would violate the constraint as generation proceeds left-to-right [32].”
InfluentialRay, J. (2026) · arXiv.org · doi:10.48550/arxiv.2605.26128 · Cited by 5
Compiled AI: Deterministic Code Generation for LLM-Based Workflow AutomationPreprint
Trooskens, G., Karlsberg, A., Sharma, A., Brouwer, L. D., Puyvelde, M. V., Young, M., Thickstun, J., Alterovitz, G., & Brouwer, W. A. D. (2026) · arXiv.org · doi:10.48550/arxiv.2604.05150 · Cited by 5 · see citing works
“…decoding; type-constrained decoding [Mündler et al., 2025] reduces compilation errors by > 50% while improving functional correctness; Outlines [Willard and Louf, 2023] and XGrammar [Dong et al., 2024] together deliver up to 100 × speedup over prior constrained decoding approaches.”
Snaebjarnarson, V., Kiegeland, S., Liu, T., Boumasmoud, R., Cotterell, R., & Vieira, T. (2026) · arXiv.org · doi:10.48550/arxiv.2603.05193 · Cited by 5
“…have a long history in language modeling (Mohri, 1997) and have been adopted for constrained decoding, where an FST enforces lexical or structural constraints (Allauzen et al., 2014; Ghazvininejad et al., 2016; Stahlberg et al., 2019; Willard & Louf, 2023; Koo et al., 2024; Cognetta et al., 2025).”
Neuro-Symbolic Synergy for World Modeling
Zhao, H., Zhou, S., Yang, H.-L., Qin, Z.-Y., & Zhou, T. (2026) · doi:10.48550/arxiv.2602.10480 · Cited by 5
“Constrained decoding modifies token-level distributions during generation, commonly to enforce syntactic formats (Willard & Louf, 2023; Beurer-Kellner et al., 2024), and has been extended to semantic and logical constraints (Nagy et al., 2026; Ma & Hu, 2025).”
Stachura, D., Konieczna, J., & Nowak, A. (2025) · Conference and Labs of the Evaluation Forum · doi:10.48550/arxiv.2509.18843 · Cited by 5
“We used CFG implementations introduced by model providers or accessed via external libraries like Outlines [20] to guide the token sampling process.”
Reining in an Agentic Harness for High Energy Physics
Menzo, T., Fleming, G., Matchev, K., Mrenna, S., & Roman, A. (2026) · doi:10.48550/arxiv.2609.00107 · Cited by 4
“The scientific implementation and its validation remain in the under-4 [31, 32, 40, 41], constrained decoding enforces the schema during generation when supported by the inference provider.”
Neuro-symbolic constraint verification for LLM-driven internet finance transaction execution
Qin, Y., Rhee, M., Teng, D., Zhang, C.-H., & Zi, B.-J. (2026) · Scientific Reports · doi:10.1038/s41598-026-65233-w · Cited by 4
“Second, LLM decoding is constrained by a finite-state machine derived from the AST JSON schema 15 , guaranteeing that every generated token sequence is a syntactically valid AST instance.”
PhantomFill: When the Form Demands an Answer, Language Models Invent One
Usman, R. (2026) · arXiv.org · doi:10.48550/arxiv.2607.20492 · Cited by 4
“Vendors advertise 100% format adherence; decoder-level constrained generation enforces it mechanically [6].”
Mage: Multi-Axis Evaluation of LLM-Generated Executable Game Scenes Beyond Compile-Pass Rate
Liu, H., & Tatar, K. (2026) · arXiv.org · doi:10.48550/arxiv.2605.07342 · Cited by 4
“At the decoding level, grammar-constrained generation enforces structural validity [Geng et al., 2023, Scholak et al., 2021, Willard and Louf, 2023].”
Lee, I., D'Antoni, L., & Berg-Kirkpatrick, T. (2026) · arXiv.org · doi:10.48550/arxiv.2604.03616 · Cited by 4
“Grammar-constrained decoding (GCD) masks tokens that would violate a target grammar, guaranteeing syntactically valid output (Geng et al., 2024; Willard & Louf, 2023; Park et al., 2025).”
Tiny-Critic RAG: Empowering Agentic Fallback with Parameter-Efficient Small Language Models
Wu, Y., Liang, P., Xiang, Y., Yuan, M., Liu, J.-N., Yang, J., Li, X., & Yan, W. (2026) · 2026 9th International Conference on Advanced Algorithms and Control Engineering (ICAACE) · doi:10.1109/icaace69793.2026.11508939 · Cited by 4
“We construct a binary logit mask M ∈ {−∞ , 0 } |V| , enforcing M v = 0 if v ∈ { t pass , t fail } and −∞ otherwise [12] .”
End-to-End Joint ASR and Speaker Role Diarization With Child-Adult Interactions
Xu, A.-F., Feng, T.-T., Bishop, S., Lord, C., & Narayanan, S. S. (2026) · IEEE Transactions on Audio, Speech, and Language Processing · doi:10.1109/taslpro.2026.3707421 · Cited by 4 · see citing works
“Inaddition Inaddition,followingtheworksonLLMs[40], weenforcetheintendedformatbyguidingthedecoderwitha statemachine.”
Knowledge prompting: How knowledge engineers use generative AI
Koutsiana, E., Walker, J., Nwachukwu, M., Zhang, B., Meroño-Peñuela, A., & Simperl, E. P. B. (2025) · Journal of Web Semantics · doi:10.1016/j.websem.2025.100873 · Cited by 5 · see citing works
“Approaches such as token-level constrained decoding [83, 178, 39] and prompt-level output structuring [98] can enable LLMs to produce outputs in specific, predefined formats.”
LineBreaker: Finding Token-Inconsistency Bugs with Large Language Models
Chen, H.-B., Zhang, Y.-F., Han, X., Mao, T.-H., Rong, H., Zhang, Y.-H., Wang, X.-F., Xing, L., Chen, X., & Zhang, H. (2024) · International Conference on Automated Software Engineering · doi:10.1109/ase63991.2025.00079 · Cited by 4 · see citing works
JSONSchemaBench: A Rigorous Benchmark of Structured Outputs for Language Models
Geng, S., Cooper, H., Moskal, M., Jenkins, S., Berman, J., Ranchin, N., West, R., Horvitz, E., & Nori, H. (2025) · arXiv · doi:10.48550/arxiv.2501.10868 · Cited by 3 · see citing works
“…[Liu et al., 2024] has led to the development of various constrained-decoding frameworks 2 , such as Guidance [Guidance AI, 2023], Outlines [Willard & Louf, 2023], XGrammar [Dong et al., 2024] and the grammar module of Llamacpp [Gerganov & al., 2023] These frameworks provide broad support…”
Apparent Psychological Profiles of Large Language Models are Largely a Measurement ArtifactPreprint
Meyer, J., García, D., & Wulff, D. U. (2026) · arXiv.org · doi:10.48550/arxiv.2606.20205 · Cited by 3 · see citing works
“…is: directly-prompted, no preceding-item context (each item in a fresh chat), constrained text generation under greedy decoding via outlines 1.2.8 [33], and standard option order, with a system message instructing the model to act as a respondent and output strictly one element of the valid…”
InfluentialSuperMemory-VQA: An Egocentric Visual Question-Answering Benchmark for Long-Horizon Memory
Alam, S., Siam, S. I., Proulx, M. J., Fort, J., Newcombe, R. A., Kim, H., & Zhang, M. (2026) · arXiv.org · doi:10.48550/arxiv.2606.00825 · Cited by 3
“A QA Planner proposes rationale-first [53], instance-level chain-of-thought [55] QA pairs targeting the dataset dimensions and tasks [52].”
Position: The Time for Sampling Is Now! Charting a New Course for Bayesian Deep Learning
Sommer, E., & Rügamer, D. (2026) · arXiv.org · doi:10.48550/arxiv.2605.21765 · Cited by 3
“We envision token-level uncertainty as particularly impactful in the context of structured generation (Willard & Louf, 2023)—a paradigm essential for agentic workflows where reliable, syntactically correct outputs are prerequisites for effective autonomous action.”
ProtoMedAgent: Multimodal Clinical Interpretability via Privacy-Aware Agentic Workflows
Pellicer, A. L., Angelov, P., Bukhari, M., Li, Y., Soares, E., & Kerns, J. G. (2026) · arXiv.org · doi:10.48550/arxiv.2605.14113 · Cited by 3
“Modern constrained decoding engines, including Out-lines [43], XGrammar [7], and JSONFormer [33], attempt to reign in this behavior by enforcing strict syntactic schema adherence [12, 39].”
Nie, W.-H., Meng, Z.-J., Zou, K., Lin, Z., Li, Z.-W., Zheng, H., Jang, J., & Zhang, H. (2026) · arXiv.org · doi:10.48550/arxiv.2605.07698 · Cited by 3
“Frameworks such as XGrammar [Dong et al., 2024] and Outlines [Willard and Louf, 2023] enforce this via local vocabulary masking : at each decoding step, the logit vector is masked to retain only tokens consistent with the grammar prefix, then renormalized.”
TAPE: Tool-Guided Adaptive Planning and Constrained Execution in Language Model Agents
Jeong, J., Kim, J., & Lee, K. (2026) · arXiv.org · doi:10.48550/arxiv.2602.19633 · Cited by 3
“Then, our framework performs (iii) constrained execution by restricting the action space at decoding time (Willard & Louf, 2023) so that only the next prescribed action on the selected path is admissible, thereby suppressing sampling errors (Section 3.3).”
InfluentialSu, H., Zhang, S.-T., & Wang, X. (2026) · arXiv.org · doi:10.48550/arxiv.2602.18773 · Cited by 3
“Then, for component agents, the Action Input text is parsed into structured JSON format conforming to tool-specific Pydantic schemas using the Outlines library [56], which leverages a dedicated LLM (Qwen2.”
SimpleTool: Parallel Decoding for Real-Time LLM Function CallingPreprint
Shi, X., Wan, J.-X., Dong, L., Jiang, W., Liu, Y., & Huang, Z.-F. (2026) · arXiv.org · doi:10.48550/arxiv.2603.00030 · Cited by 3 · see citing works
“Grammar-constrained approaches include Outlines (Willard & Louf, 2023) and XGrammar (Dong et al., 2024).”
Automatic Prompt Optimization for Dataset-Level Feature Discovery
Cosma, A., Szehr, O., Kletz, D., Antonucci, A., & Pelletier, O. (2026) · arXiv.org · doi:10.48550/arxiv.2601.13922 · Cited by 3
“Additionally, the development of structured generation paradigms [ Willard and Louf, 2023 ] has further improved the reliability of LLM-generated annotations.”
The New Compiler Stack: A Survey on the Synergy of LLMs and Compilers
Zhang, S.-M., Zhao, J.-C., Yu, Q.-C., Xia, C.-W., Wang, Z., Feng, X.-B., & Cui, H.-M. (2026) · CCF Transactions on High Performance Computing · doi:10.1007/s42514-025-00270-x · Cited by 3
“Methods like grammar-guided constrained decoding (Willard and Louf 2023; Dong et al. 2024) can force the LLM to produce outputs that adhere to the given grammar constraints, which are therefore syntactically valid, guar-anteeing compilability.”
RL-Struct: A Lightweight Reinforcement Learning Framework for Reliable Structured Output in LLMs
Hu, R., & Wu, S.-L. (2025) · arXiv.org · doi:10.48550/arxiv.2512.00319 · Cited by 3
“Similarly, Guided Decoding frameworks (e.g., Outlines, Guidance [19]) and Schema-aware SFT methods explicitly inject grammar constraints during generation or training.”
Constrained Decoding for Safe Robot Navigation Foundation Models
Kapoor, P., Ganlath, A., Clifford, M., Liu, C., Scherer, S. A., & Kang, E. (2025) · doi:10.48550/arxiv.2509.01728 · Cited by 3
“In the field of natural language processing, syntactic constraints have been successfully enforced by applying constrained decoding at inference time (Willard & Louf, 2023; Beurer-Kellner et al., 2023; AI, 2023).”
SpeechDialogueFactory: A Framework for Natural Speech Dialogue Generation
Wang, M., Bai, Y., Wang, Y.-X., Vu, T.-T., Shareghi, E., & Haffari, G. (2025) · Interspeech · doi:10.21437/interspeech.2025-2013 · Cited by 3
“We employ constrained decoding [19] to ensure comprehensive coverage through well-structured JSON outputs.”
Data-Balanced Curriculum Learning for Audio Question Answering
Wijngaard, G., Formisano, E., Esposito, M., & Dumontier, M. (2025) · arXiv.org · doi:10.48550/arxiv.2507.06815 · Cited by 3
“Guided decoding constrains a language model’s output to ensure it conforms to a specific structure, using a regular expression [36].”
ABS: Enforcing Constraint Satisfaction On Generated Sequences Via Automata-Guided Beam Search
Collura, V., Tit, K., Bussi, L., Giunchiglia, E., & Cordy, M. (2025) · doi:10.48550/arxiv.2506.09701 · Cited by 3
“Finally, we note that other Automata-based steering methods, including industry standards like Guidance (Lundberg et al., 2024) and Outlines (Willard and Louf, 2023), are shown to be unsound through experimental results in the following section.”
InfluentialIvanova, A. A., Sathe, A., Lipkin, B., Kumar, U., Radkani, S., Clark, T. H., Kauf, C., Hu, J., Pramod, R. T., Grand, G., et al. (2024) · arXiv · doi:10.48550/arxiv.2405.09605 · Cited by 2
Procedural Graphs: Self-Evolving Execution Structures for LLM Agents
Lu, Y.-X., Chen, Y.-C., Wu, S.-C., & Arik, S. Ö. (2026) · doi:10.48550/arxiv.2609.09153 · Cited by 2
“Decoding constraints provide another form of structure: TOOLDEC (Zhang et al., 2023) compiles tool syntax schemas into finite-state automata and constrains generation to syntactically valid calls, using the efficient FSM-guided generation algorithm of Outlines (Willard and Louf, 2023).”
Beyond Object Validation: Relational Conformance in Multi-Artifact Agent Releases
Liu, T. (2026) · arXiv.org · doi:10.48550/arxiv.2607.14155 · Cited by 2
“JSON Schema and constrained generation can keep an object well formed [2], [11], [12].”
Yang, Y.-L., Chen, C.-J., Lin, T.-K., Lin, S.-C., & Koo, M. (2026) · Healthcare · doi:10.3390/healthcare14142150 · Cited by 2
“Constraint-decoding and grammar-guided generation methods can improve schema adherence by enforcing output structure during generation [13,14], but these meth-ods are not universally available in consumer-oriented local deployment workflows and may require separate evaluation of both structural…”
Empirical Study for Structured Output Control in LLMs for Software Engineering
Song, Y.-W., Rajput, P., Sun, T., Ezzini, S., Bissyandé, T. F., & Klein, J. (2026) · arXiv.org · doi:10.48550/arxiv.2606.09395 · Cited by 2
Neural Autoregressive Control Variates for the Quantum Monte Carlo Sign Problem
Qiao, B., & Wang, L. (2026) · arXiv.org · doi:10.48550/arxiv.2605.26814 · Cited by 2
“For autoregressive generative models this distinction is crucial: the uncolored representation allows every token sequence to carry nonzero probability, elimi-1 nating the need for constrained decoding or token masking [35, 36] that would otherwise be required to enforce physicality.”
Sharma, R. M. (2026) · arXiv.org · doi:10.48550/arxiv.2605.17909 · Cited by 2
“This approach is implemented in XGrammar [18], Outlines [19], LMQL, and vLLM’s LogitsProcessor API.”
Verifiers in the Loop: Decoding Time Verification for Code Translation
Zhou, T., Jha, S., Christodorescu, M., Levchenko, K., & Chandrasekaran, V. (2026) · arXiv.org · doi:10.48550/arxiv.2605.17626 · Cited by 2
When Correct Isn't Usable: Improving Structured Output Reliability in Small Language Models
Galeone, C., Park, M., Ettorre, G., & Ligorio, D. (2026) · arXiv.org · doi:10.48550/arxiv.2605.02363 · Cited by 2
“Grammar-based constrained decoding [Willard and Louf, 2023, Ugare et al., 2024] enforces syntactic validity at generation time.”
Governed MCP: Kernel-Level Tool Governance for AI Agents via Logit-Based Safety Primitives
Son, D.-H. (2026) · arXiv.org · doi:10.48550/arxiv.2604.16870 · Cited by 2
“Outlines [20] and llguidance [21] constrain LLM output to grammars or formal languages; this guarantees structural validity but not semantic safety (a JSON-schema-valid rm -rf / is still dangerous).”
ProbeLogits: Kernel-Level LLM Inference Primitives for AI-Native Operating Systems
Son, D.-H. (2026) · arXiv.org · doi:10.48550/arxiv.2604.11943 · Cited by 2
Zhou, H.-X. (2026) · arXiv.org · doi:10.48550/arxiv.2604.06066 · Cited by 2
“OUTLINES , developed by Willard and Louf [2023] is one of the most commonly used tool for grammar constraind decoding generation.”
Efficient and Verified Research Data Extraction with LLM
Serdiukov, A., Dravgelis, V., Smutin, D., Taldaev, A., Ivanov, A., Adonin, L., & Muravyov, S. (2026) · Algorithms · doi:10.3390/a19030214 · Cited by 2 · see citing works
“This hybrid approach—combining statistical modeling (LLMs) with deterministic rule-based post-processing—leverages the strengths of both paradigms and improves robustness [29,30].”
Alpay, F., & Senturk, B. (2026) · arXiv.org · doi:10.48550/arxiv.2603.05540 · Cited by 2
Huang, L., Liu, Z.-G., Yu, C., Zhu, T.-L., & Yan, B. (2026) · Italian National Conference on Sensors · doi:10.3390/s26062006 · Cited by 2 · see citing works
“Related work has further demonstrated that regular expressions and context-free grammars can be compiled into efficient guided decoding procedures, making schema-constrained generation practical for real applications [34].”
Entropy-Aligned Decoding of LMs for Better Writing and Reasoning
Ahmed, K., & Singh, S. (2026) · arXiv.org · doi:10.48550/arxiv.2601.01714 · Cited by 2
“…works that bias LM samples towards satisfying syntactic (Ahmed et al., 2023; 2025b; Zhang et al., 2024; Geh et al., 2024; Lundberg et al., 2024; Willard & Louf, 2023; van Krieken et al., 2025; Koo et al., 2024, inter alia ), or semantic constraints (Ahmed et al., 2025a; Yidou-Weng et al.,…”
Rehman, M. A., Shah, S. I. A., Anwar, A., & Islam, N. (2025) · arXiv.org · doi:10.48550/arxiv.2510.17883 · Cited by 2
“For ML/DL, we build a deterministic transformer TT that (i) standardizes numeric features using training means/standard deviations [19], and (ii) one-hot encodes the three categorical fields with handle unknown=’ignore’.”
Lexo: Eliminating Stealthy Supply-Chain Attacks via LLM-Assisted Program Regeneration
Lamprou, E., Dai, J., Ntousakis, G., Rinard, M. C., & Vasilakis, N. (2025) · arXiv.org · doi:10.48550/arxiv.2510.14522 · Cited by 2
- Authors
- Willard, B. T., & Louf, R.
- ORCID
- Louf, Rémi
- Venue
- arXiv
- Publisher
- arXiv
- Published
- 2023
- ISSN
- 2331-8422 (ISSN-L)
- arXiv
- 2307.09702
- OpenAlex
- W4385014449
- Cited by
- 27
- References
- 21
- Citations by year
- 2026: 7 · 2025: 12 · 2024: 7 · 2023: 1
- Type
- posted content
- Language
- en
- Open access
- green
- arxiv.org
- Licence
- Locations
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Artificial Intelligence › Speech and dialogue systems
- Keywords
- large language models, finite automata, regular expressions, context-free grammars, domain-specific constraints
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review