Answering Questions in Stages: Prompt Chaining for Contract QA

Adam Roegiest,Radha Chitta
2024-10-10
Abstract:Finding answers to legal questions about clauses in contracts is an important form of analysis in many legal workflows (e.g., understanding market trends, due diligence, risk mitigation) but more important is being able to do this at scale. Prior work showed that it is possible to use large language models with simple zero-shot prompts to generate structured answers to questions, which can later be incorporated into legal workflows. Such prompts, while effective on simple and straightforward clauses, fail to perform when the clauses are long and contain information not relevant to the question. In this paper, we propose two-stage prompt chaining to produce structured answers to multiple-choice and multiple-select questions and show that they are more effective than simple prompts on more nuanced legal text. We analyze situations where this technique works well and areas where further refinement is needed, especially when the underlying linguistic variations are more than can be captured by simply specifying possible answers. Finally, we discuss future research that seeks to refine this work by improving stage one results by making them more question-specific.
Computation and Language,Computer Vision and Pattern Recognition,Machine Learning
What problem does this paper attempt to address?
The problem that this paper attempts to solve is how to generate structured answers more effectively when dealing with complex clauses in legal contracts. Specifically, the paper focuses on finding answers to specific questions in legal texts, especially when these texts are long and contain information irrelevant to the questions. Traditional single - stage prompting methods perform poorly in such cases because they cannot handle long and complex legal clauses well. For this reason, the paper proposes a two - stage prompting chain strategy, aiming to improve the understanding of complex legal texts and the accuracy of answering by first generating a summary of the legal text related to the question, and then selecting the correct answer option based on this summary. This method is particularly suitable for multiple - choice or multi - option legal questions and can handle legal texts with nuances more effectively than simple single - stage prompting methods.