The challenge
A legaltech SaaS team needed to give their attorneys a faster path from intake to first draft. Generic ChatGPT use produced confidently wrong outputs lawyers had to rewrite — saving no time. The opportunity: a structured pipeline that grounded the model in the firm's templates and case data.
Method
- Mapped the drafting workflow with the legal team — identified the five document types responsible for 80% of repetitive drafting.
- Built retrieval-augmented prompts grounded in the firm's templates and prior case data.
- Added structured outputs and a human-review checkpoint before any draft left the system.
- Measured drafting time across 200+ cases before and after, with attorney feedback on every output.
Outcome
- ~60% reduction in drafting effort across the five workflows
- Time-to-first-draft: ~60 min → 5 min
- 100% of outputs human-reviewed before client delivery
- Audit trail of model + prompt + retrieval context for every draft
Stack
Python · OpenAI · LangChain · Pinecone · FastAPI · PostgreSQL · n8n