StoryboardAI Engineering

Examples in the prompt

A few worked question and answer pairs. The model copies their pattern.

What are examples in the prompt?

Describing the style you want is hard and easy to misread. Showing two or three finished examples is clearer, and a model follows them closely. This is often called few-shot prompting.

Examples steer length, tone, layout and level of detail all at once. They are the most reliable way to get the same shape of answer every time.

They are not free. Every example is sent with every request and costs tokens, and a model can copy an example too literally. A small set of varied examples works better than many similar ones.

Describing a style against showing it.Described: "Be friendly and brief"; Model guesses what that means; Output is generic. Shown: Three real replies in the prompt; Model continues the pattern; Output matches the voice.Described"Be friendly and brief"Model guesses what that meansOutput is genericShownThree real replies in the promptModel continues the patternOutput matches the voice
Describing a style against showing it.

Why do examples in the prompt matter?

Some things are far easier to show than to describe: a tone of voice, a format, the right level of detail. A few good examples in the prompt often change a model's output more than a page of instructions. It is the cheapest and fastest way to get a specific style, and it needs no training.

How do examples in the prompt work?

  1. Collect three to five real cases: an input, and the output you would have wanted.
  2. Place them in the prompt, clearly marked as examples, ahead of the real input.
  3. The model continues the pattern it has just seen and writes an output in the same style and shape.
  4. If the output drifts, change the examples. They are stronger than the instructions around them.

When should you use examples in the prompt?

Use it when

  • You need a particular voice or format
  • Instructions alone keep being misread
  • Edge cases need showing, such as what to do when information is missing

Think twice when

  • The examples would all be alike. The model will copy their sameness
  • You have thousands of cases and a narrow task. That is a job for training

Where do examples in the prompt sit in a real system?

Examples sit in the prompt between the instructions and the real input. In larger systems they are not fixed: the few most similar to the current input are fetched from a store of good past cases, so each request gets the most relevant ones.

What goes wrong with examples in the prompt?

  • Using examples that are too similar, so the model repeats their wording.
  • Including an example with a mistake. The model will reproduce it faithfully.
  • Giving only easy cases, and none showing what to do when it should refuse or ask.

What does examples in the prompt look like in practice?

An assistant drafted replies that sounded like a bank. Five of the owner's real sent emails were added as examples. Nothing described his style. The next draft read: "Thanks Ayesha, brilliant work. I'll sign on Thursday when I'm in."

Watch it happen

These stories show examples in the prompt at work, one step at a time.