All work
IN PRODUCTION · NDA2026

Agentic RAG for legal document analysis

Hybrid retrieval and cross-document inference over venture-financing deal documents.

Architecture walkthrough available on request

~20
single-responsibility services
Page-level
summarization at index time

The problem

Venture-financing deal documents need structured extraction and cross-document analysis that keyword search can't do and pure vector search gets wrong.

Why pure vector search fails here

Deal documents are full of near-identical boilerplate that embeds to nearly the same vector. A query about a specific negotiated term retrieves dozens of chunks that all look alike, and the one carrying the actual term is not reliably among the top results. Retrieval has to combine semantic search with query patterns that know what the relevant clause structurally looks like.

Hybrid retrieval with curated seeds

Each question type carries a set of curated seed queries alongside LLM-generated ones. The seeds encode what an experienced reader would go looking for; the generated queries adapt to the specific document set. Merging both consistently beats either alone, particularly on documents where the relevant clause uses non-standard language.

Vision OCR for scanned exhibits

A significant share of deal documents arrive as scans, often with handwritten annotations and signature pages that matter. Gemini handles vision-based OCR on those pages, with exhibit splitting to separate a single scanned bundle into individually addressable documents before indexing.

Page-level summarization at index time

Every page gets summarized when it is indexed rather than at query time. This front-loads the cost once per document instead of paying it on every retrieval, and gives the retrieval layer a compact, self-describing representation to match against alongside raw chunks.