Case study · 02 / 03

An agent that drafts contracts in 90 seconds and will not hallucinate a clause.

Alethia needed a contract-drafting agent that could work from precedent libraries, client playbooks and clause policies without inventing legal language. We shipped a multi-step workflow with strict retrieval, citation checks and human approval gates in 6 weeks.

[ Client ]

Alethia

Seed · Legal AI · Contract automation

[ Engagement ]

Fixed sprint

6 weeks build · founder handover

[ Role ]

AI product engineer

Architecture · workflow · evals

[ Year ]

2025

Q3 sprint

Results · first 90 daysmeasured in production workflow
14x
Faster drafts
Down from 22 min to 90 sec
0
Hallucinated clauses
Across 90-day audit sample
68%
Manual review saved
Paralegal time per draft
6wk
Time to ship
MVP to production

The prototype could draft a contract, but it invented clause language whenever source coverage was thin. That made it unusable for a legal workflow.

The founders had a tight timeline and no tolerance for a black-box model. Every draft needed traceable precedent, policy checks and a clean handoff to human reviewers.

The core product question became: can an agent draft fast while making uncertainty visible enough for lawyers to trust it?

I broke the drafting flow into explicit steps: classify deal type, retrieve precedent, select clause templates, draft section-by-section, run policy checks, then route exceptions to review.

The agent could not write unsupported clauses. If retrieval confidence fell below threshold, it had to ask for human input rather than improvise.

We built a small eval set from historical contracts and measured clause accuracy, citation coverage, policy violations and review time before release.

  • Multi-agent drafting flow with explicit tool contracts and deterministic checkpoints.
  • Citation-grounded retrieval over precedent documents, client playbooks and clause policies.
  • Policy checker that blocks disallowed fallback language before the draft reaches users.
  • Human approval queue for low-confidence clauses and non-standard deal terms.
  • Eval harness covering clause selection, citation coverage and redline review time.
[ 01 ] Inputs
Matter context
  • Deal intake
  • Client playbook
  • Precedents
  • Clause bank
[ 02 ] Retrieve
Grounding layer
  • pgvector
  • Metadata filters
  • Reranking
  • Citation spans
[ 03 ] Draft
Agent workflow
  • LangGraph
  • Tool contracts
  • Policy checks
  • Human gates
[ 04 ] Review
Legal surface
  • Draft editor
  • Redlines
  • Audit trail
  • Export

The system treats unsupported generation as a product failure, not an acceptable model behavior. Every clause has either a citation, a policy reason, or a review flag.

# Drafting guardrail if clause.confidence < MIN_CONFIDENCE: return HumanReview(reason="weak_grounding") if not clause.citations: raise UnsupportedClauseError()

The first production version shipped in 6 weeks and reduced average first-draft time from 22 minutes to 90 seconds.

The founder replaced two contractor workflows while keeping a human checkpoint for non-standard deal terms.

The 90-day audit found zero hallucinated clauses in accepted drafts because unsupported sections were blocked or routed to review.

"Most engineers hand you a pile of code and a doc. Talha handed us a system, an eval harness and a workflow lawyers could trust."

- Daniel Okafor, Founder & CEO, Alethia

Book a call

Got a problem AI might solve?

30 minutes. Free. You leave with a clear yes/no on whether to build, and a one-pager you can forward to your team.

[ Response ]

Within 24 hours

[ Timezone ]

GMT+5 · flexible

[ Discovery ]

Free · no NDA needed

[ Engagement ]

From $8k / 4 wks