A Solver-in-the-Loop Framework for Improving LLMs on Answer Set Programming for Logic Puzzle Solving
Not on the map. Why?
Abstract (arXiv)
The rise of large language models (LLMs) has sparked interest in coding assistants. While general-purpose programming languages are well supported, generating code for domain-specific languages remains a challenging problem for LLMs. In this paper, we focus on the LLM-based generation of code for Answer Set Programming (ASP), a particularly effective approach for finding solutions to combinatorial search problems. The effectiveness of LLMs in ASP code generation is currently hindered by the limited number of examples seen during their initial pre-training phase. In this paper, we introduce a novel ASP-solver-in-the-loop approach for solver-guided instruction-tuning of LLMs to addressing the highly complex semantic parsing task inherent in ASP code generation. Our method only requires problem specifications in natural language and their solutions. Specifically, we sample ASP statements for program continuations from LLMs for unriddling logic puzzles. Leveraging the special property of declarative ASP programming that partial encodings increasingly narrow down the solution space, we categorize them into chosen and rejected instances based on solver feedback. We then apply supervised fine-tuning to train LLMs on the curated data and further improve robustness using a solver-guided search that includes best-of-N sampling. Our experiments demonstrate consistent improvements in two distinct prompting settings on two datasets.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 15 of its 36 references that are in the map. First posted on arXiv 18 Dec 2025.
Builds on
15 of 36 references.
References · 15
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023Logic-LM: Empowering Large Language Models with Symbolic Solvers for Faithful Logical Reasoningcited by 391
- 2024Step-DPO: Step-wise Preference Optimization for Long-chain Reasoning of LLMscited by 273
- 2021NeuroLogic A*esque Decoding: Constrained Text Generation with Lookahead Heuristicscited by 154
- 2017Multi-shot ASP solving with clingocited by 115
- 2023SteerLM: Attribute Conditioned SFT as an (User-Steerable) Alternative to RLHFcited by 111
- 2023Skeleton-of-Thought: Prompting LLMs for Efficient Parallel Generationcited by 105
- 2024A Comprehensive Survey of Direct Preference Optimization: Datasets, Theories, Variants, and Applicationscited by 27
- 2024Step-by-Step Reasoning to Solve Grid Puzzles: Where do LLMs Falter?cited by 18
- 2024Arithmetic Reasoning with LLM: Prolog Generation & Permutationcited by 17
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026Pencil Puzzle Bench: A Benchmark for Multi-Step Verifiable Reasoningcited by 5
- 2026Modeling Next-Token Prediction as Left-Nested Intuitionistic Implicationcited by 0
- 2026BLAST: Benchmarking LLMs with ASP-based Structured Testingcited by 0
- 2026Distilling Answer Set Programming Theories from Large Language Modelscited by 0
- 2026Distilling Answer Set Programming Theories from Large Language Models30 Jul 2026
- 2026BLAST: Benchmarking LLMs with ASP-based Structured Testing24 Apr 2026
- 2026Pencil Puzzle Bench: A Benchmark for Multi-Step Verifiable Reasoning2 Mar 2026
- 2026Modeling Next-Token Prediction as Left-Nested Intuitionistic Implication7 Jan 2026