Skip to main content
QUICK REVIEW

[Paper Review] Legal Question-Answering in the Indian Context: Efficacy, Challenges, and Potential of Modern AI Models

Shubham Kumar Nigam, Shubham Kumar Mishra|arXiv (Cornell University)|Sep 26, 2023
Topic ModelingComputer Science5 citations
TL;DR

This study evaluates modern AI models for Indian Legal Question Answering (AILQA) in the criminal law domain, using GPT-3 Davinci with optimized prompting and embedding strategies. It finds that GPT-3-based generative models outperform both ChatGPT and human lawyers in accuracy and relevance, with the Ada + Davinci combination yielding the highest expert ratings and minimal hallucination.

ABSTRACT

Legal QA platforms bear the promise to metamorphose the manner in which legal experts engage with jurisprudential documents. In this exposition, we embark on a comparative exploration of contemporary AI frameworks, gauging their adeptness in catering to the unique demands of the Indian legal milieu, with a keen emphasis on Indian Legal Question Answering (AILQA). Our discourse zeroes in on an array of retrieval and QA mechanisms, positioning the OpenAI GPT model as a reference point. The findings underscore the proficiency of prevailing AILQA paradigms in decoding natural language prompts and churning out precise responses. The ambit of this study is tethered to the Indian criminal legal landscape, distinguished by its intricate nature and associated logistical constraints. To ensure a holistic evaluation, we juxtapose empirical metrics with insights garnered from seasoned legal practitioners, thereby painting a comprehensive picture of AI's potential and challenges within the realm of Indian legal QA.

Motivation & Objective

  • To evaluate the efficacy of modern AI models in answering complex legal questions within India’s unique criminal legal system.
  • To identify optimal combinations of embedding and question-answering models for Indian legal domain tasks.
  • To assess the reliability and accuracy of generative AI models compared to human legal experts using expert-rated evaluations.
  • To address the lack of Indian legal QA datasets and benchmarks by creating a comprehensive evaluation framework.
  • To explore the potential of few-shot prompting and chain-of-thought techniques to improve reasoning in legal AI systems.

Proposed method

  • Utilized the OpenAI GPT-3 Davinci model as a foundational generative model for legal QA.
  • Evaluated eight experimental configurations combining four embedding models (Ada, Instructor, BM25, and GPT-3) with two QA models (Davinci and Flan-UL2).
  • Applied syntactic evaluation metrics (ROUGE-1, ROUGE-2, ROUGE-L, BLEU) and semantic similarity using MPNET embeddings.
  • Conducted expert evaluations with a 5-point rating scale, involving legal practitioners to assess answer quality, relevance, and accuracy.
  • Employed prompt engineering to guide the GPT-3 model in generating contextually appropriate answers from the full legal corpus.
  • Used a retrieval-augmented generation approach, combining BM25 for initial retrieval with GPT-3 for answer generation.

Experimental results

Research questions

  • RQ1How do different embedding and QA model combinations perform in generating accurate answers for Indian criminal law questions?
  • RQ2Can GPT-3-based models outperform both traditional retrieval-based systems and ChatGPT in legal QA tasks within the Indian legal context?
  • RQ3To what extent do generative AI models align with expert legal judgments in terms of answer quality and relevance?
  • RQ4What role does prompt engineering play in minimizing hallucination and improving factual consistency in legal AI responses?
  • RQ5How do semantic and syntactic evaluation metrics correlate with human expert ratings in legal question-answering systems?

Key findings

  • The GPT-3 (Ada)-based embedding model outperformed other embedding models in generating high-quality answers for legal QA tasks.
  • The GPT-3 (Davinci) model consistently delivered the highest answer quality across all evaluation metrics, including expert ratings.
  • The Ada + Davinci combination achieved the highest average expert rating score (4.2 on a 5-point scale), with 21 out of 50 responses rated as '5' (excellent).
  • GPT-3-based models with optimized prompting produced answers that surpassed those from human lawyers in accuracy and relevance, with no instances of hallucination.
  • The Flan-UL2 and LongFormer models showed poor performance in semantic understanding and expert alignment, with expert ratings averaging below 2.0 on the 5-point scale.
  • The BM25 + Davinci pipeline performed worse than all GPT-3-based configurations, indicating that retrieval-only methods are insufficient for complex legal reasoning tasks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.