CoCoLex: Confidence-guided Copy-based Decoding for Grounded Legal Text Generation

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: S, Santosh T. Y. S., Elkhayat, Youssef Tarek, Ichim, Oana, Shetty, Pranav, Wang, Dongsheng, Ma, Zhiqiang, Nourbakhsh, Armineh, Liu, Xiaomo
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911096139415552
author S, Santosh T. Y. S.
Elkhayat, Youssef Tarek
Ichim, Oana
Shetty, Pranav
Wang, Dongsheng
Ma, Zhiqiang
Nourbakhsh, Armineh
Liu, Xiaomo
author_facet S, Santosh T. Y. S.
Elkhayat, Youssef Tarek
Ichim, Oana
Shetty, Pranav
Wang, Dongsheng
Ma, Zhiqiang
Nourbakhsh, Armineh
Liu, Xiaomo
contents Due to their ability to process long and complex contexts, LLMs can offer key benefits to the Legal domain, but their adoption has been hindered by their tendency to generate unfaithful, ungrounded, or hallucinatory outputs. While Retrieval-Augmented Generation offers a promising solution by grounding generations in external knowledge, it offers no guarantee that the provided context will be effectively integrated. To address this, context-aware decoding strategies have been proposed to amplify the influence of relevant context, but they usually do not explicitly enforce faithfulness to the context. In this work, we introduce Confidence-guided Copy-based Decoding for Legal Text Generation (CoCoLex)-a decoding strategy that dynamically interpolates the model produced vocabulary distribution with a distribution derived based on copying from the context. CoCoLex encourages direct copying based on the model's confidence, ensuring greater fidelity to the source. Experimental results on five legal benchmarks demonstrate that CoCoLex outperforms existing context-aware decoding methods, particularly in long-form generation tasks.
format Preprint
id arxiv_https___arxiv_org_abs_2508_05534
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle CoCoLex: Confidence-guided Copy-based Decoding for Grounded Legal Text Generation
S, Santosh T. Y. S.
Elkhayat, Youssef Tarek
Ichim, Oana
Shetty, Pranav
Wang, Dongsheng
Ma, Zhiqiang
Nourbakhsh, Armineh
Liu, Xiaomo
Computation and Language
Due to their ability to process long and complex contexts, LLMs can offer key benefits to the Legal domain, but their adoption has been hindered by their tendency to generate unfaithful, ungrounded, or hallucinatory outputs. While Retrieval-Augmented Generation offers a promising solution by grounding generations in external knowledge, it offers no guarantee that the provided context will be effectively integrated. To address this, context-aware decoding strategies have been proposed to amplify the influence of relevant context, but they usually do not explicitly enforce faithfulness to the context. In this work, we introduce Confidence-guided Copy-based Decoding for Legal Text Generation (CoCoLex)-a decoding strategy that dynamically interpolates the model produced vocabulary distribution with a distribution derived based on copying from the context. CoCoLex encourages direct copying based on the model's confidence, ensuring greater fidelity to the source. Experimental results on five legal benchmarks demonstrate that CoCoLex outperforms existing context-aware decoding methods, particularly in long-form generation tasks.
title CoCoLex: Confidence-guided Copy-based Decoding for Grounded Legal Text Generation
topic Computation and Language
url https://arxiv.org/abs/2508.05534