Inspiration
Contracts are designed to prevent disputes, but traditional contract review is often defensive. Lawyers read a document, identify obvious issues, and suggest changes.
We wanted to flip that model.
Our inspiration for LEXRISK came from a simple question:
What if you could attack a contract before the other side gets the chance?
Instead of asking AI only to summarize a contract, LEXRISK acts like an adversarial legal review team. It looks for ambiguities, contradictions, loopholes, missing protections, and clauses that could become leverage for opposing counsel.
The goal was not to replace lawyers. It was to give them a powerful pre-negotiation stress test.
What it does
LEXRISK — Attack the contract before they do.
LEXRISK transforms a contract into an adversarial review workflow:
Contract → Clause Extraction → Attack → Defence → Neutral Review → Risk → Fix → Redline
The system:
- Extracts and identifies contract clauses.
- Simulates Opposing Counsel looking for ways to exploit weaknesses.
- Simulates Client Counsel defending the client's position.
- Uses a Neutral Reviewer to determine which interpretation is better supported.
- Assigns risk severity and confidence.
- Shows the exact clause/evidence behind each finding.
- Identifies worst-case scenarios.
- Recommends practical remediation.
- Generates proposed AI redlines for lawyer review.
- Allows the lawyer to accept or reject suggested changes.
- Exports the resulting analysis.
A key principle is evidence grounding. Instead of presenting unsupported legal claims as facts, LEXRISK ties findings back to specific contract language and can indicate when available evidence is insufficient.
How we built it
LEXRISK uses a full-stack architecture:
- React + TypeScript + Vite for the frontend.
- FastAPI + Python for the backend API.
- Google Gemini for structured adversarial contract analysis.
- Pydantic for structured AI responses.
- PDF, DOCX, TXT and Markdown extraction for contract ingestion.
- ReportLab / python-docx for document exports.
- Vercel for frontend deployment.
- Render for backend deployment.
The AI pipeline was designed around structured outputs rather than simply asking an LLM to generate a long paragraph.
Each risk follows a structured chain:
Risk → Severity → Clause → Evidence → Attack → Defence → Neutral Finding → Worst Case → Recommended Fix → Redline
This makes every finding easier for a lawyer to inspect and challenge.
We also built a Demo Contract and prototype validation environment so the system could be demonstrated consistently during judging.
Challenges we ran into
The biggest challenge was balancing AI usefulness with legal trust.
A contract-review system cannot simply sound confident. A convincing but unsupported interpretation can be more dangerous than missing a risk entirely.
We therefore focused on:
- Grounding — findings should point back to actual contract language.
- Traceability — reviewers can see which clause produced a finding.
- Adversarial reasoning — the system identifies how another party could exploit the wording.
- Human-in-the-loop review — AI redlines are suggestions, not automatic legal decisions.
- Reliable deployment — connecting the Vercel frontend, Render API, and Gemini service introduced practical deployment and environment-variable challenges.
The most important lesson was that building legal AI is not just about getting a model to generate an answer. The workflow around the model is equally important.
Accomplishments that we're proud of
We are proud that LEXRISK goes beyond a conventional "upload → summarize" legal AI experience.
The central interaction is deliberately different:
⚔️ ATTACK CONTRACT
Instead of asking:
"What does this contract say?"
LEXRISK asks:
"How could the other side use this contract against me?"
We built a three-role review model:
Opposing Counsel
Find the strongest attack.
↓
Client Counsel
Build the strongest defence.
↓
Neutral Reviewer
Determine which interpretation is better supported.
We also built Risk Map, Attack Replay, evidence views, remediation recommendations, and lawyer-controlled redlines so that AI output remains inspectable and actionable.
What we learned
We learned that the most valuable legal AI systems are not necessarily the ones that generate the most text.
They are the ones that make reasoning visible, inspectable, and actionable.
We also learned that adversarial thinking can reveal problems that ordinary summarization misses. A clause may look reasonable when read in isolation but become problematic when you ask:
"How would opposing counsel interpret this to their advantage?"
Most importantly, we learned that AI should augment professional judgment rather than hide it.
LEXRISK therefore keeps the lawyer in control of the final decision.
What's next for LEXRISK
LEXRISK is currently a prototype, but we see several directions for the next version.
1. Contract-to-contract comparison
Compare a new agreement against previous versions, company templates, approved clauses, and negotiation history.
2. Negotiation intelligence
Turn identified risks into negotiation priorities:
Critical → Must Fix
High → Negotiate
Medium → Review
Low → Monitor
3. Playbook-aware review
Allow legal teams to define their preferred positions, fallback positions, and unacceptable terms.
4. Stronger evidence systems
Expand traceability so every AI recommendation can be connected to the precise contractual language and supporting sources where appropriate.
5. Continuous contract monitoring
Monitor obligations, deadlines, renewal provisions, notice periods, and other operational risks after signing.
6. Team-based legal review
Enable lawyers to collaborate around risk findings, comments, approvals, and redlines.
Our vision
LEXRISK is not trying to make lawyers read contracts faster.
We want to help them think one step ahead.
Attack the contract before they do.
Built With
- artificial-intelligence
- fastapi
- generative-ai
- google-gemini
- legal-ai
- python
- react
- render
- typescript
- vercel
- vite




Log in or sign up for Devpost to join the conversation.