Skip to content

By playing, you agree to uListen's Terms and Privacy Policy and YouTube's Terms of Service.

AnthropicAnthropic

Prompting 101 | Code w/ Claude

Presented at Code w/ Claude by @anthropic-ai on May 22, 2025 in San Francisco, CA, USA.

Hannah MoranhostChristian Ryanhost
Jul 31, 202524mWatch on YouTube

Summaries, chapters, transcripts, and FAQs on this page are made by uListen, not YouTube.

At a glance

WHAT IT’S REALLY ABOUT

Iterative prompting to reliably analyze accident-form images and output verdicts

  1. Hannah Moran and Christian Ryan demonstrate prompt-engineering best practices by iteratively improving a prompt for analyzing a Swedish car accident report form and a hand-drawn crash sketch.
  2. An initial minimal prompt leads Claude to misinterpret the scenario, and adding clearer task context and tone constraints steers it toward factual, non-guessing behavior.
  3. They show how putting stable background information—like the fixed structure and checkbox meanings of the accident form—into the system prompt helps Claude read and interpret the images more reliably.
  4. They emphasize procedural instructions, including analyzing the form before the sketch, and using reminders to prevent hallucinations and require confidence for claims.
  5. They close with practical techniques for production use, including structured output formatting (XML tags), prefilled responses for constrained formats, and using extended thinking to debug and improve prompts.

IDEAS WORTH REMEMBERING

5 ideas

Prompt engineering is iterative: test, observe failure modes, and refine.

They show an iterative progression: a minimal prompt produces an incorrect “skiing accident” interpretation, then adding scenario context, tone constraints (stay factual; don’t guess), and form background progressively improves accuracy and confidence.

A strong prompt follows a clear structure: task → content → instructions → (examples/history) → reminders → output.

They recommend a repeatable layout: task/role first, then the content (here, images), then detailed step-by-step instructions, optionally examples and conversation history, and finally a reminder of critical rules before the model produces the output.

Put stable, reusable background (like a fixed form schema) into the system prompt to improve consistency.

Because the accident form’s structure is constant, they suggest giving Claude the form’s layout (two columns for vehicles, 17 rows/checkbox meanings, how people mark boxes imperfectly) in the system prompt so Claude doesn’t have to re-figure it out each time.

Explicitly instruct the model to avoid hallucinations and to express uncertainty when data is unclear.

They emphasize telling Claude to remain factual and avoid inventing details; if it cannot confidently read a checkbox or interpret an unclear sketch, it should say so rather than guessing.

Specify an order of operations that mirrors how a careful human would reason through the inputs.

They found the analysis order matters: have Claude extract facts from the form first, then interpret the sketch using that context; this reduces confusion from an ambiguous drawing.

WORDS WORTH SAVING

5 quotes

Prompt engineering is a very iterative, empirical science.

— Christian Ryan

Claude really loves structure, loves organization.

— Hannah Moran

The form will never change, and so this is a really great type of information to provide to Claude.

— Hannah Moran

If, uh, Claude can't understand what it's looking at, we don't want it to guess and just sort of mislead us.

— Christian Ryan

The order in which Claude analyzes this information is very important.

— Hannah Moran

Read the available transcript
Prompt structure and best practicesIterative prompt refinement and testingTask context and tone constraints (factual, no guessing)System prompt background for fixed-form schemasUsing delimiters (XML tags) and prompt organizationFew-shot examples and conversation history (conceptual)Output formatting, prefill responses, and extended thinking

SPEAKERS

  • Hannah Moran

    host

    Member of Anthropic’s Applied AI team and co-presenter of the “Prompting 101” session.

  • Christian Ryan

    host

    Member of Anthropic’s Applied AI team and co-presenter explaining prompting best practices in the “Prompting 101” session.

High quality AI-generated summary created from speaker-labeled transcript.

Get more out of YouTube videos.

Read along on your phone, search it beside the video, or ask your favorite AI app what was said.