用结构化提示让大模型高效处理长篇法律文本
LLMs for LLMs: A Structured Prompting Methodology for Long Legal Documents
- 分块增强+定制提示,解决长文档处理难题
- 在CUAD数据集上性能领先前法9%,达当前最优
- 适合法律AI可解释性研究者参考
大型语言模型(LLMs)在多个领域产生深远影响,但在法律领域的应用受限于可靠性与透明度问题。本文提出一种结构化提示方法,作为昂贵微调的替代方案,用于处理来自CUAD数据集的长篇法律文档信息检索任务。首先通过分块与增强策略将文档拆解,以应对长文本挑战;随后结合精心设计的提示,输入QWEN-2模型生成多组答案;最后引入基于分布定位与逆基数加权的启发式策略,解决候选答案选择问题。该方法利用通用模型实现长期可扩展性,通过提示工程提升可靠性,并借助两项启发式策略减轻黑箱效应。实验表明,该方法性能比先前方法最高提升9%,达到当前最优水平。同时,研究也揭示了现有自动评估指标在问答任务中的局限性,呼吁未来研究改进。本工作旨在强调结构化提示工程在确保法律领域乃至更广范围AI责任与可信性方面的潜力。
原文摘要 · Abstract (English)
The rise of Large Language Models (LLMs) has had a profoundly transformative effect on a number of fields and domains. However, their uptake in Law has proven more challenging due to the important issues of reliability and transparency. In this study, we present a structured prompting methodology as a viable alternative to the often expensive fine-tuning, with the capability of tacking long legal documents from the CUAD dataset on the task of information retrieval. Each document is first split into chunks via a system of chunking and augmentation, addressing the long document problem. Then, alongside an engineered prompt, the input is fed into QWEN-2 to produce a set of answers for each question. Finally, we tackle the resulting candidate selection problem with the introduction of the Distribution-based Localisation and Inverse Cardinality Weighting heuristics. This approach leverages a general purpose model to promote long term scalability, prompt engineering to increase reliability and the two heuristic strategies to reduce the impact of the black box effect. Whilst our model performs up to 9\% better than the previously presented method, reaching state-of-the-art performance, it also highlights the limiting factor of current automatic evaluation metrics for question answering, serving as a call to action for future research. However, the chief aim of this work is to underscore the potential of structured prompt engineering as a useful, yet under-explored, tool in ensuring accountability and responsibility of AI in the legal domain, and beyond.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。