The Software Laboratory: How We Decide What Counts as Better

This is the full write-up behind the video. It covers why the lab exists, the mandate that starts every piece of work, each of the five stages in detail, and the records each stage leaves behind. At the end, the bug that started all of this is run back through the loop, along with a short checklist you can use on your own results.

Where this came from

For months, a set of our models kept landing just short of the bar: plus 4.8% a year, then plus 7.6%. Each result was close enough to justify one more attempt.

Then we audited the scoring. Misses with no data at all were feeding scores into the math. We fixed that one bug and changed nothing else, and the plus 7.6% result fell to about minus 2.

The near misses had come from the measurement, not the model. That changed the question we ask. "Did this work?" became "How would we know?" The Software Laboratory is our answer to the second question.

Why a near miss is the dangerous result

A clear failure gets looked at. A clear win gets checked before anyone relies on it. A result that lands just short of the bar gets neither. It looks like the method is almost there, so the natural next step is another attempt with a small change, and then another. Every attempt is judged by the same scoring, so if the scoring is wrong, every attempt inherits the same error and the error never shows up as a surprise.

That is what happened to us. Two results months apart pointed the same way, which made the pattern feel trustworthy. What they shared was the scoring, and the scoring was the fault. A loop of "try again" can run for a long time on a broken ruler. The lab is built so that the ruler gets checked as part of the work, before anyone argues about the result.

The operating model

The Software Laboratory operating model: people define the research mandate; signals are observed, ranked into hypotheses, tested in isolated experiments, evaluated against a baseline, and either promoted to the Software Factory or revised and retired into experiment memory.

The diagram reads top to bottom, then left to right. People set the mandate across the top. Underneath it, five stages run in order: observe, hypothesize, experiment, evaluate, decide. The decision splits two ways. A proven improvement goes right, to the Software Factory, and becomes the new standard. Everything else goes down into experiment memory. Two return paths close the loop: evidence in memory informs the next experiment, and production outcomes from the factory become new signals for the lab to observe.

The lab's own line sums up the job: explore methods, prove improvements, raise the standard.

People define the research mandate

Every piece of work starts with a mandate, written by a person before any code runs. It covers four things:

Mandate The question it answers
Goals and baseline What are we improving, and what baseline do we have to beat?
Guardrails and invariants What can never break?
Metrics and evidence What will we measure, and what evidence counts?
Budget and autonomy How much are we willing to spend to find out, and how far can the agents go on their own?

The mandate fixes the outcome. Required outcome: Y or better. Methods remain open to experimentation. People decide what "better" means. The lab, including its agents, is free to find the way there.

What each part of the mandate protects against

Goals and baseline. Without a baseline, any number can be described as progress. Naming the baseline up front means every result is read as a difference from something real, and "better" has a fixed meaning before the work begins.

Guardrails and invariants. An improvement on the target metric can come with damage somewhere else. Listing what can never break turns that damage into a failed result instead of a side effect someone has to notice later.

Metrics and evidence. This is the part our scoring bug lived in. Deciding in advance what will be measured, and what kind of evidence counts, means the measurement itself gets defined and checked before results start arriving. It also stops a metric from being swapped for a friendlier one after the fact.

Budget and autonomy. Research can always use one more run. A budget sets the point where we stop and decide with the evidence we have. The autonomy limit sets how far the agents in the lab can go without a person, so they can work freely inside the mandate and stop at its edge.

Why the outcome is fixed and the method is open

The split is deliberate. If people fix both the outcome and the method, the lab can only confirm what someone already believed. If nobody fixes the outcome, every result becomes a matter of opinion. Fixing the outcome ("Y or better") and leaving the method open gives the lab room to try approaches nobody expected while keeping one standard every approach is judged by.

A mandate, written out

A mandate can be short. The form below follows the four parts above.

MANDATE
Goal:            What we are improving
Baseline:        The current result we have to beat
Required:        Y or better, measured as ...
Never break:     Invariants that end an experiment if violated
Metrics:         What we measure, and what evidence counts
Budget:          The most we will spend to find out
Autonomy:        What the agents may do without a person

