Solving MaxSAT Problems from Natural Language Descriptions with LLMs and PySAT
May 27, 2026ยท
,,,ยท
0 min read
Pedro Orvalho
Marta Kwiatkowska
Guillem Alenyร
Felip Manyร
Image credit: LLM-Solve WorkshopAbstract
Large Language Models (LLMs) provide a flexible interface for interpreting natural language problem descriptions, but they remain unreliable when asked to solve constrained optimisation tasks directly. We study a neuro-symbolic approach in which an LLM translates a natural language description of an optimisation problem into executable Python code using PySAT. The generated program constructs a weighted partial Maximum Satisfiability (MaxSAT) instance, invokes a MaxSAT solver, and returns the resulting assignment in a prescribed output format. In this way, the LLM is used primarily for semantic parsing and modelling, while the optimisation step is delegated to an exact symbolic solver. We outline an end-to-end pipeline consisting of natural language input, intermediate encoding plans, PySAT code generation, MaxSAT solving through RC2, and independent validation of returned solutions. This workshop abstract distils the main idea of using LLMs as natural language front-ends for solver-backed MaxSAT modelling, with the goal of making MaxSAT technology more accessible to users who do not write formal encodings by hand.
Type
Publication
In the 2nd Workshop LLMs meet Constraint Solving (LLM-Solve) @ FLoC 2026.