cs.CLFeb 25, 2026

Enhancing Legal LLMs through Metadata-Enriched RAG Pipelines and Direct Preference Optimization

Authors: Suyash Maniyar, Deepali Singh, Rohith Reddy

Abstract

Large Language Models (LLMs) perform well in short contexts but degrade on long legal documents, often producing hallucinations such as incorrect clauses or precedents. In the legal domain, where precision is critical, such errors undermine reliability and trust. Retrieval Augmented Generation (RAG) helps ground outputs but remains limited in legal settings, especially with small, locally deployed models required for data privacy. We identify two failure modes: retrieval errors due to lexical redundancy in legal corpora, and decoding errors where models generate answers despite insufficient context. To address this, we propose Metadata Enriched Hybrid RAG to improve document level retrieval, and apply Direct Preference Optimization (DPO) to enforce safe refusal when context is inadequate. Together, these methods improve grounding, reliability, and safety in legal language models.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. NeuroSymbolic AI for Legal AI-TRISM: Trustworthy, Reliable, Interpretable, Safe Models

    Apr 5, 2026Deepa Tilwani, Yash Saxena, Ankur Padia +2LLM ReliabilityNeuro-Symbolic AI

  2. Building Legal Reward Models for Grounding and Abstention

    Sep 13, 2026Rilton Franzone, Valentin Noël, Puyu Wang +2Reward ModelingLLM Grounding