What zero-shot means

Free preview 2 min to read

First try, not fifth

"Write a method that checks if an article is old" gets an answer. It's rarely the right one on the first try, so a habit forms: read it, say "no, I meant based on published_at, not created_at," read the next attempt, say "no, return a boolean, not a string," and repeat. Zero-shot means something specific: a correct, usable answer to the very first request, with no correction loop.

Why the correction loop costs more than it looks

Each round trip costs time: reading a wrong answer, working out what was missing, rephrasing, waiting again. And the checklist from AI safety: review before copying still applies at the end, however many rounds it took. A suggestion that arrived after five corrections needs the same review as one that arrived first time. Fewer rounds means less work for the same review.

Three levers, not luck

A good first answer isn't about asking more politely or hoping for a better roll. Anthropic's prompting guide says it plainly under the heading "Be clear and direct": "Claude responds well to clear, explicit instructions." The same guide says that "a few well-crafted examples (known as few-shot or multishot prompting) improve accuracy and consistency." This course turns that into three repeatable levers:

  1. Name the exact method signature and return shape, not a vague goal.
  2. Give one or two concrete input-to-output examples alongside the prose.
  3. State edge cases explicitly, such as what happens with nil, empty or boundary input, instead of leaving them for the AI to guess or you to discover later.

What this course covers

  1. Naming the exact signature, and why "a method to check if an article is old" invites the AI to invent a name, an argument and a return type.
  2. Giving concrete examples, and what one well-chosen input-output pair pins down that prose can't.
  3. Stating edge cases, and how that connects to a bug from AI safety: review before copying.
  4. One worked example: the same request asked vaguely and asked precisely, with a plausible answer to each.
  5. Why a well-prompted answer still needs the review checklist.
  6. A wrap-up, and what comes next.

By the end, "the AI misunderstood me" stops being the AI's fault by default. It becomes a specific, fixable gap in how the request was asked.

Lesson 1 of 7 · free

Keep going with lesson 2

Naming the exact method signature

Shows how naming Article#stale? with no arguments and a boolean return closes three kinds of guesswork.

A free account also gives you the quizzes, your progress and notes, and the discussion.

Type to start searching...