Walkthrough

Zero-Shot CoT & Step-by-Step Triggers

Trigger reasoning without examples, structure the scratchpad, and extract clean final answers your code can parse.

Steps · 0 / 5 done
  1. Get a baseline failure

    Start with a problem that punishes instant answers, and demand an instant answer — so you can see exactly what the trigger changes. Run this on a small or fast model a few times.

    A gym charges a $50 signup fee and $30/month. A rival gym charges no signup fee and $38/month.
    After how many months is the first gym cheaper in total cost?
    Answer with only a number. No explanation.
    VerifyYou see wobble or confident wrong numbers across runs — that's the baseline the next steps fix.
  2. Add the trigger

    One line converts the same prompt into zero-shot chain-of-thought — no examples needed. 'Think step by step' became famous because it reliably flips models into showing their work; any equivalent phrasing does the same job.

    A gym charges a $50 signup fee and $30/month. A rival gym charges no signup fee and $38/month.
    After how many months is the first gym cheaper in total cost?
    
    Think step by step, then give the final answer.
    VerifyThe response now walks through the algebra and lands on month 7 consistently.
  3. Structure the scratchpad

    Free-form rambling is hard to read and harder to parse. Give the reasoning a home and the answer a separate one — tags make both machine-addressable, and naming the steps you care about upgrades the reasoning itself.

    Solve the problem below.
    
    Work inside <scratchpad> tags: set up the equation, solve it, then sanity-check the result
    by plugging it back in.
    Then give only the final answer inside <answer> tags.
    
    Problem: A gym charges a $50 signup fee and $30/month. A rival charges no signup fee and
    $38/month. After how many months is the first gym cheaper in total?
    VerifyOutput contains both tag blocks, and the sanity-check step actually verifies the number before the answer block commits to it.
  4. Make extraction boring

    Downstream code needs the answer, not the essay. Two reliable patterns: a rigid final-line contract you can regex, or a second cheap call that reads the reasoning and emits only the answer. Start with the final-line contract — it's one line and zero extra calls.

    End your response with exactly one line in this format, with nothing after it:
    FINAL: <number>
    
    Example last line:
    FINAL: 7
    VerifyTen runs, ten responses ending in a FINAL: line that a one-line regex extracts every time.
  5. Right-size the technique

    Reasoning triggers cost tokens and latency, so match them to the task and the model. On reasoning models — Claude with extended thinking enabled, GPT thinking tiers, Gemini thinking — the trigger is redundant; control the thinking budget instead and keep the answer contract.

    Cheat sheet:
    - Simple task, any model           → no trigger, just an output contract
    - Multi-step task, standard model  → "Think step by step" + <scratchpad>/<answer> tags + FINAL: line
    - Multi-step task, reasoning model → no trigger; set the thinking budget; keep the FINAL: contract
    - Parsing prose answers with regex → stop; add the answer contract instead
    VerifyFor your current project you can say which row applies — and your prompt matches it.
Check your understanding
Q1. Your pipeline regexes the model's prose for a dollar amount and breaks weekly. Which fix is most robust?
Q2. You add 'Think step by step' to prompts for a reasoning model with extended thinking enabled. What's the likely effect?
· Tick off the 5 step(s) above.
· Score 100% on the quiz.