All for law and law for all: Adaptive RAG Pipeline for Legal Research
Figarri Keisha, Prince Singh, Pallavi, Dion Fernandes, Aravindh Manivannan, Ilham Wicaksono, Faisal Ahmad, Wiem Ben Rim

TL;DR
This paper presents an advanced RAG pipeline tailored for legal research, integrating context-aware query translation, open-source retrieval, and comprehensive evaluation to produce more faithful and relevant legal answers.
Contribution
It introduces a novel end-to-end RAG pipeline with targeted enhancements for legal research, emphasizing cost-efficiency, task-awareness, and reproducibility.
Findings
Open-source retrieval strategies outperform proprietary methods in retrieval quality.
Custom legal-grounded prompts improve answer faithfulness and relevance.
The pipeline achieves competitive performance with cost-effective components.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsArtificial Intelligence in Law · Legal Education and Practice Innovations
