Sep 4, 2023

Sep 4, 2023

How AI can bring order to India’s complicated legal justice system

Written by:

Sep 1, 2023



Innovations using artificial intelligence are helping simplify and fine-tune the judicial process, as well as providing people with access to justice outside the country’s overburdened courtrooms.

Innovations using artificial intelligence are helping simplify and fine-tune the judicial process, as well as providing people with access to justice outside the country’s overburdened courtrooms.

Innovations using artificial intelligence are helping simplify and fine-tune the judicial process, as well as providing people with access to justice outside the country’s overburdened courtrooms.

This blog was originally posted on Medium.

In 2017, a Supreme Court of India bench sent back a judgement by a high court judge in the state of Himachal Pradesh, saying it was unintelligible. It included phrases such as “the ensuing sequel therefrom” and “​​impugned pronouncement hereat wherewithin”. Court judgements in India are often found guilty of convoluted wording, poor structure, and novella-size lengths. But these documents are the building blocks of the legal justice system, and their quality can have serious consequences. Especially for a population dealing with low levels of literacy and language barriers.

Enter, Agami India. A group of technologists and lawyers that has been leading innovations in law and justice.

Through its OpenNyAI movement, it enlisted 200 law students to break down exactly how to read a judgement, no matter how long or unstructured it may be. After first understanding how legal text really works, they performed an elaborate exercise of calibration, annotation, and automation. All of that laid the groundwork for various AI models which can restructure text, recognise names, and extract a summary from judgements — usually with accuracy as high as 90%.

“What we have done in the last one and a half years is build some open source models, benchmarks, technologies that can actually aid in this understanding of the legal text for us. On top of that, we can build a lot of solutions,” explains Smita Gupta, lawyer and member of Agami India, speaking at the People + AI Campsite. “With these foundational building blocks, we are lowering the barrier to innovation in the country.”

Amplification with AI is here to stay in the justice system. It is expected to improve productivity and ensure that timely justice is delivered.

“The diversity of people in the AI space is very exciting. I’m getting a sneak peek of what the future could look like when everybody is brainstorming. Their view is also grounded in practical questions — how do you make things happen, what really matters right now, what people really value right now. What’s also exciting for me is how the community is articulating the value proposition that AI brings to the people. — Saurabh Karn, OpenNyAI Mission

Elsewhere in the world, a judge in Colombia admitted to having taken help from Open AI’s ChatGPT to draft a legal ruling in a case related to the medical care of a child. Early in 2023, US startup DoNotPay was to use its AI-powered robot lawyer to represent a defendant in a speeding case but changed plans after objection from state prosecutors. Overall, a study published in the Harvard Journal of Law & Technology, based on experiments conducted with 6,000 adults in the US, found that human judges are not always viewed as fairer than A.I. judges.

Solving for India

AI efforts have taken India by storm too. Courts here have been intending to embrace technology. The Supreme Court launched AI tools over the last few years including SUPACE (Supreme Court Portal for Assistance in Court Efficiency), which does data mining, tracks progress of cases, and provides legal research to help judges, and SCI-Interact, a software that makes all its 17 benches paperless. Interestingly, cases such as in the Traffic and Motor Vehicle Safety Act are frequently heard in virtual courts today.

Amid the global AI race, Indian innovators are trying to distance themselves from the noise over robots. “AI judges coming in is not a possibility today. They can aid and assist, but you will still need subject matter experts,” says Smita Gupta. Sachin Malhan, co-founder of Agami, echoes, “We have to move away from the talk around robot judges, and think in terms of a range of problems.”

Here’s why a series of interventions are needed in India. The judicial system is stretched thin, as courts across the country are understaffed. At least 47 million cases were pending, based on a count as of March 2022. About 70,000 of those cases were pending in the Supreme Court, and 40% of them had been pending for over five years. In the 25 Indian high courts, there were 5.9 million pending cases.

There is also a lack of judges. Out of 1,100 judge vacancies in high courts in the country, about 400 to 500 posts remain empty all the time. Meanwhile, the lower judiciary presently has 20% of its capacity vacant, out of around 5,300 seats.

Deep analysis of metadata will allow researchers to locate the most pressing critical areas and interpret solutions for them. For instance, one lawyer who is a part of the OpenNyAI movement is currently working on finding the most litigated section of the Indian Tax Act. In another example, it will be possible to understand how to process land dispute cases, which clog courts across India and make up the largest set of cases in absolute numbers and judicial pendency, typically dragging on for 20 years.

India’s complicated language barrier is one that must be overcome while designing tech interventions. Among the language models already in use are IIT Kharagpur’s InLegalBERT — which includes uniquely Indian legal terms and has been downloaded over 60,000 times — and InCaseLawBERT.

The question so far has been how to reduce the burden on the courts. Solving the problem could involve asking that question in different ways. One of them being: Can justice be taken out of the courts? That is how online dispute resolution or ODR became a piece on which technologists and lawyers in India have been focusing. So far, Agami India has supported more than 15 start-ups providing dispute resolution services, and over 75 enterprises which have implemented ODR within their organisation, and published an ODR handbook which has been downloaded over 1500 times.

“We’ve heard of AI for medicine, for healthcare, for agriculture. But the fact that AI can be used in the legal sector without it replacing judges is something that personally really excites me.” — Rashika Narain, Agami India

Often, ODR can prove cost-effective, timesaving, and convenient. An early adopter of ODR was ICICI Bank, for example, which set out to resolve 10,000 retail loan disputes. It found that the rate of disposal of a case fell from 3 years to just 45 days.

Also present in this innovation landscape are grassroots organisations. There is Gram Vaani, for instance, which uses voice as a medium to equip rural communities with information and encourage them to demand accountability, and Nyaaya, which shares information in various formats including text, video and audio to make the law less intimidating.

With great power comes great responsibility

Because legal outcomes are high stakes, AI solutions for law need to have high accuracy. An error can affect lives and livelihoods.

Addressing the limitations of AI is going to be important. Bias, hallucinations, and explainability are among them. The machines are not sentient yet, but they are remarkable assistants. Therefore, how they are trained matters. Most innovators are thinking about this at the development stage.

When the OpenNyAI team was creating its models, it had to counter subjectivity in the annotation of legal text. One person’s interpretation might differ from another’s, so the team put in a process where a duplicity of at least three was required in each document that was being annotated. Along with that, if even one or two people disagreed with an annotation, it had an adjudication process, where legal experts would go over it and adjudicate. Each decision was carefully considered and cross-examined.

“The fundamental question around trust can be addressed by that openness,” observes Saurabh Karn, a curator at Agami who leads the OpenNyAI mission. “When you have a named entity recognition tool completely built in India, completely open source peer-reviewed, which has a 94% accuracy on the test data, you can clearly see that it has been vetted by a lot of people.”

Ultimately, this will help bring problem posers and solution providers on the same page.

“AI has a bad track record of biases including of gender and race, but its biases are the biases we all have,” reminds lawyer Rahul Matthan, Partner Trilegal. “What AI learns is based on what we are teaching it, so this moment is an opportunity to consciously fix that. We can do this by involving people with different perspectives so they can see if we are fixing problems or just creating different problems.”

Join the Community

People+ai is a non-profit, housed within the EkStep Foundation. Our work is designed around the belief that technology, especially ai, will cause paradigm shifts that can help India & its people reach their potential.