Prompt patterns and reasoning strategies 00:00:01 The invoice with no date The invoice on Cass's desk says payment upon receipt. Her extractor insists on printing a calendar date. A longer prompt can make the guess sound more convincing while moving the accounting system farther from the original document. A prompt specifies a task using instructions, examples and supplied facts. Few-shot examples teach a mapping, decomposed work exposes checkable intermediate results, and search strategies explore competing candidates. Choose the simplest strategy whose effect you can verify on unseen cases. Put one clearly dated bill beside one with no date. Demonstrate the date field for both, including the explicit missing value. Now the instruction describes a decision at the boundary where the original extractor failed. 00:00:49 Build a missing-value contract State the output contract and evidence boundary. Include one example with a date and one example where the date is missing. The document contains payment terms, but no calendar date. A valid test includes this exact distinction. The evaluator checks an absent value and verifies that the system did not invent a date. More elaborate reasoning is useful only if it improves this result. 00:01:16 A test that exposes guessing A useful prompt states the task, evidence, constraints and output format. Replace “be helpful” with a verifiable contract such as “extract the invoice date, cite the line, and return null when absent.” The evaluator can then check both positive examples and documents with missing information. Test “extract the due date or return null” on an invoice that only lists a printing date. Verify that a present but unrelated date is not substituted. Few-shot prompts demonstrate the intended transformation through input–output pairs. Choose examples that cover ambiguous and missing cases, keep delimiters consistent, and reserve a separate test set. Repeating a single pattern can teach an unintended shortcut such as always choosing the first date on the page. Show one example that includes a due date and one that has none. Then evaluate a third document whose only date is the delivery date. Prompt compression removes redundancy or replaces long text with a smaller representation. Preserve rare constraints, negation and source references. Compare compressed and full prompts on a paired test set. A token saving that loses the only sentence describing an exception is a costly optimization. Shorten a return policy while preserving this rule. Custom orders cannot be returned. Compare answers about a custom item before counting the compression as a win. Test perturbations that resemble real failures, such as missing fields or contradictory lines. Change one prompt feature at a time, keep the model configuration fixed and inspect cases where the new prompt changes the answer. 00:03:00 What did the new prompt break? An expanded prompt improves dated invoices but assigns dates to every missing case. Which metric reveals this? A headline accuracy score can hide the regression. Evaluate missing-value behavior separately using labeled examples. Keep the two groups visible during evaluation. A good extractor can be right because it returns a date and just as right because it leaves that field empty.