A solver-in-the-loop framework for improving LLMs on answer set programming for logic puzzle solving [Poster]

  • 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 Answer Set Programming (ASP) code, a particularly effective approach for finding solutions to combinatorial search problems. However, the effectiveness of LLMs in ASP code generation is hindered by the limited number of examples seen during their initial pre-training phase. In this paper, we introduce a novel approach for solver-guided instruction-tuning of LLMs for addressing the highly complex semantic parsing task inherent in ASP code generation. We sample ASP statements for program continuations proposed by LLMs for unriddling logic puzzles and categorize them into chosen and rejected instances based on solver feedback. We then apply supervised fine-tuning to train LLMs on the curated data, andThe 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 Answer Set Programming (ASP) code, a particularly effective approach for finding solutions to combinatorial search problems. However, the effectiveness of LLMs in ASP code generation is hindered by the limited number of examples seen during their initial pre-training phase. In this paper, we introduce a novel approach for solver-guided instruction-tuning of LLMs for addressing the highly complex semantic parsing task inherent in ASP code generation. We sample ASP statements for program continuations proposed by LLMs for unriddling logic puzzles and 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 different datasets.show moreshow less

Export metadata

Statistics

Number of document requests

Additional Services

Share in Twitter Search Google Scholar
Metadaten
Author:Timo Schrader, Tobias Kaminski, Annemarie FriedrichORCiDGND, Lukas Lange, Simon Razniewski
Frontdoor URLhttps://opus.bibliothek.uni-augsburg.de/opus4/128427
Parent Title (English):AAAI 2026: 40th Annual AAAI Conference on Artificial Intelligence, January 20–27, 2026, Singapore
Type:Conference Proceeding
Language:English
Date of Publication (online):2026/02/27
Year of first Publication:2026
Publishing Institution:Universität Augsburg
Release Date:2026/03/02
Institutes:Fakultät für Angewandte Informatik
Fakultät für Angewandte Informatik / Institut für Informatik
Fakultät für Angewandte Informatik / Institut für Informatik / Lehrstuhl für Computerlinguistik
Dewey Decimal Classification:0 Informatik, Informationswissenschaft, allgemeine Werke / 00 Informatik, Wissen, Systeme / 004 Datenverarbeitung; Informatik
Latest Publications (not yet published in print):Aktuelle Publikationen (noch nicht gedruckt erschienen)