Saved in:
Bibliographic Details
Main Authors: Bonlarron, Alexandre, Régin, Florian, De Maria, Elisabetta, Régin, Jean-Charles
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.24012
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912403696910336
author Bonlarron, Alexandre
Régin, Florian
De Maria, Elisabetta
Régin, Jean-Charles
author_facet Bonlarron, Alexandre
Régin, Florian
De Maria, Elisabetta
Régin, Jean-Charles
contents Large Language Models (LLMs) excel at generating fluent text but struggle to enforce external constraints because they generate tokens sequentially without explicit control mechanisms. GenCP addresses this limitation by combining LLM predictions with Constraint Programming (CP) reasoning, formulating text generation as a Constraint Satisfaction Problem (CSP). In this paper, we improve GenCP by integrating Masked Language Models (MLMs) for domain generation, which allows bidirectional constraint propagation that leverages both past and future tokens. This integration bridges the gap between token-level prediction and structured constraint enforcement, leading to more reliable and constraint-aware text generation. Our evaluation on COLLIE benchmarks demonstrates that incorporating domain preview via MLM calls significantly improves GenCP's performance. Although this approach incurs additional MLM calls and, in some cases, increased backtracking, the overall effect is a more efficient use of LLM inferences and an enhanced ability to generate feasible and meaningful solutions, particularly in tasks with strict content constraints.
format Preprint
id arxiv_https___arxiv_org_abs_2505_24012
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Large Language Model Meets Constraint Propagation
Bonlarron, Alexandre
Régin, Florian
De Maria, Elisabetta
Régin, Jean-Charles
Computation and Language
Artificial Intelligence
Large Language Models (LLMs) excel at generating fluent text but struggle to enforce external constraints because they generate tokens sequentially without explicit control mechanisms. GenCP addresses this limitation by combining LLM predictions with Constraint Programming (CP) reasoning, formulating text generation as a Constraint Satisfaction Problem (CSP). In this paper, we improve GenCP by integrating Masked Language Models (MLMs) for domain generation, which allows bidirectional constraint propagation that leverages both past and future tokens. This integration bridges the gap between token-level prediction and structured constraint enforcement, leading to more reliable and constraint-aware text generation. Our evaluation on COLLIE benchmarks demonstrates that incorporating domain preview via MLM calls significantly improves GenCP's performance. Although this approach incurs additional MLM calls and, in some cases, increased backtracking, the overall effect is a more efficient use of LLM inferences and an enhanced ability to generate feasible and meaningful solutions, particularly in tasks with strict content constraints.
title Large Language Model Meets Constraint Propagation
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2505.24012