mlsanityData to 7 Oct 2026

Learning and Enforcing Context-Sensitive Control for LLMs

arXiv 2604.10667 ↗First posted 12 Apr 2026cs.CL cs.AI cs.LGcited by 1

Not on the map. Why?

Abstract (arXiv)

Controlling the output of Large Language Models (LLMs) through context-sensitive constraints has emerged as a promising approach to overcome the limitations of Context-Free Grammars (CFGs) in guaranteeing generation validity. However, such constraints typically require manual specification -- a significant barrier demanding specialized expertise. We introduce a framework that automatically learns context-sensitive constraints from LLM interactions through a two-phase process: syntactic exploration to gather diverse outputs for constraint learning, followed by constraint exploitation to enforce these learned rules during generation. Experiments demonstrate that our method enables even small LLMs (1B parameters) to learn and generate with perfect constraint adherence, outperforming larger counterparts and state-of-the-art reasoning models. This work represents the first integration of context-sensitive grammar learning with LLM generation, eliminating manual specification while maintaining generation validity.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Builds on 8 of its 19 references that are in the map. First posted on arXiv 12 Apr 2026.

Builds on

8 of 19 references.

References · 8

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
  3. 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
  4. 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 186
  5. 2024The Effect of Sampling Temperature on Problem Solving in Large Language Modelscited by 168
  6. 2024From Decoding to Meta-Generation: Inference-time Algorithms for Large Language Modelscited by 136
  7. 2024Guiding LLMs The Right Way: Fast, Non-Invasive Constrained Generationcited by 99
  8. 2022BenchCLAMP: A Benchmark for Evaluating Language Models on Syntactic and Semantic Parsingcited by 12

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2025Large-Scale Constraint Generation -- Can LLMs Parse Hundreds of Constraints?
  2. 2025CRANE: Reasoning with constrained LLM generation
  3. 2025SAGE:Specification-Aware Grammar Extraction for Automated Test Case Generation with LLMs
  4. 2024Benchmarking Large Language Models on Controllable Generation under Diversified Instructions
  5. 2026Hard Constraints Meet Soft Generation: Guaranteed Feasibility for LLM-based Combinatorial Optimization
  6. 2025Scaling Instruction-Tuned LLMs to Million-Token Contexts via Hierarchical Synthetic Data Generation
  7. 2024Adaptable Logical Control for Large Language Models
  8. 2025Step-by-Step Mastery: Enhancing Soft Constraint Following Ability of Large Language Models