Giter Site home page Giter Site logo

somsubhra04 / llm_legal_prompt_generation Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 550 KB

Data and codes for the EMNLP 2023 paper 'LLMs – the Good, the Bad or the Indispensable?: A Use Case on Legal Statute Prediction and Legal Judgment Prediction on Indian Court Cases'

Python 53.37% Jupyter Notebook 46.63%
bias ethics-in-ai explainability fairness language-model llms nlp legal-judgement-prediction legal-statute-prediction emnlp2023

llm_legal_prompt_generation's Introduction

LLMs – the Good, the Bad or the Indispensable?: A Use Case on Legal Statute Prediction and Legal Judgment Prediction on Indian Court Cases

This repository contains the relevant data and codes for the paper 'LLMs – the Good, the Bad or the Indispensable?: A Use Case on Legal Statute Prediction and Legal Judgment Prediction on Indian Court Cases' accepted to the Findings of the EMNLP 2023 conference.

Here's a directory tree.

LLM_Legal_Prompt_Generation
├── Judgment Prediction
│   ├── LLM
│   │   ├── Codes
│   │   │   ├── jp.py
│   │   │   ├── jpe.py
│   │   ├── Datasets
│   │   │   ├── JP.csv
│   │   │   ├── JPE.csv
│   │   │   ├── JPE_with_pet_res.csv
│   │   │   ├── JP_with_pet_res.csv
│   │   ├── readme.md
│   ├── Transformer based Models
│   │   ├── Codes
│   │   │   ├── Evalution on ILDC expert dataset.ipynb
│   │   │   ├── Legal_judgment_training_with_transformers.py
│   │   ├── Datasets
│   │   │   ├── readme.md
│   ├── surname_wordlist
│   │   ├── hindu_surname_file.txt
│   │   ├── muslim_surname_file.txt
├── Statute Prediction
│   ├── Baseline Models
│   │   ├── data_generator.py
│   │   ├── evaluate.py
│   │   ├── metrics.py
│   │   ├── train.py
│   │   ├── utils.py
│   │   ├── Model
│   │   │   ├── Multi-label Classification
│   │   │   │   ├── net.py
│   │   │   ├── Binary Classification
│   │   │   │   ├── net.py
│   │   ├── Experiments
│   │   │   ├── params
│   │   │   │   ├── params_inlegalbert.json
│   │   │   │   ├── params_legalbert.json
│   │   │   │   ├── params_xlnet.json
│   ├── LLM
│   │   ├── Codes
│   │   │   ├── ALL TASK CODE.ipynb
│   │   │   ├── ALL TASK CODE.py
│   │   ├── Datasets
│   │   │   ├── 13_Cases_Gender and Bias Prediction_with explanations.csv
│   │   │   ├── 245cases.csv
│   │   │   ├── Gender and Religion Bias cases.csv
│   │   │   ├── query.csv
│   │   │   ├── statute_pred_100_cases_without_exp-gender_religion_bias.csv
│   │   │   ├── statute_pred_100_cases_without_exp.csv
│   │   │   ├── statute_pred_45_cases_with_exp.csv
│   │   │   ├── statute_pred_45_cases_without_exp.csv
│   │   ├── readme.md
├── README.md

Abstract

The Large Language Models (LLMs) have impacted many real-life tasks. To examine the efficacy of LLMs in a high-stake domain like law, we have applied state-of-the-art LLMs for two popular tasks: Statute Prediction and Judgment Prediction, on Indian Supreme Court cases. We see that while LLMs exhibit excellent predictive performance in Statute Prediction, their performance dips in Judgment Prediction when compared with many standard models. The explanations generated by LLMs (along with prediction) are of moderate to decent quality. We also see evidence of gender and religious bias in the LLM-predicted results. In addition, we present a note from a senior legal expert on the ethical concerns of deploying LLMs in these critical legal tasks.

Authors

Shaurya Vats, Atharva Zope, Somsubhra De, Anurag Sharma, Upal Bhattacharya, Shubham Kumar Nigam, Shouvik Kumar Guha, Koustav Rudra, Kripabandhu Ghosh

Citation

@inproceedings{vats-etal-2023-llms,
    title = "{LLM}s {--} the Good, the Bad or the Indispensable?: A Use Case on Legal Statute Prediction and Legal Judgment Prediction on {I}ndian Court Cases",
    author = "Vats, Shaurya  and
      Zope, Atharva  and
      De, Somsubhra  and
      Sharma, Anurag  and
      Bhattacharya, Upal  and
      Nigam, Shubham  and
      Guha, Shouvik  and
      Rudra, Koustav  and
      Ghosh, Kripabandhu",
    editor = "Bouamor, Houda  and
      Pino, Juan  and
      Bali, Kalika",
    booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2023",
    month = dec,
    year = "2023",
    address = "Singapore",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2023.findings-emnlp.831",
    pages = "12451--12474",
    abstract = "The Large Language Models (LLMs) have impacted many real-life tasks. To examine the efficacy of LLMs in a high-stake domain like law, we have applied state-of-the-art LLMs for two popular tasks: Statute Prediction and Judgment Prediction, on Indian Supreme Court cases. We see that while LLMs exhibit excellent predictive performance in Statute Prediction, their performance dips in Judgment Prediction when compared with many standard models. The explanations generated by LLMs (along with prediction) are of moderate to decent quality. We also see evidence of gender and religious bias in the LLM-predicted results. In addition, we present a note from a senior legal expert on the ethical concerns of deploying LLMs in these critical legal tasks.",
}

Contact Us

Feel free to write your queries or questions to kripaghosh[at]iiserkol[dot]ac[dot]in.

llm_legal_prompt_generation's People

Contributors

somsubhra04 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

llm_legal_prompt_generation's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.