Show a valid empty result
Read each example as a phrase before typing its label. · 157 words
An example teaches a model what to do at the hard boundary only if it includes the empty case. Imagine this prompt: extract paperback books that cost under $20 from the source catalog and return a JSON array, or [] if nothing matches. Worked source: Night Map, hardcover, $24; Sun Garden, paperback, $32. Correct output: []. Neither source meets both conditions, so the model must not invent a match. This teaches that an empty array is a valid result, not a failure.
Add a second example with different source details. Source: Red Kite, hardcover, $27; Blue Harbor, paperback, $22. The rule is still paperback and under $20, so the correct output is again []. If the prompt requests JSON only, the answer should contain no explanation. You can check understanding with a new source: Green Road, paperback, $19. The expected array is [{"title": "Green Road"}]. Comparing the output with that exact array gives a simple, repeatable test.
Check your recall
What should the model return when the source contains no paperback book priced under $20?
Check your answer
It should return an empty JSON array: [].
Sources and credits
Original KeyTouch lesson. Background reading · DAIR.AI · Few-Shot Prompting.