Suffix-Constrained Greedy Search Algorithms for Causal Language Models

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Hammal, Ayoub, Zweigenbaum, Pierre, Corro, Caio
Format: Preprint
Publié: 2026
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866910037019983872
author Hammal, Ayoub
Zweigenbaum, Pierre
Corro, Caio
author_facet Hammal, Ayoub
Zweigenbaum, Pierre
Corro, Caio
contents Large language models (LLMs) are powerful tools that have found applications beyond human-machine interfaces and chatbots. In particular, their ability to generate reasoning traces motivated their use in many prediction tasks like math question answering. Unfortunately, extracting the final answer in an LLM free-form output is difficult, as it is an information extraction problem on its own. In this work, we introduce suffix-constrained generation, that aims to produce well-formed LLM responses in which final answers follow strict templates and are guaranteed to be trivially parseable. To this end, we introduce several algorithms that are based on greedy search procedures. We experiment on several datasets, and show that our approach allows to guarantee trivial deterministic extraction of the final answer from an LLM output without having a negative impact on results, and even improving them.
format Preprint
id arxiv_https___arxiv_org_abs_2603_01243
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Suffix-Constrained Greedy Search Algorithms for Causal Language Models
Hammal, Ayoub
Zweigenbaum, Pierre
Corro, Caio
Computation and Language
Large language models (LLMs) are powerful tools that have found applications beyond human-machine interfaces and chatbots. In particular, their ability to generate reasoning traces motivated their use in many prediction tasks like math question answering. Unfortunately, extracting the final answer in an LLM free-form output is difficult, as it is an information extraction problem on its own. In this work, we introduce suffix-constrained generation, that aims to produce well-formed LLM responses in which final answers follow strict templates and are guaranteed to be trivially parseable. To this end, we introduce several algorithms that are based on greedy search procedures. We experiment on several datasets, and show that our approach allows to guarantee trivial deterministic extraction of the final answer from an LLM output without having a negative impact on results, and even improving them.
title Suffix-Constrained Greedy Search Algorithms for Causal Language Models
topic Computation and Language
url https://arxiv.org/abs/2603.01243