Skip to main content
THE FRAMEWORK

How CasePilot works, and why you can rely on it.

CasePilot is an agentic AI built around a five-stage reasoning framework. In practice, that means the language model is given exactly two jobs: planning and writing. It’s structurally prevented from doing retrieval, calculation, or self-verification. Code handles those, in stages, with each stage’s output checked before the next stage runs.

This is the architecture itself, not a guardrail layered on top of a chat interface. Every property of the system that makes its output usable in a legal context, citations grounded in source bytes, numerical values traced to deterministic computation, gaps marked rather than papered over, comes from this design.

What follows is a breakdown of how each stage works. You can read it if you want the technical detail, or skip it. The product behaves the same either way.

Three principles
01

Privacy-first

Evidence stays on your account. Documents are encrypted at rest and in transit. AI analysis is transient. No data is retained by model providers beyond the API call.

02

Citation-grounded

Every factual claim in a draft traces to a verbatim quote with page number and source document identifier. The system refuses to generate a claim it cannot verify against uploaded evidence.

03

Jurisdiction-aware

Financial calculations use state-specific rule packs with statutory citations. Support figures cite ORS Chapter 25 and the Oregon Child Support Guidelines, not generic formulas.

Five-stage process
01
Comprehensiveness

Ingest

Every uploaded page is parsed into semantic chunks. Tables are extracted separately. Text is embedded with a legal-domain vector model (voyage-law-2) and indexed with BM25 for hybrid retrieval. Pages are preserved with byte offsets so every citation is traceable.

Tools: PDF parser, PyMuPDF, pdfplumber, pytesseract (OCR), voyage-law-2 embeddings, BM25 index
02
Select a retrieval plan

Strategy

Before any retrieval runs, the system selects a category-specific retrieval strategy from a library of plans calibrated for legal evidence work. Each plan specifies the queries to issue, the sources to prefer, and the rules for ranking results. The plan is the contract for the rest of the run; you can see it in the run record.

Tools: Claude Sonnet (plan selection only), structured output schema, no evidence access at this stage
03
Grounding

Analyze

Hybrid retrieval combines BM25 lexical search and voyage-law-2 semantic vectors, merged with reciprocal rank fusion. Numerical values come from a deterministic database query, not from the model's reading.

Tools: Hybrid retrieval (BM25 + voyage-law-2), reciprocal rank fusion, deterministic SQL for numbers
04
Honest uncertainty

Synthesize

Retrieved evidence is classified: corroborated, contradicted, single-sourced, or gap. Missing facts are marked [GAP] rather than papered over. Contradictions are flagged by priority class before any draft is generated.

Tools: Evidence reconciliation engine, contradiction classifier (3 priority classes), gap detection
05
Defensibility

Draft

Drafts are generated only from the reconciled evidence state. A deterministic Python validator checks every generated quote against the source, and can fail the run if a quote doesn't match. The same validator runs on every user-facing output — answers, drafts, and batch workflow runs — not just batch jobs. Every output is marked [DRAFT — ATTORNEY REVIEW REQUIRED].

Tools: Claude Sonnet (synthesis only), Python citation validator, DOCX/PDF/MD export
WHY THIS MATTERS

These aren’t safeguards layered on top of a generative system. They are the architecture. The language model is one component of five, and only the four around it make its output usable for legal work.

That’s why a draft from CasePilot can be reviewed and used by an attorney. That’s why a self-represented user can spot-check any sentence in seconds. That’s why the system can refuse to ship a document it can’t support, and call that refusal a feature rather than a failure.

Read the full reasoning framework whitepaper →
Back to home