How Many Examples Does a Prompt Actually Need?
Two to five. Below two there is nothing to generalise from, above five the gain flattens while the cost climbs. How to pick which ones, and where to put them.
How to write AI prompts that hold up in production: injection, determinism, structured output and testing.
Two to five. Below two there is nothing to generalise from, above five the gain flattens while the cost climbs. How to pick which ones, and where to put them.
Where the money actually goes, the five levers ranked by saving over effort, and a worked example that cut a real prompt to a fifth of its cost.
Chain-of-thought earned its reputation on models that did not reason by default. On current models it often adds cost, length and invented detail instead of accuracy.
Telling a model to be accurate does not work. Here are the four levers that do, plus a ten-point checklist to run before anything ships.
If it is true for every request, it goes in the system prompt. A decision table for twelve kinds of instruction, plus what it costs you to get it wrong.
Trying a prompt once is a demo, not a test. Here is a five input, three run method that catches most failures in about ten minutes.
Asking for JSON gets you JSON most of the time, and most of the time breaks code. Here is how to specify structured output so it parses on every run.
Same prompt, same model, different answer. Here is what is actually happening inside the model, and the five changes that make output consistent enough to rely on.
Your prompt works until someone pastes the wrong thing into it. Here is why language models cannot tell your instructions from user data, and the containment pattern that fixes it.