Smart Legal Contracts - AI Arbitration Detection
An AI arbitration detection tool achieving 85%+ accuracy using Legal BERT and RAG.
Role: AI Research Assistant. Team: Individual (with Georgia Tech AI Research Lab). Status: Research. Year: 2025.
Overview
Smart Legal Contracts analyzes uploaded legal documents and flags arbitration clauses using Legal BERT and RAG. It combines semantic and keyword retrieval so the system can catch different ways the same legal idea is written.
The tool reached 85%+ accuracy on the project benchmark. This work was presented at Harvard NCRC 2025.
Stack:
- AI: Legal BERT and RAG
- Backend: Python and FastAPI
- Frontend: React
- Retrieval: Hybrid keyword and semantic search
Key features
- Legal-BERT embeddings tuned on court opinions for in-domain recall
- Curated clause library of known-friendly and known-hostile variants
- Hybrid BM25 + pgvector retrieval with cross-encoder reranking
- GPT-4 rewriter scoped to flagged clauses only, with tradeoff commentary
- 85%+ accuracy on curated arbitration-clause benchmark
- Research presented at Harvard NCRC 2025
Technical details
- Embeddings: Legal-BERT, sentence-transformers all-MiniLM-L6-v2
- Retrieval: Hybrid BM25 + pgvector cosine + cross-encoder reranker
- Rewriter: GPT-4 with structured commentary
- Backend: FastAPI + SQLAlchemy, async endpoints
- Frontend: Streamlit demo + React preview
- Deploy: Cloud Run with lazy model loading
Challenges
- Achieving in-domain accuracy without large labeled training sets
- Balancing precision vs recall on legal clause detection
- Handling diverse clause phrasings across jurisdictions
- Producing explainable outputs that legal professionals can trust
Tags: Python, FastAPI, Legal BERT, RAG, React