Logic.py: Bridging the Gap between LLMs and Constraint Solvers
Pascal Kesseli, Peter W. O'Hearn, Ricardo Silveira Cabral
摘要
We present a novel approach to formalise and solve search-based problems using large language models, which significantly improves upon previous state-of-theart results. We demonstrate the efficacy of this approach on benchmarks like the logic puzzles tasks in ZebraLogicBench. Instead of letting the LLM attempt to directly solve the puzzles, our method prompts the model to formalise the problem in a logic-focused, human-readable, domain-specific language (DSL) called Logic.py. This formalised representation is then solved using a constraint solver, leveraging the strengths of both the language model and the solver. Our approach achieves a remarkable 65% absolute improvement over the baseline performance of Llama 3.1 70B on ZebraLogicBench, increasing its accuracy to over 90%. This significant advancement demonstrates the potential of combining language models with domain-specific languages and auxiliary tools on traditionally challenging tasks for LLMs.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning 引用了 FOLIO: Natural Language Reasoning with First-Order Logic
- FOLIO: Natural Language Reasoning with First-Order Logic 引用了 Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning
- LLM-Guided Quantified SMT Solving over Uninterpreted Functions 引用了 Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning
- Open-World LLM Logical Reasoning 引用了 Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoning
- Open-World LLM Logical Reasoning 引用了 SatLM: Satisfiability-Aided Language Models Using Declarative Prompting
- Open-World LLM Logical Reasoning 引用了 FOLIO: Natural Language Reasoning with First-Order Logic
引用它的顶会 Paper2
它引用的 Paper3
- Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical ReasoningLiangming Pan, Alon Albalak, Xinyi Wang, William Yang WangEMNLP Findings 2023 · 145 次引用
- SatLM: Satisfiability-Aided Language Models Using Declarative PromptingXi Ye, Qiaochu Chen, Isil Dillig, Greg DurrettNeurIPS 2023 · 126 次引用
- FOLIO: Natural Language Reasoning with First-Order LogicSimeng Han, Hailey Schoelkopf, Yilun Zhao, Zhenting Qi 等EMNLP 2024 · 18 次引用
相关 Paper
- ZebraLogic: On the Scaling Limits of LLMs for Logical ReasoningBill Yuchen Lin, Ronan Le Bras, Kyle Richardson, Ashish Sabharwal 等ICML 2025
- DiLA: Enhancing LLM Tool Learning with Differential Logic LayerYu Zhang, Hui-Ling Zhen, Zehua Pei, Yingzhao Lian 等KDD 2026 · 6 次引用
- SATBench: Benchmarking LLMs' Logical Reasoning via Automated Puzzle Generation from SAT FormulasAnjiang Wei, Yuheng Wu, Yingjia Wan, Tarun Suresh 等EMNLP 2025 · 1 次引用
- A Balanced Neuro-Symbolic Approach for Commonsense Abductive LogicJoseph Cotnareanu, Didier Chételat, Yingxue Zhang, Mark CoatesICLR 2026 · 3 次引用
- Lexical Recall or Logical Reasoning: Probing the Limits of Reasoning Abilities in Large Language ModelsHenrike Beyer, Chris ReedACL 2025
