📄 Pact Lens — About the Project ✨ Inspiration
Legal agreements shape so many parts of our lives — from job offers and freelance gigs to rental contracts and online terms of service. Yet most people sign documents they don’t fully understand. Legal language is dense, repetitive, and often intimidating.
Pact Lens was inspired by a simple question:
What if anyone could “see through” a contract the way a lawyer does — instantly?
I wanted to build a tool that reduces information asymmetry between organizations and individuals. Instead of replacing lawyers, the goal is to empower users with clarity, helping them spot risks, contradictions, and important clauses before signing.
🧠 What I Learned
Building Pact Lens was a deep dive into applied AI and real-world problem solving. I learned:
How Retrieval-Augmented Generation (RAG) can ground LLM outputs in actual documents
The importance of prompt engineering for legal-context accuracy
Why legal AI must prioritize precision over creativity
How to design outputs that are actionable, not just descriptive
The ethical side of AI in law — transparency, disclaimers, and bias awareness
I also realized that AI in legal tech is less about fancy models and more about trustworthy workflows.
🏗️ How I Built It
Pact Lens is built as an AI-powered contract analysis tool with these core steps:
Document Ingestion Contracts are uploaded and parsed into structured text.
Chunking & Embeddings The text is split into semantic chunks and converted into embeddings for similarity search.
RAG Pipeline Relevant clauses are retrieved before querying the LLM so responses are grounded in the actual contract.
Clause Analysis The model evaluates:
Risky clauses
Ambiguous wording
Missing protections
Possible contradictions
User-Friendly Output Results are shown as summaries, risk flags, and explanations in plain English.
⚔️ Challenges I Faced
Hallucination Control LLMs can sound confident even when wrong. Reducing hallucinations required tighter prompts and grounding via RAG.
Legal Nuance Two clauses can look similar but have very different legal meanings. Capturing nuance was tough.
MVP Scope It’s tempting to add many features, but I focused on core value: analysis and clarity.
Not a Substitute for Lawyers Designing messaging so users see Pact Lens as an assistant, not legal advice, was crucial.
Data Privacy Considerations Handling sensitive legal documents demands careful thinking about storage and processing.
Log in or sign up for Devpost to join the conversation.