MLGuerrillaStart M1 →
Free · in beta·intermediate·M8·36 min read·Prereq: Datasets & Evaluation (M1). AI Product Framing (M7) sets up the example.

Experimentation

The capability

What is experimentation?

An experiment is basically a comparison where only one thing is different between the two sides. You keep one version the way it is, change one thing in the other, and then run both under the same conditions. If the results come out different, the only explanations left are your change and random chance, and this module shows you how to work out how much of the gap could just be chance.

In an AI system you run experiments in two places. The first is your eval dataset from M1, where you run two versions of a prompt or a model on the same test cases and compare the scores. The second is real users, where you split traffic between the two versions and compare what happens to each group, and that's what most people call an A/B test. The dataset is quick and cheap, but it can only tell you about the inputs you put in it. Real traffic shows how customers respond, but it takes days or weeks, and while it runs, some customers get the worse version.

What an experiment tells you is whether a change moved a number, and roughly by how much. It can't tell you why the number moved, and a small difference can come from chance alone, so part of the job is working out how many users or test runs you need before you can trust the result.

Where it shows up

You'll need one pretty much any time you're trying to decide whether a change is worth keeping. When you switch to a cheaper model or rewrite a system prompt, you need one before you can say it helped, and the same goes for any change to how much history goes into each call.

Keep reading

The rest of this lesson is free with an account

Create a free account to read the remaining 17 sections. It takes about twenty seconds and there's nothing to pay. The same account opens the slide decks and CV reviews.

  1. 02February's numbers can't tell you what caused them
  2. 03Write the hypothesis down before anything runs
  3. 04Compare two groups in the same weeks
  4. 05Analyze by the unit you randomized
  5. 06Decide the size and the length before you start
  6. and 12 more

That's the last one written so far

Pick your next module from the board.

All modules →