AI and legal docs: how not to leak trade secrets
In DocuChat, we look at how to connect AI to legal documents without leaking trade secrets: on-premise LLM, contractual guarantees from the provider, and checking answers for hallucinations.

In DocuChat, we ran into the classic pain point of 2025: you want to hook AI up to everything, but legal documents are not chat memes — they’re trade secrets. Sending that kind of data to a cloud LLM without thinking twice is a pretty dubious vibe.
We looked at two approaches:
- on-premise LLM — the model runs on our side, and the data does not leave
- contractual guarantees from the provider — if you can’t avoid the cloud, then only with strict legal obligations
But privacy is only half the battle. The second trap: when checking wording, AI can confidently cite a nonexistent law. Yes, like a colleague who “definitely saw it in the contract,” but didn’t 😅
To reduce hallucinations, we added ground truth verification: answers are checked against verified sources and actual legal grounds, not just the model’s “confidence.”
The next logical layer after that is authentication and access control: who is actually allowed to run AI analysis and which documents they can