LexAI visual
01

Problem

Legal research is spread across contracts, filings and precedent. Keyword search returns documents; practitioners need defensible answers, and an answer without provenance is not usable in legal work.

02

Architecture

Documents are parsed along clause boundaries and indexed in Qdrant with both dense and lexical representations. A LangGraph agent works over that index with explicit tools for clause lookup, comparison and citation assembly.

Walk through the pipeline: select a stage, or use the arrow keys.

  1. Contracts and filings are ingested with their structure (headings, clauses and cross-references) preserved.

Stage 01 of 07 · Ingestion

Document

Contracts and filings are ingested with their structure (headings, clauses and cross-references) preserved.

03

Decision

Citations are a hard requirement, not a feature: every claim in an answer is pinned to the source span it came from. Claims that cannot be pinned are dropped, and when retrieval confidence is low the system refuses instead of guessing.

  • Source-span check: claims without a resolvable source offset are rejected.
  • Golden-dataset regression suite runs on every prompt, retrieval or routing change.
  • Refusal path when retrieval confidence falls below a threshold.
04

Evaluation

A golden dataset of question–answer–citation triples runs on every pipeline change, scoring groundedness, citation precision and refusal behaviour on questions outside the corpus.

05

Result

Document analysis becomes a conversation that can be audited line by line: a reviewer can open any cited span and check the claim against the source.

Citation-first
Every answer traceable to source
Hybrid
Dense + lexical retrieval
Graph agent
Deterministic control flow
LexAI system architecture

Next step

Have a system that needs
to hold up in production?