Legal Aid Eligibility Agent · Engineering case study
How we tested a local AI agent for legal aid in India
What should an AI assistant say when someone asks, “Do I qualify for legal aid?” I worked with Amey Chorge and Neal Balsara on a prototype that screens an intake form against explicit rules. A separate local language model helps explain the result and answer follow-up questions.
What one rupee changes
Two fictional applicants in our sample data use the same forum, select no qualifying category and report annual incomes one rupee apart. One sits exactly at the prototype’s sample ceiling. The other sits just above it. The first record passes the income check and the second falls outside it. You can trace the difference to a single comparison in the code.
Missing information is a separate outcome. One of our seven built-in scenarios leaves both category and income blank. Its expected result is a request for more information. The sample ceilings are illustrative. The relevant Legal Services Authority decides actual applications.
How a reader can check an answer
For follow-up questions, the prototype searches a local collection of reference notes on India’s legal-aid framework. It embeds the question, ranks passages by cosine similarity and sends the four closest passages to the local model. The prompt asks for numbered citations. The reader can open the passages and check whether they support the answer.
What we learned from three models
We compared Qwen, Llama and Gemma on the plain-language and citation tasks. In our trials, the 0.8-billion-parameter Qwen model often returned empty or garbled text. Llama 3.1 gave readable answers, and we chose Gemma as the default because it gave direct explanations with citations. Switching models changes the wording while the same intake still goes through the same screening rules.
This was an educational capstone. Our published evaluation covers the prototype’s test scenarios and the team’s observations about model behaviour. The repository records the expected outcomes, the model comparison and the limits of the legal reference data.