Kartez Contract — a RAG legal advisory system

Halted by the client one month from completion, for war-related funding reasons. The engineering write-up below is the part that outlived the contract.

The challenge

Legal and contract advice demands accuracy and traceability. A hallucinating model is worse than no model — an invented clause is a liability.

Architecture

Retrieval-augmented generation over a legal corpus, with intelligent assistants on top of it.

What I built

An advanced, reliable AI legal and contract advisor whose answers are grounded in the corpus.

Outcome

The engagement ended one month before completion, when the client's war-related financial difficulties stopped the project. It was a client funding failure, not a delivery failure.

Post-mortem

The hardest problems here were Persian legal-text retrieval quality and hallucination control. An honest engineering write-up of those is more persuasive than a success metric would have been.