A Multi-Stage Prompting and RAG Approach to Generating Legal Analysis in Common Law Systems

Published in JURIX, 2024

Recommended citation: Titus T.H. Ng, Tien-Hsuan Wu, Benjamin Minhao Chen, Yongxi Chen and Ben Kao. A Multi-Stage Prompting and RAG Approach to Generating Legal Analysis in Common Law Systems. In Legal Knowledge and Information Systems: JURIX 2024: The Thirty-seventh Annual Conference, Brno, Czech Republic, 11–13 December 2024 (Vol. 395, p. 387). IOS Press. https://ebooks.iospress.nl/doi/10.3233/FAIA241278

We explore the use of multi-stage prompting with retrieval-augmented generation (RAG) in generating legal analysis. We break the complex legal problems into small steps, including initial analysis, legal query formulation, legal sources retrieval, legal reasoning, result consolidation, and output generation. The design of this framework emulates the process a legal professional in a common law system approaches the problem.