AyushCoder9/ContraLegal-AI
An AI-powered legal dashboard that uses NLP and Machine Learning to instantly identify, classify, and cluster high-risk clauses in PDF commercial contracts.
What's novel
An AI-powered legal dashboard that uses NLP and Machine Learning to instantly identify, classify, and cluster high-risk clauses in PDF commercial contracts.
Code Analysis
21 files read · 5 roundsA Streamlit-based contract risk analysis tool that classifies PDF contract clauses as High/Medium/Low risk using a hybrid of ML (Legal-BERT or TF-IDF+Random Forest) and weighted keyword matching, with optional RAG-powered LLM chat, clause explanation/rewriting, and PDF highlighting.
Strengths
Well-structured multi-layer architecture with clean separation between data pipeline, inference, model training, and UI; the BERT training pipeline with class-weighted loss, early stopping, and ablation study is legitimate ML engineering; the RAG/LLM integration with multi-provider support and structured prompts is well-implemented.
Weaknesses
No test suite whatsoever; the 'clause segmentation' is just character-based chunking, not semantic clause detection; the training data is synthetically labeled with a simple keyword heuristic rather than real legal annotations, undermining the ML model's validity; the PDF annotator's text matching is fragile with wrapped text.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
67
Contributors
3
Files
36
Active weeks
2
Repository
Language
Python
Stars
2
Forks
1
License
—