AWS Builder Center
I Built a Legal AI That Answers in Tamil, Hindi and Telugu: Lessons from 34,000+ Indian Legal Records

I Built a Legal AI That Answers in Tamil, Hindi and Telugu: Lessons from 34,000+ Indian Legal Records

Most legal chatbots only speak English and make up citations. Here is how I built a multilingual RAG system with hybrid retrieval and PII anonymization, and what broke along the way.

Ask a chatbot a legal question in Tamil and you will usually get one of two things: an English answer, or a confident answer with a citation that does not exist. I am a final-year AI & Data Science student, and I built NyayaGPT to fix both.

What it does

NyayaGPT is a multilingual legal assistant over 34,000+ Indian legal records. You ask in English, Hindi, Tamil or Telugu and it answers from the real documents, not from the model's memory.

Architecture

![NyayaGPT architecture](UPLOAD architecture-diagram.png HERE)
There are two flows. Indexing happens once. Querying happens on every request.

Why hybrid retrieval

Vector search finds passages with similar meaning. Keyword search finds exact terms like section numbers and case names. Legal text needs both, so NyayaGPT uses hybrid retrieval.
[Add 2-3 lines: how you combine the two scores, and one example query where hybrid beat vector-only. Only write what you tested.]

PII anonymization

Legal records contain names, addresses and other personal details. NyayaGPT anonymizes PII before the data is indexed, so personal details are not stored in the search index.
[Add 1-2 lines on how you did it: library, rules, or a model.]

What went wrong

  1. [Real problem 1, e.g. Tamil or Telugu chunking]
  1. [Real problem 2]
  1. [How you fixed them]

Results

[Only include numbers you measured. If you did not measure, say what you plan to measure next.]

What I would do next

  • Evaluate retrieval quality per language
  • Add guardrails for out-of-scope questions
  • [Your own item]

Try it / source code

  • Portfolio: [your portfolio link]
If you have built RAG for Indian languages, I would love to compare notes in the comments.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article