Phase 14 · Lesson 52 of 54

Design Success Metrics Before the Result Exists

Measurement should answer a decision, not decorate a dashboard. Start with the goal, derive questions, then choose the smallest metrics that answer them.

Lesson 52 of 54Learn + Build~70 minutesPython (stdlib)

Before this: Lessons 47 and 51 of Phase 14

On this page

Learning Objectives

  • Derive questions and metrics from an outcome goal.
  • Define thresholds, windows, sources, and directions before observing results.
  • Pair outcome metrics with guardrails and counter-metrics.
  • Match evaluation evidence to the decision the build must support.

Goal, Question, Metric

Start with a goal:

Reduce time to identify the affected service without increasing unsafe actions.

Derive questions:

  • How quickly is the correct service identified?
  • How often is the identified service correct?
  • Does diagnosis remain read-only?
  • Does the workflow increase alert dismissal or operator workload?

Then choose metrics that operationalize those questions.

Diagram (opens full size)

A Metric Needs a Contract

Every metric needs:

Field Example
Name median_identification_seconds
Direction at most
Threshold 120
Window ten incident replays
Source replay event log
Population on-call engineers in the pilot
Kind outcome or guardrail

Without source and window, a number cannot be reproduced. Without a threshold, it cannot drive a decision.

Outcome, Guardrail, and Counter-Metric

  • Outcome metric: did the desired state improve?
  • Guardrail: did a fixed constraint remain true?
  • Counter-metric: did the local improvement shift cost or harm elsewhere?

For an incident workflow, speed is not enough. Correctness, production writes, operator workload, and missed alerts protect against a fast but unsafe result.

Offline and Online Evidence

Offline replay is useful for repeatability and edge coverage. A bounded pilot is useful for real behavior, trust, and workflow effects. Neither substitutes for the other.

Use the cheapest evidence that can answer the current decision. Do not expose real users merely because the implementation is ready.

Decide Before You Measure

Write the pass, fail, and ambiguous paths before seeing results. Otherwise the team will move the threshold to protect the build.

Example:

  • pass: correct service rate at least 0.9 and median time at most 120 seconds;
  • fail: any production write or correct rate below 0.75;
  • ambiguous: small improvement with wide variance, requiring a larger replay set.

Build It

The lab validates a measurement plan, evaluates inclusive thresholds, records missing values, and writes outputs/measurement-report.json.

python3 code/main.py
python3 -m unittest discover code/tests -v

Remove the guardrail metric and observe why the plan becomes invalid even when the outcome metrics remain.

Exercises

  1. Derive three questions from one outcome goal.
  2. Add a counter-metric that catches cost shifted to another role.
  3. Define the source, population, and window for every metric.
  4. Write pass, fail, and ambiguous decisions before generating values.
  5. Identify one metric that is easy to collect but cannot change the decision. Remove it.

Further Reading

What You Keep

Keep outputs/measurement-report.json. It defines the evidence gate for the prototype, pilot, or production stage.

Check yourself

Quick quiz

  1. What is the correct measurement order?

    1. Data, model, feature
    2. Metric, question, goal
    3. Dashboard, metric, goal
    4. Goal, question, metric
    Show the answer

    D. Goal, question, metric Goals define information needs, questions refine them, and metrics operationalize answers.

  2. Why define thresholds before looking at the results?

    1. To avoid questions
    2. To reduce storage
    3. To prevent moving the decision rule to protect the build
    4. To guarantee a pass
    Show the answer

    C. To prevent moving the decision rule to protect the build Precommitted thresholds reduce post-result rationalization.

  3. What does a guardrail metric protect?

    1. A fixed constraint or unacceptable harm
    2. Only speed
    3. A release name
    4. A visual style
    Show the answer

    A. A fixed constraint or unacceptable harm Guardrails ensure improvement does not violate safety or policy.

  4. What is a counter-metric?

    1. An unmeasured opinion
    2. A measure that catches cost or harm shifted elsewhere
    3. A second copy of the outcome metric
    4. A model score
    Show the answer

    B. A measure that catches cost or harm shifted elsewhere Local gains can create downstream burden that a counter-metric exposes.

  5. Why must a metric name its source and window?

    1. For branding
    2. To replace a threshold
    3. To avoid users
    4. For reproducibility and interpretation
    Show the answer

    D. For reproducibility and interpretation A number without provenance and time or sample boundaries cannot support a reliable decision.

  6. When is offline replay insufficient?

    1. When the decision depends on real user behavior or workflow effects
    2. When tests are fast
    3. Never
    4. Always
    Show the answer

    A. When the decision depends on real user behavior or workflow effects Replay is repeatable but cannot fully reproduce trust, coordination, and live behavior.

Questions people ask

How do you measure the success of an AI project?

Start from the goal, then ask what would show it is met. Choose a few metrics with a target, time window and data source set in advance, and add guardrail metrics for things that must not get worse.

What is a guardrail metric?

A guardrail metric tracks something that should not get worse while you improve the main goal. For example, faster replies should not raise error rates or complaints. It stops a win on one number from hiding damage elsewhere.

Next lessonChoose Prototype, Pilot, or Production DeliberatelyPrevious: Write Specifications That Preserve Judgment

Lessons from AI Engineering from Scratch by Rohit Ghumare and contributors, MIT license. Notes for owners by Lozo. License

Next step

Rather have it built for you?

Reading is optional. Tell me what's stuck and I'll build it into the business you already run.

  • A real conversation, not a pitch
  • You keep your accounts
  • Nothing sends without your yes