
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.
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.

Map source authority, permitted uses, audience and derived copies in a fictional handbook assistant, then design a concrete document-withdrawal exercise.

Validate units, reporting scope, batch completeness and execution identity before computing a job-duration metric, while preserving legitimate empty results.

Prevent evaluation leakage by grouping related questions and document revisions, using time-aware boundaries, and keeping prompt development away from the final holdout.

Select the newest available producer for each operand, trace two writes to the same register, and distinguish forwarding from waiting for an unavailable result.

A messy quantity column retains original tokens and rejection reasons. A worked analytical example with explicit assumptions and checked results.

Define what one analytical row represents, keep receipt and line measures separate, and distinguish a missing line from an observed zero with executable SQL.

A commute survey separates an observed zero, declined answer, not-applicable record, and collection failure. A worked analytical example with explicit assumptions and checked results.

Model order identity, reject orphan references, inspect cascades and separate database relationships from the policy for deleting a paid order.