Skip to content

Lesson 4 of 6

Learn from examples

An example can show a distinction that a long instruction leaves unclear.

The idea

Give representative inputs and outputs, including a boundary case. Use consistent labels and delimiters so the assistant can distinguish demonstrations from the new task. Avoid including a single example whose incidental details could be mistaken for a rule. Keep a separate set of cases for checking results; reusing only your examples does not tell you whether the pattern generalizes.

Compare two instructions

Before

A request with important details left open.

Classify this feedback.

After

An instruction with an explicit task and constraints.

Classify feedback as bug, feature request, or other. Examples: ‘The save button crashes’ → bug. ‘Please add dark mode’ → feature request. ‘Thanks for the update’ → other. New feedback: ‘I cannot export my report; the app closes.’ Return a label and the words that support it.

Try it yourself

Use the scenario below, then compare your approach with a worked example.

Compare and reflect. No live AI generation.

Key takeaway

Choose examples that teach the decision boundary, not just the easy cases.