<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhishek Singh</title>
    <description>The latest articles on DEV Community by Abhishek Singh (@abhisheksingh_1729).</description>
    <link>https://dev.to/abhisheksingh_1729</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4155928%2Fa737f4d8-1b34-41c9-9096-f6997c234641.png</url>
      <title>DEV Community: Abhishek Singh</title>
      <link>https://dev.to/abhisheksingh_1729</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhisheksingh_1729"/>
    <language>en</language>
    <item>
      <title>LexiGuard: The Air-Gapped Legal Contract Screener Freelancers Would Actually Pay For</title>
      <dc:creator>Abhishek Singh</dc:creator>
      <pubDate>Sun, 18 Oct 2026 19:27:59 +0000</pubDate>
      <link>https://dev.to/abhisheksingh_1729/lexiguard-the-air-gapped-legal-contract-screener-freelancers-would-actually-pay-for-5413</link>
      <guid>https://dev.to/abhisheksingh_1729/lexiguard-the-air-gapped-legal-contract-screener-freelancers-would-actually-pay-for-5413</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Every freelancer, independent contractor, and boutique agency owner dreads the same moment: a new client sends over an 8-to-15 page Master Services Agreement (MSA) or Non-Disclosure Agreement (NDA) packed with dense legalese.&lt;/p&gt;

&lt;p&gt;Most freelancers face a frustrating dilemma:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Hiring a contract lawyer costs $300 to $500 an hour—often more than the initial deposit of the project itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Pasting the contract into cloud LLMs like ChatGPT or Claude violates non-disclosure provisions and client data confidentiality before the project even kicks off.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Skimming and signing blindly exposes them to predatory non-compete clauses, unlimited liability indemnification, or unreasonable payment milestones.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I built LexiGuard, an air-gapped, on-device legal contract screener and triage copilot.&lt;/p&gt;

