Efficient Guided Generation for Large Language Models
Summary
This paper presents an efficient method for guiding LLM text generation with regular expressions and context-free grammars with minimal overhead, implemented in the open-source Python library Outlines.
View Cached Full Text
Cached at: 06/24/26, 07:49 AM
Paper page - Efficient Guided Generation for Large Language Models
Source: https://huggingface.co/papers/2307.09702 Published on Jul 19, 2023
Abstract
An efficient method guides language model text generation using regular expressions and context-free grammars with minimal overhead.
In this article we describe an efficient approach to guidinglanguage modeltext generation withregular expressionsandcontext-free grammars. Our approach adds little to no overhead to the token sequence generation process, and makes guided generation feasible in practice. An implementation is provided in the open source Python library Outlines.
View arXiv pageView PDFGitHub14.1kautoAdd to collection
Get this paper in your agent:
hf papers read 2307\.09702
Don’t have the latest CLI?curl \-LsSf https://hf\.co/cli/install\.sh \| bash
Models citing this paper0
No model linking this paper
Cite arxiv.org/abs/2307.09702 in a model README.md to link it from this page.
Datasets citing this paper0
No dataset linking this paper
Cite arxiv.org/abs/2307.09702 in a dataset README.md to link it from this page.
Spaces citing this paper0
No Space linking this paper
Cite arxiv.org/abs/2307.09702 in a Space README.md to link it from this page.
Collections including this paper0
No Collection including this paper
Add this paper to acollectionto link it from this page.
Similar Articles
Tractable Hierarchical Control of Autoregressive Language Models
This paper introduces a tractable method to control autoregressive large language model generation to satisfy LR(k) context-free grammars in polynomial time, improving over exponential previous methods. It demonstrates that current LLMs often fail to generate sequences satisfying simple nested constraints, motivating the need for efficient constrained generation.
Feature Generation Using LLMs: An Evolutionary Algorithm Approach
This paper proposes a method that uses large language models to generate new features from tabular data via an evolutionary algorithm, demonstrating improved classification results across multiple datasets.
Evolution through large models
This paper demonstrates that large language models trained on code can significantly enhance genetic programming mutation operators, enabling the generation of hundreds of thousands of functional Python programs for robot design in the Sodarace domain without prior training data. The approach, called Evolution through Large Models (ELM), combines LLMs with MAP-Elites to bootstrap new conditional models for context-specific artifact generation.
Exploring Lightweight Large Language Models for Court View Generation
This paper systematically explores the capabilities of lightweight (<2B) large language models for criminal court view generation, investigating trade-offs between model architecture, size, and impact on charge prediction. The authors also introduce CVGEvalKit, an evaluation framework with three public datasets.
Counterexample Guided Learning in the Large using Reasoning Agents
This paper proposes using counterexample-guided learning for LLMs to perform regular-expression induction, where a verifier provides counterexamples to refine candidate expressions. The method significantly improves sample efficiency and success rates on challenging tasks, demonstrating that LLMs can benefit from structured feedback beyond treating it as additional data.