Conqr AI Legal Chatbot

RAG-powered legal chatbot with end-to-end document pipeline — scan detection, OCR, chunking, and Go-powered parallel processing.

By Aditya Singh Khichi, Full Stack Engineer, New Delhi, India.

Tech stack: Go, RAG, PDF.js, OCR, Vector Embeddings.

ingestion for ~25 docs: 5min → <1min

Problem

Legal teams onboard with batches of contracts, briefs, and exhibits — typically 20-30 PDFs at once. The naive single-threaded pipeline took 5+ minutes per batch, which felt broken to a user who'd just dragged files in and was watching a spinner. Worse, mixed batches (some text-layer PDFs, some scans) had to be processed at the slower rate of the scanned ones because OCR ran inline.

Approach

Rewrote the ingestion pipeline in Go to exploit parallelism per document. Scan detection runs first as a cheap heuristic on the PDF text layer; only documents that actually need OCR pay the OCR cost. Chunking is page-wise so cross-section context (a clause referenced 30 pages later) survives retrieval. Each stage of the pipeline is a goroutine fed by a buffered channel, so a single slow OCR doc doesn't block the rest of the batch.

Outcome

Ingestion dropped from 5+ minutes to under 60 seconds for ~25 documents — a 6x improvement at the user-perceived layer. The team-onboarding experience went from 'go grab a coffee' to 'wait, it's done?' which directly impacted activation rate. Page-wise chunking with metadata-backed storage made later retrieval explainable, which matters disproportionately in a legal product where every answer needs a source.

Live link: https://conqr.ai