Inspiration

Understanding real-world contracts is difficult for students, freelancers and early-stage startups, and important risks are often hidden across multiple clauses. I wanted to build a system that goes beyond simple summarization and can reason over long legal documents to identify hidden risks, conflicting obligations and unfair terms in a clear and explainable way. ClauseSight was inspired by the need for fast, accessible and transparent legal analysis for non-legal users.

What it does

ClauseSight is an intelligent legal clause analysis platform powered by the Gemini 3 model family. Users upload a contract and receive a live dashboard that shows structured clauses, clause categories, risk levels and analytics. The system identifies risky clauses with supporting evidence, detects cross-clause conflicts, generates safer negotiation-ready rewrites and provides role-aware risk explanations for different user profiles such as startup founders.

How we built it

ClauseSight is built using a FastAPI backend and a streaming frontend dashboard. The core of the system is a multi-stage Gemini 3 reasoning pipeline. Gemini 3 first parses long contracts into structured clauses using strict JSON schemas. It then performs clause-level risk reasoning, cross-clause dependency analysis and constraint-based clause rewriting. All Gemini 3 responses are generated as structured JSON and streamed to the UI in real time for low-latency interaction.

Challenges we ran into

The main challenge was reliably processing long and complex contracts while maintaining low latency and consistent structured outputs. Another challenge was ensuring that the model provides explainable results with direct evidence from the clause text instead of generic explanations. Handling rate limits and parallel processing while preserving result quality was also a key technical challenge.

Accomplishments that we're proud of

We successfully built a real-time, end-to-end legal analysis system that performs structured clause extraction, risk reasoning, cross-clause conflict detection and negotiation-ready rewriting using the Gemini 3 model family. The platform provides explainable insights with supporting evidence and live analytics, making advanced legal reasoning accessible to non-expert users.

What we learned

We learned how to design multi-stage reasoning pipelines using large language models, enforce strict JSON outputs for reliable downstream processing and apply cross-clause reasoning for complex legal documents. We also gained experience in building streaming AI applications that balance performance, explainability and usability.

What's next for ClauseSight – Hidden Eligibility & Disqualification Finder

Next, we plan to extend ClauseSight to automatically detect hidden eligibility requirements and disqualification conditions in contracts, job offers and program policies. The system will highlight clauses that restrict participation, impose silent prerequisites or trigger automatic disqualification and explain how these conditions affect different user profiles using Gemini 3-based reasoning.

Built With

  • asyncio
  • css
  • dotenv
  • fastapi
  • google-gemini-3-api-(gemini-3-family-?-flash-variant)
  • html
  • javascript
  • pypdf
  • python
  • python-docx
  • streaming-api-(ndjson)
Share this project:

Updates