
Write a prompt contract for a document assistant
Specify evidence, missing-data behavior, and output requirements for a document assistant, then test the prompt against concrete support questions.
Foundation
The journal / Ideas in progress
Engineering & everyday learningSoftware, systems, and the things I’m learning along the way. From first principles to AI in production.
Find something to readA little theory. A lot of practice.

Specify evidence, missing-data behavior, and output requirements for a document assistant, then test the prompt against concrete support questions.

Choose few-shot examples that explain a decision boundary, include near misses, and preserve a separate holdout for evaluating the prompt.

Validate an LLM extraction beyond JSON syntax by checking schema, arithmetic, source evidence, and the difference between missing information and zero.