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

2508.05534v1 cs.CL 2025-08-09
Авторы:

Santosh T. Y. S. S, Youssef Tarek Elkhayat, Oana Ichim, Pranav Shetty, Dongsheng Wang, Zhiqiang Ma, Armineh Nourbakhsh, Xiaomo Liu

Резюме на русском

В Legal domain широко распространена проблема недостоверности и необоснованности текстов, генерируемых подходами Large Language Models (LLMs). Это ограничивает применение LLMs в задачах генерирования юридических текстов, где точность и надежность ключевые. В статье предлагается новый подход CoCoLex — Confidence-guided Copy-based Decoding for Legal Text Generation. Данная стратегия динамически взаимодействует с моделью и контекстом, гибко учитывая уровень уверенности модели в своем выводе. CoCoLex значительно повышает точность и надежность генерируемых текстов, особенно в условиях трудной юридической тематики. Эксперименты на 5 юридических баз исследований показали, что CoCoLex превосходит другие стратегии контекстно-активного декодирования, особенно при работе с длинными юридическими документами.

Abstract

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.

Ссылки и действия