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

    Exercise answers

    • Answer: Build and break an experiment analysis
    • Answer: Wire a registry with labels and trace linkage
  • 7Model migration and regression suites
CapstoneOptimise and ship the questions drafterReference implementation

Module 2 · Optimising and operating prompts · Lesson 6

Prompt registries and online tests

Where prompts live and how a new version reaches production - git, registries such as Langfuse, Braintrust and PromptLayer, labels, caching and rollback - and how to run a case-level online test whose result you can trust, with sample-ratio checks and no peeking.

70 min 1 video 3 exercises 6-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvDocker and Docker ComposeTrace LLM calls with OpenTelemetry and Langfuse

By the end of this lesson you can

  • Choose between prompts in git, a prompt registry or a hybrid, and define what a prompt version must contain
  • Describe how labels, client-side caching, fallbacks and rollback work in current registries, and the failure modes each introduces
  • Implement deterministic case-level assignment and link every output to the prompt version that produced it
  • Detect a sample ratio mismatch with a chi-square test, and explain why daily peeking at a fixed-horizon test inflates false positives
  • Choose between an A/B test, a blind paired review and offline gates when case volume is low

On this page

  • Where prompts live
  • What a version must contain
  • The registry on the request path
  • Online tests: when offline isn't enough
  • Assign by matter, deterministically
  • Choose metrics before you start
  • Check the sample ratio first
  • Don't peek at a fixed-horizon test
  • When volume is too low: blind paired review
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01Where prompts live
  2. 02Online tests: when offline isn't enough
  3. 03Misconceptions and limits
  4. 04Connections
  5. 05Summary

Sources & further reading

  • Always Valid Inference: Bringing Sequential Analysis to A/B TestingPaper · Johari, Pekelis and Walsh · Stanford and Optimizely · 2015Why p-values are unreliable when you monitor a test continuously, and always-valid p-values and confidence intervals that let you stop early safely. Read sections 1–3.
  • Diagnosing Sample Ratio Mismatch in Online Controlled Experiments: A Taxonomy and Rules of Thumb for PractitionersPaper · Fabijan et al. · Microsoft and others · 2019What causes sample ratio mismatches in practice and how to diagnose them, from experience across several companies (KDD 2019).
  • Langfuse prompt version controlDocs · LangfuseVersions, labels (production, latest), rollback by moving a label, and protected labels.
  • Langfuse prompt cachingDocs · LangfuseClient-side caching with a 60-second default TTL, stale-while-revalidate, and fallback prompts. Read before putting a registry on a request path.
  • Braintrust prompt versionsDocs · BraintrustVersion pinning and environments for prompts loaded from code.
  • PromptLayer release labelsDocs · PromptLayerRelease labels and dynamic release labels that split traffic between versions by percentage or segment.
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.

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