&lt;p&gt;LexiGuard runs entirely on the user's local machine. It ingests contracts across multiple formats (PDF, DOCX, TXT, or raw text), extracts core obligations and payment terms, flags asymmetric liabilities or missing standard protections, and grounds every single finding with exact page-and-paragraph substring citations—with zero data ever leaving the laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;After following the guide on my README.md, just type &amp;gt;&amp;gt; python -m lexiguard demo on your suitable terminal.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The complete source code, test suites, and reproduction guide are open source under the Apache 2.0 License:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/abhisheksingh1729" rel="noopener noreferrer"&gt;
        abhisheksingh1729
      &lt;/a&gt; / &lt;a href="https://github.com/abhisheksingh1729/lexiguard" rel="noopener noreferrer"&gt;
        lexiguard
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;LexiGuard — Private On-Device Legal Document Triage Agent&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://iiitdwd.ac.in" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/d8309ce12c5a47c668528f15598c9debef6ca4333715522ac8c1ad75115a763f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5a65726f4461795f4f53532d4861636b746f626572666573745f323032365f5053322d3235363345422e737667" alt="ZeroDay OSS Hacktoberfest 2026"&gt;&lt;/a&gt;
&lt;a href="https://github.com/abhisheksingh1729/lexiguard/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/5b60841bea9e11d9d0b0950d690c9bc554e06385634056a7d5d62a15d1a4eabe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4170616368655f322e302d626c75652e737667" alt="License: Apache 2.0"&gt;&lt;/a&gt;
&lt;a href="https://ollama.com" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/9c2df77139fa21d870f6e726089da935105b0cfcb89b46b9cd0b1adbf1743df3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c4c4d2d476f6f676c655f47656d6d615f325f283242292d3035393636392e737667" alt="LLM: Google Gemma 2 2B"&gt;&lt;/a&gt;
&lt;a href="https://github.com/abhisheksingh1729/lexiguard#-air-gapped-offline-execution-guide" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2815d18970451ee9de07b06e4ebada8577fa8f35ef0e2d0d8c4c91be9b43fea5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507269766163792d3130302532355f4169722d2d4761707065645f4c6f63616c2d3035393636392e737667" alt="Privacy: 100% Air--Gapped"&gt;&lt;/a&gt;
&lt;a href="https://github.com/abhisheksingh1729/lexiguard#-architecture--data-sovereignty" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ab78b0f2821bfd95be3c68c71ea89a11665159d7e7ab8bb22c04a560c73e4871/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53746f726167652d53514c6974655f4c6f63616c5f5661756c742d3437353536392e737667" alt="Local Vault: SQLite3"&gt;&lt;/a&gt;
&lt;a href="https://github.com/abhisheksingh1729/lexiguard#-minimalist-modern-ui-walkthrough" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f87c7d31a2ca42ac09e0cb3e65c773a441a7599697caa1b4efeb889e0e418ff9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f55492d4d696e696d616c6973745f536c6174655f53747564696f2d3362383266362e737667" alt="UI: Minimalist Slate"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Track:&lt;/strong&gt; Problem Statement 2 (PS2) — Agentic AI: Private Legal Document Triage Agent&lt;br&gt;
&lt;strong&gt;Event:&lt;/strong&gt; ZeroDay OSS Hacktoberfest 2026, IIIT Dharwad&lt;br&gt;
&lt;strong&gt;Repository:&lt;/strong&gt; &lt;a href="https://github.com/abhisheksingh1729/lexiguard" rel="noopener noreferrer"&gt;https://github.com/abhisheksingh1729/lexiguard&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Author:&lt;/strong&gt; Abhishek Singh&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;📌 Executive Summary &amp;amp; Problem Statement&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Legal agreements—such as residential tenancy leases, software employment contracts, unilateral non-disclosure agreements (NDAs), and cloud terms of service—are dense with archaic terminology, hidden liabilities, and asymmetric risk allocations. For ordinary individuals, tenants, and small business operators, seeking prompt legal review is cost-prohibitive and slow.&lt;/p&gt;
&lt;p&gt;However, sending confidential agreements to cloud-hosted proprietary LLMs introduces severe &lt;strong&gt;confidentiality and data privacy violations&lt;/strong&gt; (GDPR, HIPAA, attorney-client privilege breaches).&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;The Solution: LexiGuard&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;LexiGuard&lt;/strong&gt; is an air-gapped, privacy-first legal triage agent running &lt;strong&gt;100% locally&lt;/strong&gt; on consumer hardware. Powered by &lt;strong&gt;Google Gemma 2 (2B)&lt;/strong&gt; via localhost Ollama, LexiGuard translates complex legalese into clear risk breakdowns, programmatically verifies all citations against raw source text, detects omitted statutory safeguards ("silent…&lt;/p&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/abhisheksingh1729/lexiguard" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Who Would Pay for This?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Freelancers &amp;amp; Solopreneurs&lt;/strong&gt;: Software engineers, graphic designers, copywriters, and consultants who need instant contract clarity without burning money on preliminary legal reviews.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Micro-Agencies &amp;amp; Small Businesses&lt;/strong&gt;: Teams dealing with high-volume client onboarding that cannot afford an in-house legal counsel.&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;LexiGuard was engineered from the ground up around open-source AI and local runtime execution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open-Weight Core&lt;/strong&gt;: Google’s Gemma 2 2B (gemma2:2b), selected for its low memory footprint (~1.6 GB) and high reasoning capabilities on structured extraction tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Local Inference Engine&lt;/strong&gt;: Ollama running locally on localhost:11434, ensuring complete privacy and isolation from cloud endpoints.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-Format Ingestion Engine&lt;/strong&gt;: PyMuPDF (PDF parsing with page and bounding metadata) and python-docx (Word documents), along with support for plain text and raw copy-pasted clauses.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic Few-Shot Exemplar Memory&lt;/strong&gt;: An on-device SQLite database (lexiguard_vault.db) that handles document hashing, active caching to eliminate redundant re-computation on identical files, and in-context adaptation using verified user feedback.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deterministic Guardrails &amp;amp; Verifier&lt;/strong&gt;: A post-processing pipeline that performs programmatic substring checks to eliminate hallucinated quotes, enforces schema validity via Pydantic, and intercepts adversarial prompt injections.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User Interface&lt;/strong&gt;: A minimalist, typography-focused dashboard built in Streamlit.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fci2pmd0b99sradt4ki03.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fci2pmd0b99sradt4ki03.png" alt=" " width="748" height="562"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;For a legal triage tool, open innovation isn't just an implementation choice—it is the only architecture that makes the product viable.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Client Confidentiality is Non-Negotiable&lt;/strong&gt;: Commercial cloud LLM terms often reserve rights to log, inspect, or train on user prompts. Uploading a client's proprietary software contract or confidential patent clause to a closed API is an immediate breach of contract. An open-weight model running locally guarantees zero telemetry and zero leakage.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero Marginal Inference Cost&lt;/strong&gt;: Running a business on closed APIs subjects a solopreneur to unpredictable token fees, rate limits, and pricing shifts. With open-weight models like Gemma 2, processing a 30-page agreement costs the same as processing a single paragraph: $0.00.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Auditable Trust&lt;/strong&gt;: In legal tech, black-box closed models that hallucinate answers or hide system prompts pose severe liability risks. Open-source models paired with open parsers allow complete transparency into how text is extracted, chunked, and verified.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;p&gt;LexiGuard was developed and scaffolded using Antigravity IDE alongside coding agents. Agent rules were configured locally (.agents/rules/hackathon.md) to enforce strict air-gapped development: rejecting external API calls, mandating Pydantic schemas, and automating SQLite persistence layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  My First User
&lt;/h2&gt;

&lt;p&gt;To validate the commercial viability of LexiGuard, I shared the working prototype with a peer who frequently works on independent client web development contracts:&lt;/p&gt;

&lt;p&gt;"I usually skim through client NDAs because reading 12 pages of legalese gives me a headache, but I know I'm risking signing something bad. Having a tool that runs on my laptop with Wi-Fi off and instantly flags that there is 'No liability cap' and 'Immediate termination without notice' is wild. I would easily pay $25 to $35 one-time just to have this sitting in my dock."&lt;br&gt;
— Himanshu L., Freelance Web Developer&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Best Use of Gemma&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
