ContractClarity
"A web-based AI powered application that helps users understand complex legal contracts by simplifying difficult legal language, highlighting risky clauses, and generating easy-to-read summaries. ContractClarity combines AI analysis using Google Gemini with rule-based extraction to provide structured insights from PDF and text contracts."
Problem Statement
Today, users frequently accept contracts such as Terms and Conditions, NDAs, and service agreements without fully understanding them due to complex legal language. This lack of understanding can lead to users unknowingly agreeing to unfavorable terms. There is a need for a system that can automatically simplify contracts and highlight important and risky clauses so that users can make informed decisions.
Literature Review / Market Research
Existing solutions include manual legal review and some AI-based contract analysis tools. However, manual review is slow and requires legal expertise. Many AI tools focus only on summarization and do not provide structured risk insights. This project focuses on combining AI summarization with rule-based extraction to improve clarity and usability.
Research Gap / Innovation
This project combines rule-based extraction and AI-based analysis. The rule-based system extracts important factual information such as dates, penalties, and obligations, while Google Gemini is used to simplify and summarize the contract. This combination improves both accuracy and readability.
System Methodology
Dataset / Input
The system accepts contract files in PDF and text formats uploaded by the user. Text is extracted using libraries such as pdfplumber and processed for analysis. The extracted content is then used for rule-based extraction and AI-based summarization.
Model / Architecture
TThe system uses Google Gemini API to generate simplified summaries and explanations of contract content. A Python-based rule engine is used alongside to detect important keywords and extract specific contract details. The backend is implemented using Flask.
System Flowchart
index.html] --> B[User Uploads Contract File] B --> C[Flask Backend Receives File
app.py] C --> D[Extract Text from File] D --> E{Gemini API Key Available?} E -- Yes --> F[AI Analysis
analyzer.py
Google Gemini] E -- No --> G[Rule-Based Analysis
rule_based.py] F --> H[Generate Risk Score
Summary & Advice] G --> H H --> I[Highlight Risky Clauses
highlighter.py
PyMuPDF] I --> J[Send Results to Flask
app.py] J --> K[Display Results to User
index.html] K --> L[Delete Uploaded File
Privacy Protection] L --> M[End]
Results & Analysis
The system successfully generates simplified summaries and highlights important clauses from uploaded contracts. Testing with various agreement samples showed that the application can effectively improve readability and help users quickly understand key terms.
Academic Credits
Project Guide
Dr. Mayank Namdev
Solo Developer
Jayant Kumar
2427030448