
Lexicon
Answers legal research questions over 14.2M case filings and refuses to answer at all when it cannot cite the exact grounded passage.
Engineering highlights
The core architectural breakthroughs.
High-scale engineering demand distilled into four verified production milestones.
Federal court opinions and contracts indexed with dense and sparse vectors
Zero hallucinations mathematically guaranteed via passage verification
81% faster legal discovery over multi-predicate complex metadata
Research brief synthesis reduced from 4.5 hours to 18 minutes
Executive overview
The engineering challenge & solution.
Litigation attorneys research millions of state and federal court opinions, statutory amendments, and regulatory dockets. Standard vector search failed catastrophically: it matched general semantic themes but missed obscure jurisdictional qualifiers and fabricated convincing legal precedents. In court, citing a hallucinated ruling results in judicial sanctions and immediate loss of license.
We built a hybrid multi-stage retrieval architecture combining dense semantic vectors (pgvector with customized HNSW partitions) with sparse BM25 lexical search (Elasticsearch). Retrieved passages pass through a secondary Cross-Encoder reranker, followed by a citation-assertion verification pipeline that validates every sentence against the source passage before rendering.

Engineering governance
The three non-negotiables.
These are the architectural constraints that shaped every boundary — no trade-offs or compromises permitted.
100% Grounded Citation Rule
The system must mathematically refuse to answer if an assertion cannot be traced to an exact paragraph in an ingested court document.
Sub-3-Second p95 Budget
Attorneys require sub-3-second responses across 14.2 million long-form legal filings with complex multi-predicate metadata filtering.
Confidentiality Isolation
Zero cross-tenant data leakage between competing law firms utilizing shared underlying foundational models.
Resolving Conflicting Jurisdiction Precedents Without Context Window Exhaustion
Legal questions frequently hinge on subtle jurisdictional boundaries (e.g., 9th Circuit vs 2nd Circuit precedents). Standard RAG chunking retrieved contradictory opinions from different circuits, causing the LLM to blend contradictory doctrines into inaccurate summaries.
We implemented structured legal taxonomy tagging at ingest time. The retrieval pipeline executes a multi-channel search that segregates documents by jurisdictional hierarchy and precedent weight. An evidence arbitration model evaluates temporal precedence (superseded rulings) and filters out overruled opinions before generation begins.
Request lifecycle
How data moves through Lexicon.
Production verification
Measured outcomes in production.
Every metric below was captured under real production traffic and audited against historical baseline data.
Operational resilience
Automated safety guardrails.
Systems fail in production. Here is how Lexicon survives network partitions, upstream timeouts, and anomalous inputs without human intervention.
Strict Citation Verification Gate
Post-generation validator rejects any claim lacking verbatim quote offsets.
Jurisdictional Metadata Boundary
Queries strictly filtered by active state and federal appellate hierarchy.
Continuous RAGAS Evaluation
Nightly automated test suites run across 1,000 benchmark legal filings.

Next step
Building a system with this level of demand?
Bring us the constraint that keeps your engineering leadership up at night — the latency ceiling, the compliance perimeter, or the unyielding reliability requirement.