Kafka Meets Code: A Law And Economic Analysis Of AI In Litigation And Justice Delivery

Tathagat Sharma

1 Jun 2025 4:04 PM IST

  • Kafka Meets Code: A Law And Economic Analysis Of AI In Litigation And Justice Delivery

    Please hold is a 2020 short film directed by KD Davila which was nominated for the Best short feature at the 94th Academy Awards. The Movie tells a Kafkaesque tale of a normal man accused of a crime he doesn't know about, in a world where AI manages the prison, including free legal aid to the inmates. Essentially a tale of desperation and the downside of an unsupervised, ill trained AI...

    Please hold is a 2020 short film directed by KD Davila which was nominated for the Best short feature at the 94th Academy Awards. The Movie tells a Kafkaesque tale of a normal man accused of a crime he doesn't know about, in a world where AI manages the prison, including free legal aid to the inmates. Essentially a tale of desperation and the downside of an unsupervised, ill trained AI system. The movie echoes a warning bell with the recent developments of AI in the legal sector, particularly with the entry of the revolutionary DeepSeek AI from China which has, if for nothing else and quite ironic at that, democratized the use and access of Artificial intelligence to a large section of population which was, hitherto, hesitant to fall into the matrix, particularly because of the paywall constraints.

    Multiple articles have been written about the legal and ethical considerations of using AI in various sectors. However, the legal sector, particularly the case of litigation support presents an interesting opportunity, since DeepSeek and ChatGPT, the two primary contenders in the sector, are free to use, at the moment of writing, albeit a premium subscription reasoning engine may gather you more tokens and advanced reasoning respectively, but from the perspective of a lawyer, law firm, and legal scholar the basic engines (V3 and GPT 4o) do the trick, with DeepSeek, by varied claims, performing better than its competitor at OpenAI at executing basic and advanced reasoning and documentary analysis, therefore it begs the question how it can effectively be channelled as a litigation support tool, after all, it can revolutionize free legal aid and the commitment of Article 39A to the indigent and marginalized if it turns out as good as it appears on paper.

    In India's litigation-heavy legal system, the bottlenecks are predictable: massive case backlogs, uneven legal capacity, and expensive legal databases. AI can play a meaningful role in alleviating several pain points. It can help lawyers, and paralegals with document review and electronic discoveries, streamlining the process of due diligence and saving on crucial manhours, particularly in simmering through disclosures that run into thousands of pages, ensuring that practices like Document dumping (a practice of overwhelming the opposing side with irrelevant material) become a thing of the past. Integration of AI Models with the open access E-SCR database of the Supreme Court, or a premium paid database of SCC Online, or Manupatra can help with case law and precedent analysis, as a one stop platform, instead of the multiple platforms and subscriptions required at the present, which tend to be confusing, leading to wastage of resources and repetition of efforts. Standard services that can be automated using AI include contract review and clause extraction which can save on the marginal costs incurred by law firms and lawyers, costs that A-0 associates at a law firm, or newly minted lawyers earn their living on, saving the Senior Advocates and the law firms on the investments costs of learning. Outreach, client communication, and integration with existing case management platforms like ProVakil, Mercury, MyCase can further make it useful for the litigation management particularly in effectively handling case communication to lawyers and clients, making sure that dates aren't missed and transparency is maintained between all the stakeholders involved. Further AI Engines are also capable of crafting simulation strategies for cases fed to it, making sure that regulatory compliances aren't missed, and most possible risks are assessed. Generic Ais can also help in fulfilling the long standing promise of Art. 39A of the Indian Constitution, which guarantees free legal aid to those who cannot afford it. However, the ground reality is that legal aid lawyers are overburdened and under-resourced. AI could help draft responses, summarise FIRs, or simulate arguments based on minimal input, thus amplifying the productivity of Legal aid clinics across the country. With minimal human supervision it can also draft pleadings, witness statements, and transcripts. As the recent experience of the transcription project of the Hon'ble Supreme Court has shown, with only a success rate of 38%, DeepSeek or ChatGPT can be employed to make it robust and errorfree.

    DeepSeek's core architecture is based on a Transformer framework, similar to OpenAI's GPT models, but trained with specific enhancements for multilingual performance and logical reasoning. Independent evaluations—including those on platforms like HuggingFace and LMSys—show DeepSeek outperforming even GPT-4 in certain legal reasoning benchmarks, particularly where token limits and memory span are involved.

    However, not all is as rosy as it appears, prima facie, as a human lawyer prosecuting AI would say it. As the 2023 Ministry of Law and Justice Report highlighted, existing literature on AI in legal systems remains fragmented, with limited empirical studies evaluating its economic benefits. In a budding market like India, where law school are opening by the day and the number of law graduates is increasing each passing year, the natural question arises, do we really need avenues to reduce the investment on human capital in the legal sector, when such cheap labour is readily and willingly available? AI has zero marginal cost per case once implemented, unlike human advocates, however, it does require a substantial upfront investment, which does not conform to the traditional cost-function models, i.e., in traditional legal services, the cost increases with each additional case, the need for more lawyers, more hours, more paper, more court fees, but AI inverts that model, transforming it from a service driven economy to an economy of scales, therefore the lack of research in this area. Further, hallucination risks after two or three set of repetitive instructions particularly with regard to case law research remains real, AI is prone to producing non-relevant or imaginative case facts altogether. It can not only generate non-existent case laws, but also invent citations, or interpret precedent inaccurately. For a legal professional, this is not merely a bug; it's a malpractice risk. Further, fixing accountability, particularly in compliance with the professional ethical code set by the Bar Council of India while using AI remains as issue, while issue of biases remain, AI models inherit biases from training data. If Datasets was trained on skewed or outdated case law, it could reinforce caste-based, gendered, or colonial biases already embedded in India's judicial reasoning. The same critique has been made of COMPAS and other predictive policing tools in the West. Concerns of privacy have not been addressed by DeepSeek's or ChatGPT's algorithm with their processing of data, use of open source coding, and the transmission and storage mechanism remaining opaque.

    Globally, regulatory responses to AI in legal settings have followed one of three paths:

    Cautious permission, like in the UK, where the Solicitors Regulation Authority has allowed AI-assisted advice but with disclosure obligations.

    Outright restrictions, like in Germany, where AI-generated legal documents must be vetted by a licensed attorney.

    Open experimentation, as in parts of the US, where AI has already been used in bail hearings and administrative courts, though not without backlash.

    India has so far taken a regulatory sandbox approach, no formal prohibitions, but no specific permissions either. The NITI Aayog's 2021 discussion paper on Responsible AI calls for "sectoral co-regulation", which would include bar councils, judiciary, and private platforms working together to set norms. But no such initiative has yet materialised for legal AI.

    DeepSeek or ChatGPT, like any foundational model, are neither saviours nor a villains, they are simply tools. When used cautiously and creatively, their use can revolutionise how India delivers justice. It can ease lawyer workloads, expand access to legal aid, and support a rights-based approach to litigation. But blind faith in technological fixes risks entrenching new hierarchies, between tech-literate and tech-excluded lawyers, between well-resourced and poorly equipped courts, between clients who know the difference between human and machine, and those who don't.

    As with most things in law and technology, the challenge is not technical but institutional: Who sets the guardrails? Who checks for fairness? And who bears the cost when the machine gets it wrong?

    The author is Assistant Professor of Law at Vinayaka Mission's Law School, Chennai. Views are personal.


    Next Story