Loading slide

Prompts as Programs

  1. 01Prompts as Programs
  2. 02Not a search box
  3. 03Memory card
  4. 04Show, don't just tell
  5. 05See it happen
  6. 06Learning without changing
  7. 07Reinforce your understanding
  8. 08Question: How framing shapes output
  9. 09Question: In-context learning
  10. 10Quiz: answer
  11. 11The prompt shapes the possible
  12. 12Want to go deeper?
4 / 11
BackNext

Show, don't just tell

Here is the single most reliable trick that falls out of "the model continues your text." If you want output in a particular shape, do not describe the shape. Show it, a few times, and let the model continue the pattern.

Think about teaching someone an unfamiliar form. You could write a paragraph of rules: "put the title first, then the author and year in brackets, then a dash, then one sentence on why." Or you could just hand them three already filled-in forms and say "more like these." The filled-in forms are faster and far harder to misread. There is no rule to interpret, no ambiguity about what "one sentence" means. The examples simply are the spec.

That is exactly what works on a model, and it has a name: . Show it two or three examples in the format you want, and because the model is a pattern-continuer, the most plausible thing to write next is one more item in that same format. You often get perfect formatting without stating a single rule about formatting.

It tends to beat careful instructions for the same reason the filled-in forms beat the paragraph of rules: instructions have to be interpreted, examples do not. Three concrete examples are an unusually strong signal about what comes next.

There is a catch, and it is the same coin's other side. The model copies everything your examples imply, not just the part you meant. If your three examples all happen to recommend science fiction, the model will keep recommending science fiction. If they carry a slant or an assumption, that rides along too. What you show is what you get, in tone and content, not only in layout. So choose your examples as carefully as you would choose your words.

Citations
Citations