Lawyer Friend
A bilingual legal assistant that drafts RTI petitions citizens can actually file
Answers legal questions in Tamil or English strictly from a curated knowledge base, and produces the whole chain of Right to Information filings: the request, both appeals and the complaint.
- Client
- Legal-tech product, Tamil Nadu
- Role
- AI engineering, with the product team
- Year
- 2026
- Stack
- FastAPI, PostgreSQL, OpenAI, text-embedding-3-small

01The numbers
02The problem
Filing an RTI in Tamil Nadu is a chain, not a form. There's a request, then an appeal if the department stays silent or answers badly, then a second appeal or a complaint. Each step has its own format and deadline, and most people give up after the first.
General chatbots are the wrong tool here. They invent sections of the Act, and their Tamil drifts, with stray Greek or Cyrillic characters showing up mid-sentence.
03What we built
Answers come only from a knowledge base the admins control: judgments, government orders and RTI formats. Documents are chunked and embedded, and retrieval is scored in Postgres with numpy, which kept the whole stack to one database. Every answer streams back with its sources.
Requests go to different models by language and complexity, because Tamil legal reasoning needs a stronger model than an English lookup does.
The documents use two engines on purpose. The first request, RTI 6(1), is written by the model. It's grounded in the knowledge base and per-department question banks, and it has to ask at least ten record-specific questions. The appeals and the complaint are filled in deterministically from the official templates, because their legal wording must not change.
04Architecture
05Engineering notes
- An evaluation harness with a gold set measures retrieval recall, citation precision, Tamil fluency and usefulness. It runs before every prompt or model change.
- Prompt-injection guardrails, plus a normaliser that strips stray non-Tamil script from the output.
- The whole interface is in English and Tamil, not just the answers.
- Plans and per-petition pricing through Razorpay, enforced on the server. Paid one-to-one consultations have their own booking calendar.
- An admin console for documents, users and revenue. Query logs export as training data.
06Stack

