Skip to content
Open access

Leveraging Retrieval-Augmented Generation to Support Legal Question Answering: Evidence from Indonesian Human Trafficking Court Decisions

Galih Wasis Wicaksono Nur Putri Hidayah Christian Sri Kusuma Aditya Muhammad Hariz Faizul Anwar Nizam Avif Anhari Andiko Febriyan Praja Dewa Herlena Fatikasari Mutiara Anggun Puspa Insani
Jul 2026 · JOIV: International Journal on Informatics Visualization · Vol 10, pp. 1674 · 0 citations

TL;DR

It is demonstrated that RAG significantly reduces the risk of LLM hallucinations in a legal context, and error analysis suggests that future improvements should focus on strengthening generation controls to address these issues: unsupported generation and remaining model-rejection behavior.

Abstract

The exponential growth of court decisions in Indonesia has posed a crucial challenge for legal practitioners in obtaining relevant information. Conventional search systems fail to capture the in-depth legal context, while Large Language Models (LLMs) are prone to producing hallucinations that can mislead legal reasoning. This study proposes and tests the implementation of Retrieval-Augmented Generation (RAG) to support Legal Question Answering LLM-based Quality Assurance (LQA) to improve factual accuracy. This study used 408 Indonesian court decisions related to criminal cases. Human trafficking data collected and standardized from 143 district courts. The RAG framework is designed in three stages: indexing, search, and incremental generation. We evaluated three Open-source LLM models: Gemma, LLaMA, and Qwen. Three models are also combined with two retrieval methods: BM25 (lexical) and Dense (semantics). Experimental results show that Qwen 3, especially when combined with BM25 RAG, consistently produces the highest overall answer quality across all evaluation metrics (ROUGE and BLEU). The BM25 method is significantly more effective than dense retrieval. Due to the highly standardized nature of court decision documents, Qwen demonstrated peak performance on structured information categories such as “identitas_terdakwa”, achieving a ROUGE-L score of 0.899. The primary contribution of this study is demonstrating that RAG significantly reduces the risk of LLM hallucinations in a legal context. However, error analysis suggests that future improvements should focus on strengthening generation controls to address these issues: unsupported generation and remaining model-rejection behavior.

Read PDF

Similar papers

Preprint Aug 2026

Rhetorical-Role-Aware Retrieval-Augmented Generation for Legal Question Answering over Indian Supreme Court Judgments

This research paper proposes a Retrieval Augmented Generation framework that is specific to the legal field in order to assist interactive retrieval and reason about judgments from the Supreme Court of India and demonstrates strong performance on metrics including contextual recall and answer relevancy.

Sayed Ayaan Ahmed Sha, Sangeetha Sivanesan, A. Madasamy et al. · 0 citations
Open access Jul 2026

Bridging Legal Language Barriers Using Explainable AI: Outcome Prediction and Multilingual Knowledge based answer retrieval for Indian Law

An integrated legal AI platform that combines interpretable case outcome prediction with multilingual, retrieval-grounded legal question answering to improve access to Indian law is presented, concluding that transparent machine learning, retrieval-augmented generation, and multilingual interfaces can work together to...

M. D · 0 citations
Open access 2026

Agentic RAG for Legal Question Answering in Civil Law: Evidence From the Korean Bar Examination

In civil law systems, legal professionals navigate sources of law hierarchically, searching for statutes, looking up specific articles, finding relevant cases, and examining full judgment texts in an iterative process. We present an agentic retrieval-augmented generation (RAG) architecture that mirrors this exploration...

E. Lim, Ji-Heon Park · 0 citations
Open access Jul 2026

AILQA: Evaluating AI-Driven Legal Question Answering Systems for the Indian Legal System

This comprehensive study introduces an advanced A rtificial Intelligence for I ndian L egal Q uestion A nswering or system tailored for the Indian legal context. leverages a variety of embedding and generative models, including the latest Large Language Models (LLMs), to address the unique challenges pose...

S. Nigam, Shubham Kumar Mishra, Noel Shallum et al. · 1 citation
Conference Open access 2025

Retrieval-Augmented Generation in Law: System Paradigms and Optimization across the RAG Pipeline

: The legal domain imposes unique demands on Large Language Models (LLMs), requiring high factual accuracy, precise statutory citation, and transparent reasoning. Retrieval-Augmented Generation (RAG) has emerged as a promising paradigm to mitigate hallucinations and improve knowledge grounding in legal applications. Wh...

Xin Li · 0 citations
Open access Jul 2026

An Explainable AI-Based Legal Research Assistant for Precedent Analysis and Judicial Outcome Prediction Using Dense Retrieval and Transformer Models

With more than 45 million cases awaiting disposal across Indian courts as of 2024, the judicial system faces an acute need for faster, smarter tools to support legal research. This work introduces an artificial-intelligence-driven legal research assistant tailored to the jurisprudence of the Supreme Court of India. Sta...

Krish P. Gokhale, Tanvi Kshirsagar, Anugraha Kasbe et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.