mlsanityData to 14 Oct 2026

Play by the Type Rules: Inferring Constraints for LLM Functions in Declarative Programs

arXiv 2509.20208 ↗First posted 24 Sep 2025cs.CL cs.AI cs.DBcited by 0

On the map: LLM reasoning → Knowledge- and tool-augmented reasoning

Abstract (arXiv)

Integrating LLM powered operators in declarative query languages allows for the combination of cheap and interpretable functions with powerful, generalizable language model reasoning. However, in order to benefit from the optimized execution of a database query language like SQL, generated outputs must align with the rules enforced by both type checkers and database contents. Current approaches address this challenge with orchestrations consisting of many LLM-based post-processing calls to ensure alignment between generated outputs and database values, introducing performance bottlenecks. We perform a study on the ability of various sized open-source language models to both parse and execute functions within a query language based on SQL, showing that small language models can excel as function executors over hybrid data sources. Then, we propose an efficient solution to enforce the well-typedness of LLM functions, demonstrating 7% accuracy improvement on a multi-hop question answering dataset with 53% improvement in latency over comparable solutions. We make our implementation available at https://github.com/parkervg/blendsql

Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 26 of its 36 references that are in the map. First posted on arXiv 24 Sep 2025.

Builds on

26 of 36 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024BlendSQL: A Scalable Dialect for Unifying Hybrid Question Answering in Relational Algebra27 Feb

Other references · 25

  1. 2024The Llama 3 Herd of Modelscited by 14,715
  2. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,170
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  4. 2024Gemma 2: Improving Open Language Models at a Practical Sizecited by 1,998
  5. 2020MPNet: Masked and Permuted Pre-training for Language Understandingcited by 981
  6. 2023Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLscited by 688
  7. 2020HybridQA: A Dataset of Multi-Hop Question Answering over Tabular and Textual Datacited by 264
  8. 2024DeepSeek-Prover: Advancing Theorem Proving in LLMs through Large-Scale Synthetic Datacited by 234
  9. 2022Binding Language Models in Symbolic Languagescited by 228
  10. 2023Efficient Guided Generation for Large Language Modelscited by 200
  11. 2023Grammar-Constrained Decoding for Structured NLP Tasks without Finetuningcited by 197
  12. 2025Kimina-Prover Preview: Towards Large Formal Reasoning Models with Reinforcement Learningcited by 180
13 more
  1. 2023LINC: A Neurosymbolic Approach for Logical Reasoning by Combining Language Models with First-Order Logic Proverscited by 168
  2. 2020Break It Down: A Question Understanding Benchmarkcited by 131
  3. 2024XGrammar: Flexible and Efficient Structured Generation Engine for Large Language Modelscited by 75
  4. 2023EHRXQA: A Multi-Modal Question Answering Dataset for Electronic Health Records with Chest X-ray Imagescited by 53
  5. 2025Flexible and Efficient Grammar-Constrained Decodingcited by 43
  6. 2025Type-Constrained Code Generation with Language Modelscited by 35
  7. 2024Semantic Operators: A Declarative Model for Rich, AI-based Data Processingcited by 34
  8. 2024Text2SQL is Not Enough: Unifying AI and Databases with TAGcited by 34
  9. 2024Divide-or-Conquer? Which Part Should You Distill Your LLM?cited by 17
  10. 2025Beyond Quacking: Deep Integration of Language Models and RAG into DuckDBcited by 15
  11. 2023SUQL: Conversational Search over Structured and Unstructured Data with Large Language Modelscited by 13
  12. 2024Exploring Hybrid Question Answering via Program-based Promptingcited by 8
  13. 2024Saving GPU Hours in LLM Inference System Development and Online Workloads with Simulation and DBMS-Inspired Cache Replacement Policiescited by 3

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2025Querying Databases with Function Calling
  2. 2025SQLForge: Synthesizing Reliable and Diverse Data to Enhance Text-to-SQL Reasoning in LLMs
  3. 2024Lucy: Think and Reason to Solve Text-to-SQL
  4. 2026Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
  5. 2023LLM-SQL-Solver: Can LLMs Determine SQL Equivalence?
  6. 2024Evaluating and Enhancing LLMs for Multi-turn Text-to-SQL with Multiple Question Types
  7. 2025Weaver: Interweaving SQL and LLM for Table Reasoning
  8. 2024Evaluating LLM Reasoning in the Operations Research Domain with ORQA