Reliable Reasoning with Large Language Models via Preference-Based Maximum Satisfiability

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Orvalho, Pedro, Kwiatkowska, Marta, Alenyà, Guillem, Manyà, Felip
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866914613214314496
author Orvalho, Pedro
Kwiatkowska, Marta
Alenyà, Guillem
Manyà, Felip
author_facet Orvalho, Pedro
Kwiatkowska, Marta
Alenyà, Guillem
Manyà, Felip
contents Large Language Models (LLMs) excel at understanding natural language but struggle with optimisation tasks involving multiple constraints and user-defined preferences, which commonly arise in domains such as robotics. We propose a hybrid reasoning approach in which LLMs externalise reasoning through code generation. Given a natural language problem description, an LLM generates Python code that encodes user-defined constraints and preferences as a preference-based Maximum Satisfiability (MaxSAT) problem, which is then solved by an exact MaxSAT solver. To ensure correctness, solutions returned by the model-generated code are independently verified for feasibility and optimality against a canonical MaxSAT encoding, allowing for different encodings and multiple optimal solutions. We evaluate our approach using both open-source and closed-access LLMs on three families of preference-based reasoning tasks, and compare it against direct-answer, chain-of-thought, and program-of-thought baselines using the same models. While these baselines rarely produce feasible solutions, the MaxSAT-based pipeline achieves substantially higher acceptance rates, in some cases exceeding 80%. Our results demonstrate that LLM-driven code generation combined with preference-based MaxSAT enables solver-verifiable optimisation with respect to generated encodings, and substantially improves correctness under independently verified reference semantics.
format Preprint
id arxiv_https___arxiv_org_abs_2605_29687
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Reliable Reasoning with Large Language Models via Preference-Based Maximum Satisfiability
Orvalho, Pedro
Kwiatkowska, Marta
Alenyà, Guillem
Manyà, Felip
Artificial Intelligence
Logic in Computer Science
Large Language Models (LLMs) excel at understanding natural language but struggle with optimisation tasks involving multiple constraints and user-defined preferences, which commonly arise in domains such as robotics. We propose a hybrid reasoning approach in which LLMs externalise reasoning through code generation. Given a natural language problem description, an LLM generates Python code that encodes user-defined constraints and preferences as a preference-based Maximum Satisfiability (MaxSAT) problem, which is then solved by an exact MaxSAT solver. To ensure correctness, solutions returned by the model-generated code are independently verified for feasibility and optimality against a canonical MaxSAT encoding, allowing for different encodings and multiple optimal solutions. We evaluate our approach using both open-source and closed-access LLMs on three families of preference-based reasoning tasks, and compare it against direct-answer, chain-of-thought, and program-of-thought baselines using the same models. While these baselines rarely produce feasible solutions, the MaxSAT-based pipeline achieves substantially higher acceptance rates, in some cases exceeding 80%. Our results demonstrate that LLM-driven code generation combined with preference-based MaxSAT enables solver-verifiable optimisation with respect to generated encodings, and substantially improves correctness under independently verified reference semantics.
title Reliable Reasoning with Large Language Models via Preference-Based Maximum Satisfiability
topic Artificial Intelligence
Logic in Computer Science
url https://arxiv.org/abs/2605.29687