Combining Constraint Programming Reasoning with Large Language Model Predictions
Florian R\'egin, Elisabetta De Maria, Alexandre Bonlarron

TL;DR
This paper introduces a novel method combining Constraint Programming with Large Language Models to improve constrained text generation, achieving faster results and better constraint satisfaction than traditional NLP methods.
Contribution
It presents a new hybrid approach embedding LLMs within CP to handle meaning and structure simultaneously, advancing constrained text generation techniques.
Findings
The combined method outperforms Beam Search in speed.
It ensures all structural constraints are satisfied.
Results show improved quality of generated text.
Abstract
Constraint Programming (CP) and Machine Learning (ML) face challenges in text generation due to CP's struggle with implementing "meaning'' and ML's difficulty with structural constraints. This paper proposes a solution by combining both approaches and embedding a Large Language Model (LLM) in CP. The LLM handles word generation and meaning, while CP manages structural constraints. This approach builds on GenCP, an improved version of On-the-fly Constraint Programming Search (OTFS) using LLM-generated domains. Compared to Beam Search (BS), a standard NLP method, this combined approach (GenCP with LLM) is faster and produces better results, ensuring all constraints are satisfied. This fusion of CP and ML presents new possibilities for enhancing text generation under constraints.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
