The model judges, the code decides
A language model writes your draft. Who checks it? Asking a second chatbot "is this okay?" gets you a paragraph. I wanted a number my code could act on.
Jev, from TypeSafe, answers typed questions with probabilities instead of writing replies. In a clinical document prototype for a US healthcare consulting client, tested on synthetic records, I used it for four gates:
1. Does this text still name a private person?
2. Is a page trying to tell the AI what to conclude?
3. Does this quote support the sentence?
4. Did an edit change more than the user asked for?
Each gate returns a score. Code turns it into pass, review or block, using thresholds I can change without touching a prompt. Different mistakes cost different amounts, so each gate gets its own numbers. I kept the leak and injection gates stricter.
What I learned. Ask one narrow question at a time: "is this safe?" is vague, "does this contain a date of birth?" can be tested. Keep the input small. Let hard rules win, because code can spot a new number or a missing citation with certainty. And fail closed: if a check errors or times out, a person looks at it.
A score is not proof, so test thresholds on labelled examples from your own work. A hosted checker also sees whatever you send it, so confirm the data terms before real records go anywhere near it.