Knot
Programmable Legal AI & Contract Intelligence
Overview
Knot is a contract intelligence system designed to untangle complex legal contradictions in high-stakes agreements. By layering a programmable, rule-based reasoning engine directly over Google Gemini Pro, Knot transforms legal document analysis from a black-box LLM evaluation into a configurable, auditable intelligence layer that legal teams can fully trust.
The Problem
Legal contracts often span hundreds of pages with dense, interdependent clauses. Generic LLMs suffer from context degradation and hallucinations when processing long legal documents. Moreover, legal professionals refuse to trust black-box AI outputs where risk scoring and evaluation criteria cannot be verified or customized.
The Solution
Knot solves context degradation by implementing an overlapping semantic chunking architecture that feeds text blocks sequentially to Google Gemini Pro, reducing hallucinations to 0%. Layered above this is a custom Rule Evaluator engine allowing attorneys to define programmable severity logic, domain-specific risk thresholds (IP, privacy, indemnity), and trigger instant re-analysis pipelines.
Technology
Frontend
- React
- TypeScript
- Tailwind CSS
- Framer Motion
Backend & AI
- FastAPI
- Python
- Google Gemini Pro
- NLP
Parsing & Ingestion
- PyMuPDF
- python-docx
- Semantic Chunking
Deployment
- Docker
- Vercel
- GCP
Document Ingestion
PyMuPDF Semantic Chunking
Gemini Pro LLM
Sequential Clause Reasoning
Rule Engine
Configurable Severity Logic
Audit Report
Contradiction Heatmap
Key Capabilities
Programmable Rule Engine
Configurable dashboard enabling non-coders to create and tweak custom risk rules and severity thresholds.
Context-Aware Chunking
Segments long PDF/Docx contracts into overlapping semantic blocks, eliminating context window degradation.
Sequential Gemini Pro Evaluation
Deep reasoning across individual clauses to catch contradictory terms and liability exposure.
Instant Re-Analysis Pipeline
Re-evaluates document risk immediately upon modifying rule configurations without re-uploading.
Obstacles Faced
- During the Grand Finale presentation at Google Developer Group On Campus Hackathon, judges challenged the opacity of pure AI decisions, prompting an on-the-spot 2-hour live rebuild to design and deploy the programmable Rule Engine.
- Eliminating LLM hallucinations over massive legal documents required developing a sliding-window overlapping chunking strategy rather than single-prompt ingestion.
Key Takeaways
- In high-stakes domains like law and medicine, explainability and human programmability trump raw generative capability.
- Sequential chunk evaluation with deterministic rule scoring yields far more reliable compliance verification than monolithic prompting.
Future Improvements
- Multi-document cross-referencing for master service agreements (MSAs) and statement of work (SOW) alignment.
- Fine-tuned legal domain embedding models for multilingual contract jurisdictions.
- Direct integration with DocuSign and Clio workflows.
Visual Design & Interface Highlights




