Keywords: Macao's judicial documents, Retrieval augmented generation, Structured knowledge base, Legal Question Answering
Paper Type: Demo papers
Abstract: Despite their advancements in legal AI, large language models (LLMs) continue to struggle with processing court judgments from jurisdictions marked by historical legal pluralism, such as Macao. The rigid translated legal terms, absence of unified structure and complex but varied legal reasoning styles, leading to model hallucinations and comprehension difficulties. In this paper, we introduce the Macao Legal Case-based Question Answering (MLCQA) system, a novel case retrieval augmented generation (RAG) system tailored to this unique legal environment.
MLCQA transforms unstructured judgments into structured fields using a hybrid extraction pipeline that combines LLM parsing with regex rules. The LLM is guided by a Legal Syllogism prompt to induce expert-style reasoning, enabling the reconstruction of a clear chain linking legal provisions, judges’ interpretation, factual circumstances, and verdict.
Unlike standard legal RAG systems that operate on full cases, MLCQA selects different field combinations to drive a multi-stage pipeline for retrieval, reranking, and answer generation, reflecting how legal experts focus on different information at different procedural stages. The system also integrates built-in citations that link answers directly to the referenced legal provisions or precedents. Evaluation shows that MLCQA achieves substantial gains in accuracy, terminology use, and clarity, demonstrating that integrating structured legal knowledge can deliver strong performance.
Poster PDF: pdf
Submission Number: 32
Loading