Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Prompt and Context Optimisation

Free · sign in to start and track progress

1 · Designing prompts systematically

  • 1Prompting current Claude models
  • 2Choosing few-shot examples
  • 3Eval-driven prompt iteration

    Exercise answers

    • Answer: Three disciplined iterations on the enquiries drafter
    • Answer: Measure prompt fragility

2 · Optimising and operating prompts

  • 4Automatic prompt optimisation
  • 5Optimising tools, instructions and skills
  • 6Prompt registries and online tests
  • 7Model migration and regression suites
CapstoneOptimise and ship the questions drafterReference implementation

Module 1 · Designing prompts systematically · Lesson 3

Eval-driven prompt iteration

The loop that turns prompt edits into measured changes - splits, one change at a time, repeated trials, paired comparisons and a changelog with a reason for every line - and how to estimate how much of a dev-set win is just selection noise.

70 min 1 video 3 exercises 6-question quiz Answers
Setup for the exercises:Install Claude CodePython with uv

By the end of this lesson you can

  • Run a prompt iteration loop with a frozen test split, a dev split and repeated trials, and decide when to promote a version
  • Compute the expected inflation of the best of k prompt variants on a small dev set, and explain why the winner's dev score is biased upward
  • Keep a prompt changelog that ties every instruction to the failures it fixed, so that later migrations can remove it safely
  • Use Claude to propose prompt edits from failure transcripts without letting it grade its own work

On this page

  • The loop
  • The winner's curse on a small dev set
  • A changelog with reasons
  • Using Claude to propose edits
  • Robustness, not just a point score
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01The loop
  2. 02The winner's curse on a small dev set
  3. 03A changelog with reasons
  4. 04Using Claude to propose edits
  5. 05Robustness, not just a point score
  6. 06Misconceptions and limits
  7. 07Connections
  8. 08Summary

Sources & further reading

  • Generalization in Adaptive Data Analysis and Holdout ReusePaper · Dwork, Feldman, Hardt, Pitassi, Reingold and Roth · 2015Why repeatedly checking ideas against the same holdout set overfits it, and how to reuse a holdout safely. The theory behind freezing your test split (NeurIPS 2015).
  • Quantifying Language Models' Sensitivity to Spurious Features in Prompt DesignPaper · Sclar, Choi, Tsvetkov and Suhr · 2023Proposes reporting performance across a range of plausible prompt formats rather than one. Read sections 1 and 3 for the argument (ICLR 2024).
  • Demystifying evals for AI agentsLab research · AnthropicAnthropic's engineering view of eval suites, capability versus regression cases, and how teams use them to change prompts and models quickly.
  • Prompting best practicesDocs · AnthropicThe techniques you will be testing; the guide itself says to re-check model-specific techniques against your own evals.
  • Skill authoring best practices (evaluation and iteration)Docs · AnthropicThe "Build evaluations first" advice and the Claude A / Claude B pattern for iterating with one Claude writing and another testing. Applies to prompts as well as skills.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 8 more sections
  • 3 hands-on exercises
  • A 6-question quiz
  • Progress, quiz scores and bookmarks