Inspiration

Legal documents shape our lives, from apartment leases to employment contracts, from loan agreements to terms of service. Yet most people sign without truly understanding what they're agreeing to. The language is dense, the implications hidden, and professional legal review is expensive and time-consuming. I built LegaleseLens because everyone deserves to understand their legal commitments. I wanted to create a tool that reads legal documents like a trained attorney — but runs entirely on your device to preserve privacy.

What it does

LegaleseLens is a fully offline, privacy-first legal document analyzer that lets users upload a legal PDF, such as an lease agreements, NDA or contract , and explains each section (like confidentiality, termination, and liability) in plain English.

How we built it

Developed with Python and Streamlit Used PyPDF2 for PDF parsing Integrated Gemma 3-12B via Ollama to analyze and summarize text Prompt-engineered the model for short, accurate, and human-friendly explanations

Challenges we ran into

Model Performance: Balancing capability with local performance — Gemma 3-12B offered the best tradeoff. Legal Complexity: Legal text is dense and recursive; chunking meaningfully took many iterations. Clause Detection: Teaching the model to flag unusual or risky clauses required advanced prompt tuning. Offline Constraint: Ensuring every dependency worked without cloud tools was difficult. Time Pressure: Building an end-to-end AI app with legal focus within hackathon time required tough prioritization.

Accomplishments that we're proud of

Built a fully offline AI legal analyzer that runs smoothly on a base M4 MacBook Pro. Achieved strong clause recognition using prompt engineering — no fine-tuning needed. Designed a tool that blends privacy, AI, and accessibility seamlessly. Created a foundation that could meaningfully improve legal literacy for everyday people.

What we learned

I built and optimized an offline LLM-powered application for macOS, enhancing speed, memory efficiency, and response quality. I trained and fine-tuned AI models to transform complex legal documents into concise, accessible summaries. I addressed challenges in PDF parsing and inconsistent document structures through custom preprocessing pipelines. I balanced model performance, accuracy, and usability to deliver a robust and user-friendly legal analysis tool.

Impact of LegaleseLens

LegaleseLens empowers people to understand the fine print: Renters: Analyze leases and avoid hidden fees. Job Seekers: Review employment contracts for non-competes or IP clauses. Small Business Owners: Evaluate vendor and service agreements without high legal costs. Privacy-Conscious Users: Get AI-powered legal analysis completely offline.

What's next for LegaleseLens

Add support for state-specific laws (Like California, New York, Federal). Introduce side-by-side comparison for multiple contract versions.

Disclaimer LegaleseLens is an educational tool, not legal advice. It helps users understand their documents, not replace professional attorneys. Always consult a qualified lawyer before signing important contracts.

Built With

Share this project:

Updates