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

2 · Optimising and operating prompts

  • 4Automatic prompt optimisation
  • 5Optimising tools, instructions and skills
  • 6Prompt registries and online tests
  • 7Model migration and regression suites

    Exercise answers

    • Answer: Migrate the summariser behind a regression suite
    • Answer: Gate prompt changes in CI
CapstoneOptimise and ship the questions drafterReference implementation

Module 2 · Optimising and operating prompts · Lesson 7

Model migration and regression suites

Moving a prompt to a new model safely - the API breakages, token and cost changes, and behavioural drift to check, how to design a regression suite that catches negative flips, and a worked migration of the report summariser from Claude Haiku 4.5 to Haiku 5.5.

75 min 1 video 3 exercises 6-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvGet an OpenRouter keyLocal models with OllamaRun evals in GitHub Actions

By the end of this lesson you can

  • Run a model migration in order - API changes, token recount, regression suite, prompt audit, effort sweep, shadow and cutover - and explain why each step comes where it does
  • Recompute cost per call after a tokenizer and price change, including thinking tokens
  • Design a regression suite with control, regression, capability and safety tiers graded on properties rather than exact text
  • Compute negative-flip rate and a paired test between model versions, and decide when a migration is blocked despite a higher average
  • Use the prompt changelog to find instructions written for the old model and re-test them

On this page

  • What changes when the model changes
  • Worked example: does Haiku 5.5 cost less?
  • The migration procedure
  • Regression suites
  • Negative flips
  • Running it in CI
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01What changes when the model changes
  2. 02Worked example: does Haiku 5.5 cost less?
  3. 03The migration procedure
  4. 04Regression suites
  5. 05Misconceptions and limits
  6. 06Connections
  7. 07Summary

Sources & further reading

  • MUSCLE: A Model Update Strategy for Compatible LLM EvolutionPaper · Echterhoff et al. · Apple · 2024Instance-level regressions ("negative flips") when LLMs are updated, even when average performance improves, and ways to reduce them (EMNLP 2024).
  • Positive-Congruent Training: Towards Regression-Free Model UpdatesPaper · Yan et al. · Amazon · 2021Introduced the negative-flip framing: a new model wrong where the old one was right. The vocabulary for regression analysis (CVPR 2021).
  • Demystifying evals for AI agentsLab research · AnthropicRegression versus capability evals, and how teams with good suites adopt new models quickly.
  • Claude Haiku 5.5 migration guideDocs · AnthropicThe worked migration in this lesson - model IDs, the token recount (about 30% more tokens), adaptive thinking, sampling parameters, prefill, append-only history and refusals.
  • Model deprecationsDocs · AnthropicLifecycle states, at least 60 days' notice before retirement, current retirement dates and API parameter deprecations. Check it every quarter.
  • Prompting best practices (migration considerations)Docs · AnthropicThe prompt-side migration checklist - thinking configuration, prefill, anti-laziness prompting and append-only history.
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.

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