Contract drafting and review, cut from hours to minutes.
A full-stack AI platform for a legal-tech startup that drafts, reviews, and negotiates contracts — built on retrieval accurate enough, and cited carefully enough, that a lawyer will ship straight from its output.

- Client
- Legal-Tech Startup
- Industry
- Legal · LegalTech
- Region
- United States
- Services
- AI Platform · RAG · Full-stack
- Timeline
- 5 weeks to beta
- Year
- 2025
What they were up against.
A legal-tech startup had a sharp idea and a hard problem. Their users — lawyers — were drafting contracts in Word, switching to a chatbot in another tab to check a clause, then pasting the result back. The hand-off was slow, the chatbot knew nothing of the firm’s own clause library, and none of it could be audited.
They wanted one platform that could draft a contract, review an incoming one, and support a negotiation. But the bar was never “can a language model write a clause” — language models do that easily. The bar was “will a lawyer trust this output enough to put their name on it.” A legal tool that is confidently wrong is worse than no tool at all.
So the platform had to do the thing most AI demos skip: show its work. Every clause it suggested and every risk it flagged had to trace back to a real source a lawyer could open and check in seconds — or the lawyers would not use it twice.
- Draft new contracts from a prompt and the firm’s own clause library
- Review incoming contracts and flag risky clauses — with a citation for each
- Stand behind every answer with a source a lawyer can open and verify
How we built it.
The platform lives or dies on retrieval, so that is where the engineering went. We built a hybrid search system on Postgres — full-text, trigram, and vector search running in parallel, then re-ranked — because pure vector search confidently returns a clause that sounds right and means the opposite.
Claude orchestrates the drafting and review through LangChain with structured output, and every answer is wired to the clause it was pulled from. The lawyer never sees a bare assertion — they see the suggestion and its source side by side.
Around that core we shipped the full product as a Next.js application: a clause library with an embedding pipeline, a drafting workspace, a review view that flags risk inline, and the cited-output UI throughout — deployed on GCP with monitoring.
From kickoff to a beta lawyers could actually use was five weeks — fast enough to put it in front of real users and start learning while the market was still open.
- Full-stack Next.js contract platform — drafting, review, and negotiation
- Hybrid retrieval on Postgres — full-text, trigram, and vector, re-ranked
- Clause library with an embedding pipeline
- Claude orchestration via LangChain with structured output
- Cited-output UI — every claim shown next to its source clause
- GCP deployment with monitoring
Retrieval accuracy beats model choice
Pure vector search returns a clause with similar wording and the opposite meaning — and in a contract, that is a dispute waiting to happen. Running full-text, trigram, and vector search together and re-ranking the results was the single biggest quality win on the project. The model was never the hard part; getting the right clause in front of it was.
- Next.js
- TypeScript
- LangChain
- Postgres
- pgvector
- Claude API
- GCP
What changed.
Contract creation runs about 40% faster, and review work that used to mean reading every line now starts from a flagged, cited draft. The platform handles drafting flows that were entirely manual before.
Most importantly, the lawyers trust it. Because every answer carries the clause it came from, a lawyer verifies in seconds instead of taking the tool’s word — and a legal AI tool only has value the day its users stop double-checking everything it says.
“They shipped a production-grade AI platform in weeks, not quarters. The retrieval layer is accurate enough that our lawyers actually trust the output — which is the entire ballgame in legal AI.”
Client under NDA · Reference available on request
In legal AI, getting the right clause into context is most of the quality bar. The model is the easy part — and a cited answer is the only kind a lawyer will use twice.

