← Back to Explore

CONSTITUTIONALITY BOT: Predicting and Justifying the Constitutionality of Legal Cases by Utilizing Natural Language Processing and Reasoning Informed Transformers

JSHS · 2023

Overview

86% of civil legal problems reported by low-income Americans received inadequate or no legal help according to the Legal Services Corporation’s 2017 Justice Gap report. Artificial Intelligence (AI) can be a potential solution to close the Justice Gap and provide equitable legal services to all. Natural Language Processing (NLP) refers to the branch of AI with the ability to understand text, combine computational linguistics and machine learning to produce human-like answers. NLP has been experimented for predicting court judgments, but there are no models looking specifically at predicting whether a legal case is constitutional or unconstitutional. This model not only predicts if an amendment or article of the Constitution was violated but can also provide an explanation for the reasoning behind its prediction. Utilizing an encoder- decoder transformer model called T5, 3,332 cases of the Supreme Court of the United States were collected, formatted, and given as examples to train the model to answer prompts such as “Is the second amendment violated by X?” Although judgment accuracy was not high at 52%, the similarity between supreme court judgments and generated judgments through BERTScore was high (0.7). Amongst the amendments and articles of the constitution, the model seems to be least accurate in predicting cases involving the first amendment. The Constitutionality Bot is operational and is hosted on Hugging Face website for users to use. This model facilitates the first step towards using NLP to provide legal resources to all, and to reduce barriers to justice in our communities. 58

Competition history

  • JSHS 2023 Category not listed

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Source: Junior Science and Humanities Symposium

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google