The five stages

01 / Observe: signals and opportunities

Work begins with signals: production feedback, bottlenecks, goals we keep missing, and ideas we can't shake. Anything that hints at a better way becomes a signal.

Signals come from two directions. Some come from production, as outcomes the factory sends back. Others come from inside the lab, as evidence in experiment memory that informs the next experiment. A goal we keep missing is worth singling out, because a repeated near miss is a signal about the measurement as much as about the method.

02 / Hypothesize: rank hypotheses

Each signal becomes a ranked hypothesis. We propose approaches and estimate value, uncertainty and cost.

The rule at this stage is the most important one in the lab: the hypothesis is written down and sealed before anyone sees a result. It records three things:

Sealing comes first because once a result exists, it is easy to tell a story that fits it. A prediction made afterward always looks right. A sealed prediction can be wrong, and that is what makes it useful. When the result arrives, the comparison is with what we said beforehand, not with what we would like to have said.

Ranking matters because there are always more signals than budget. Estimating value, uncertainty and cost lets us spend the budget where it is most likely to teach us something.

03 / Experiment: isolated experiments

Approaches run side by side as isolated experiments: approach A, approach B, approach C. Different methods, shared constraints.

The shared constraints are what make the comparison fair. If one approach gets easier conditions, a difference in results tells you about the conditions, not the method. Running them in isolation keeps one experiment from leaking into another.

Every trial goes into a ledger chained by hash. In a hash-chained ledger, each entry includes a fingerprint of the entry before it, so changing or deleting an old entry breaks every fingerprint that follows. The practical effect is that nothing gets quietly tried and forgotten. Failed attempts stay on the record, which matters because a method that needed twenty tries to produce one good result is a different finding from a method that worked the first time.

04 / Evaluate: compare against the baseline

Evaluation is where the sealed prediction meets the measurement. Each result is compared against the baseline from the mandate on four questions:

Question Why it is asked
Did it improve? Against the baseline, on the metric the mandate named.
What regressed? An improvement in one place can hide a loss in another, including the invariants.
What did it cost? A gain that costs more than it returns is not an improvement.
Can we reproduce it? A result that appears once may belong to that run rather than to the method.

The first question is the one everyone asks. The other three are the ones that stop a lucky or expensive result from being promoted.

05 / Decide: is the evidence sufficient?

The decision point is one question: is the evidence sufficient? There are three ways out of it.

Most experiments end in revise or retire, and that is expected. A lab where most experiments get promoted is probably not checking hard enough.

What the lab keeps

Experiment memory

Nothing from a retired experiment is thrown away. Experiment memory holds:

That evidence informs the next experiment, and it feeds the next mandate. A failed approach that is written down is one nobody has to rediscover. A tradeoff that is written down is one the next mandate can name as a guardrail.

The Software Factory, and back again

The laboratory and the factory do different jobs.

Software Laboratory Software Factory
Job Explore methods and prove improvements Validate, release and operate
Receives Signals, including production outcomes Packaged evidence and changes for proven improvements
Produces Promoted improvements, and evidence in memory The new standard, running in production

Production outcomes then become new signals, and the loop starts again at Observe. Each time an improvement is promoted, it becomes the baseline the next experiment has to beat.

The bug that started this, run back through the loop

It helps to look at the original near misses with the lab in place. This is the method applied to the story at the top, not a record of what happened at the time.

Questions to ask of your own results

The lab is our way of asking these questions every time. They work without the lab too.

  1. What baseline did this have to beat, and was it named before the work started?
  2. Was the prediction written down before the result was seen?
  3. Did every approach run under the same constraints?
  4. Is every attempt on the record, including the ones that failed?
  5. What regressed, and what did it cost?
  6. Has it been reproduced?
  7. When did you last audit the scoring itself?

What success means here

Shipping more is not the measure. Success is a proven improvement or evidence that changes the next decision. An experiment that fails cleanly, with its result recorded, still counts if it changes what we try next.