Attributed Question Answering for Preconditions in the Dutch Law

Felicia Redelaar, Romy van Drie, Suzan Verberne, Maaike de Boer2024 · DOI

TL;DR

Researchers have developed a specialized Retrieval-Augmented Generation (RAG) pipeline to answer complex "precondition" questions (e.g., "When is a student eligible for financing?") within the context of Dutch law. By introducing a new manually curated dataset of 102 legal QA pairs with ground-truth attributions, the study demonstrates that high-quality, verifiable legal advice is achievable, with GPT-4o and multilingual dense retrievers leading the way.

What Problem Does This Paper Address?

Navigating the legal system is a daunting task for laypeople, often due to high costs and the opaque nature of legal language. While AI-driven Question Answering (QA) systems offer a potential solution, the legal domain demands more than just a "plausible" answer—it requires verifiability.

Most existing QA systems struggle with "long-form" legal questions that involve preconditions (the specific criteria that must be met before a legal action can occur). Furthermore, these systems often fail to provide attributions—direct pointers to the specific law articles that support an answer. Without these citations, a user cannot verify the advice, and the risk of "hallucinations" remains a significant barrier to adoption in justice systems.

Methods

The authors implement a Retrieval-Augmented Generation (RAG) pipeline tailored for the Dutch language. The process follows a standard two-stage architecture but with specific optimizations for legal text:

  1. Retrieval: The system searches a knowledge corpus of Dutch law articles. The researchers compared three types of retrievers:
  2. Sparse: BM25 (keyword-based).
  3. Dense: Embedding-based models like SBERT, E5, and DRAGON.
  4. Hybrid: SPLADE, which combines keyword and semantic search.
  5. Generation: The retrieved articles are fed into a Large Language Model (LLM) along with the user's question. The LLM is prompted to generate a long-form answer and a list of "DOC IDs" (attributions).
  6. Evaluation: The study extends the ALCE (Automatic LLMs’ Citation Evaluation) framework. They use G-EVAL (using an LLM as a judge) to measure fluency, consistency, and relevance, alongside traditional metrics like ROUGE-L and METEOR for correctness.

Datasets

The paper introduces two key resources:

  • The Knowledge Corpus: A processed collection of 273 Dutch laws, parsed from XML into 30,803 text chunks (max 150 words each) to ensure precise retrieval and citation.
  • The AQA Dataset: A new benchmark consisting of 102 question-answer pairs. These were manually formulated by looking for subordinating conjunctions (like "only if") in law texts. Crucially, every answer was verified by a legal expert for correctness and includes ground-truth attributions to specific law articles.

Key Insights and Ideas

  • Preconditions as a Framework: By focusing specifically on "preconditions," the authors target the logical core of law. Law is essentially a set of "if-then" statements; capturing these accurately is the most effective way to help laypeople understand their rights.
  • The Multilingual Advantage: The researchers found that E5-multilingual-large significantly outperformed other retrievers. Interestingly, DRAGON (a state-of-the-art English retriever) performed poorly, highlighting that legal RAG systems are highly sensitive to language-specific training.
  • The Attribution Gap: While open-source Dutch models like GEITje-7B were fluent, they lagged significantly behind proprietary models (GPT-4o) in citation accuracy. This suggests that "reasoning" over multiple legal documents to extract specific citations is a high-level capability that smaller models haven't yet mastered.

Key Results

  • Retrieval Performance: The E5-multilingual-large model achieved a Hit@10 of 0.961, meaning the correct law article was in the top 10 results 96% of the time.
  • Generation Quality: GPT-4o was the top performer across nearly all metrics, achieving a HitRate@5 of 0.830 for citation quality. This means it correctly cited the necessary law articles in 83% of cases.
  • Open Source vs. Proprietary: There is a notable performance gap. GPT-4o scored ~0.63 on ROUGE-L (correctness), while the best open-source model, GEITje-7B-ultra, scored ~0.38. However, GEITje was noted for producing the most "fluent" Dutch responses among the open-source options.

Limitations and Future Work

The authors acknowledge several constraints:

  • Dataset Size: 102 QA pairs is a small sample size for broad legal generalization.
  • Expert Validation: The dataset was verified by only one legal expert; future iterations would benefit from multiple expert perspectives to account for legal interpretation variance.
  • Linguistic Bias: The method for creating questions (searching for "if/then" keywords) might inadvertently bias the system toward specific types of legislative phrasing, potentially missing more nuanced legal requirements.
  • Future Directions: The team plans to expand the dataset to include other document types, such as case law (jurisdictions), and to conduct human evaluations to see if laypeople actually find these AI-generated answers helpful and understandable.

Summary updated

Abstract

In this paper, we address the problem of answering questions about preconditions in the law, e.g."When can the court terminate the guardianship of a natural person?".When answering legal questions, it is important to attribute the relevant part of the law; we therefore not only generate answers but also references to law articles.We implement a retrieval augmented generation (RAG) pipeline for longform answers based on the Dutch law, using several state-of-the-art retrievers and generators.For evaluating our pipeline, we create a dataset containing 102 legal QA pairs with attributions.Our experiments show promising results on our extended version for the automatic evaluation metrics from the Automatic LLMs' Citation Evaluation (ALCE) Framework and the G-EVAL Framework.Our findings indicate that RAG has significant potential in complex, citation-heavy domains like law, as it helps laymen understand legal preconditions and rights by generating high-quality answers with accurate attributions.
BibTeX
@misc{redelaar2024attributed,
  author = {Felicia Redelaar and Romy van Drie and Suzan Verberne and Maaike de Boer},
  title = {{Attributed Question Answering for Preconditions in the Dutch Law}},
  year = {2024},
  doi = {10.18653/v1/2024.nllp-1.12},
}
Figure