02 / 04Case study · 2024 · AI · Legal tech
RAG-powered legal document intelligence with e-signature workflows

Overview
This platform transforms how teams interact with large document sets. Instead of searching PDFs manually, users ask natural-language questions and receive cited, sourced answers in real-time. Built as a full-stack RAG system, it handles document ingestion (PDF, Word, Excel, PPT), embedding generation, vector search with reranking, and LLM-powered summarization. Additional modules include timeline visualization, due diligence checklists, party/risk analysis, and a complete e-signature workflow with templating and audit trails.
The Challenge
Legal and M&A teams often work with hundreds of contracts, agreements, and diligence documents. Answering a single question—like 'What are the termination clauses?'—requires reading entire files, cross-referencing dates and parties, and summarizing findings. Traditional keyword search fails on synonyms and context. The goal was to build a system that could ingest any document format, understand semantic intent, retrieve relevant passages with high precision, and generate accurate, explainable answers with citations.
Approach
Technical Architecture
Key Features Built
Platform Screenshots



Hard problems
Low retrieval precision on legal jargon and synonyms.
Switched to BGE-M3 embeddings (trained on domain-specific text) + reranker; improved precision by 40%.
Large PDFs (1000+ pages) caused ingestion timeouts.
Batched chunking with progress callbacks; added job queue with retry logic.
LLM hallucinations citing non-existent clauses.
Enforced strict context-only generation; added citation validation to ensure quoted text exists in source chunks.
Multi-tenant data isolation with customer-owned DBs.
Built connection router with encrypted config storage (AES-256-GCM) and per-request DB client resolution.
Results