All for law and law for all: Adaptive RAG Pipeline for Legal Research

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Keisha, Figarri, Singh, Prince, Pallavi, Fernandes, Dion, Manivannan, Aravindh, Wicaksono, Ilham, Ahmad, Faisal, Rim, Wiem Ben
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866915488249937920
author Keisha, Figarri
Singh, Prince
Pallavi
Fernandes, Dion
Manivannan, Aravindh
Wicaksono, Ilham
Ahmad, Faisal
Rim, Wiem Ben
author_facet Keisha, Figarri
Singh, Prince
Pallavi
Fernandes, Dion
Manivannan, Aravindh
Wicaksono, Ilham
Ahmad, Faisal
Rim, Wiem Ben
contents Retrieval-Augmented Generation (RAG) has transformed how we approach text generation tasks by grounding Large Language Model (LLM) outputs in retrieved knowledge. This capability is especially critical in the legal domain. In this work, we introduce a novel end-to-end RAG pipeline that improves upon previous baselines using three targeted enhancements: (i) a context-aware query translator that disentangles document references from natural-language questions and adapts retrieval depth and response style based on expertise and specificity, (ii) open-source retrieval strategies using SBERT and GTE embeddings that achieve substantial performance gains while remaining cost-efficient, and (iii) a comprehensive evaluation and generation framework that combines RAGAS, BERTScore-F1, and ROUGE-Recall to assess semantic alignment and faithfulness across models and prompt designs. Our results show that carefully designed open-source pipelines can rival proprietary approaches in retrieval quality, while a custom legal-grounded prompt consistently produces more faithful and contextually relevant answers than baseline prompting. Taken together, these contributions demonstrate the potential of task-aware, component-level tuning to deliver legally grounded, reproducible, and cost-effective RAG systems for legal research assistance.
format Preprint
id arxiv_https___arxiv_org_abs_2508_13107
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle All for law and law for all: Adaptive RAG Pipeline for Legal Research
Keisha, Figarri
Singh, Prince
Pallavi
Fernandes, Dion
Manivannan, Aravindh
Wicaksono, Ilham
Ahmad, Faisal
Rim, Wiem Ben
Computation and Language
Information Retrieval
F.2.2; H.3.3; I.2.7
Retrieval-Augmented Generation (RAG) has transformed how we approach text generation tasks by grounding Large Language Model (LLM) outputs in retrieved knowledge. This capability is especially critical in the legal domain. In this work, we introduce a novel end-to-end RAG pipeline that improves upon previous baselines using three targeted enhancements: (i) a context-aware query translator that disentangles document references from natural-language questions and adapts retrieval depth and response style based on expertise and specificity, (ii) open-source retrieval strategies using SBERT and GTE embeddings that achieve substantial performance gains while remaining cost-efficient, and (iii) a comprehensive evaluation and generation framework that combines RAGAS, BERTScore-F1, and ROUGE-Recall to assess semantic alignment and faithfulness across models and prompt designs. Our results show that carefully designed open-source pipelines can rival proprietary approaches in retrieval quality, while a custom legal-grounded prompt consistently produces more faithful and contextually relevant answers than baseline prompting. Taken together, these contributions demonstrate the potential of task-aware, component-level tuning to deliver legally grounded, reproducible, and cost-effective RAG systems for legal research assistance.
title All for law and law for all: Adaptive RAG Pipeline for Legal Research
topic Computation and Language
Information Retrieval
F.2.2; H.3.3; I.2.7
url https://arxiv.org/abs/2508.13107