In this article
  1. Before you start
  2. Why interviewers ask this
  3. Metric definition from first principles
  4. The Staff-level answer
  5. The rubric
  6. Three variants of this question
  7. Common mistakes
  8. Follow-up questions
  9. Sources

Before you start

This page is one step of the machine learning (ML) system design interview path.

Why interviewers ask this

The consequence of a vague metric is that nobody can tell whether the system worked. Candidates report this follow-up arriving right after they propose a success metric in a machine learning design round, and it separates people who name a number from people who could build it.

A weak answer repeats the name: "activation rate, the share of users who activate." A strong answer writes the formula: who is counted, what event counts, over what window, and who is left out. A Staff-level answer goes one step further and says how the number could be gamed and which second number would catch that. The interviewer is checking whether your metric could be handed to an analyst and computed without a meeting.

Metric definition from first principles

Metric definition
A metric definition is a written rule that says exactly how one number is computed: the entity counted, the numerator, the denominator, the time window, what is included or excluded, and which timestamp is used, so that any two people reproduce the same value from the same data.

In plain words

Think of a recipe. "Make it tasty" is a name. A recipe lists ingredients, amounts and cooking time. Two cooks following it get the same dish. A metric definition is the recipe for a number. The cooking time in the recipe maps to the time window of the metric, and the list of ingredients maps to who and what is counted.

The analogy breaks in one place. A cook has no stake in the dish being scored. People who read a metric are often paid on it, which is why Step 4 exists.

In one precise sentence: a metric is any number a system reports, and a metric definition is the rule that makes that number reproducible.

Step 1: Name the entity and the counted event

Google's Rules of Machine Learning defines a metric as "a number that you care about" and an objective as "a metric that your algorithm is trying to optimize". An objective is a metric that a learning system tries to optimize, so every objective is a metric but most metrics are not objectives.

Start with the entity: the thing one row of data describes, such as a user, a workspace, a session or a request. Then name the event that is counted. The same rules advise a first objective that is simple, observable and attributable, such as whether a ranked link was clicked.

Input: the goal in plain words. Output: one entity and one event. A definition that counts events but never names whose events they are is not finished. The event is a proxy metric for the goal, so say what it stands in for.

Step 2: Fix the denominator and the window

The denominator is the eligible population, and the window is how long each entity has to produce the event. Both change the number. A rate names both a numerator and a denominator, and a time frame belongs in the metric (Analytics Made Simple).

A metric definition is built in four decisionsFlow of four decisions: name the entity and the counted event, fix the denominator and the window, write the exclusions and the timestamp, then name the gaming risk and its guardrail.Entity andeventnumeratorDenominatorand timewindowExclusionsand timestampGuardrailagainst gamingDiagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/and-how-would-you-define-that-metric-itself.html

A metric definition is complete only after all four decisions are written down.CC BY 4.0 — source: And how would you define that metric itself?
Step-by-step description
  1. Say whose events are counted.
  2. Fix who is eligible and for how long.
  3. Remove bots; pick the clock.
  4. Pair the metric with a guardrail.
  • A metric definition names an entity and the event that is counted.
  • The denominator and the time window change the number.
  • Exclusions and the event timestamp complete the rule.
  • A guardrail metric guards against gaming.

Take an illustrative cohort of 1,000 signups. 400 activate on day 1, 200 on day 3, 100 on day 12, and 300 never do, of which 60 are bots.1 The same cohort gives 0.6, 0.6383, 0.4255 or 0.7447 depending on the definition.1 A seven-day window with bots removed gives 0.6383.1

The same cohort of 1,000 signups gives activation rates from 0.4255 to 0.7447, so the window and the bot rule must be written down.
DefinitionNumeratorDenominatorRate
All signups, 7 days6001,0000.6
Bots removed, 7 days6009400.6383
Bots removed, 1 day4009400.4255
Bots removed, no time limit7009400.7447
One cohort gives four activation rates under four definitionsBar chart of the illustrative activation rate for one cohort of 1,000 signups: 0.6 for all signups in 7 days, 0.6383 with bots removed, 0.4255 with a 1-day window and 0.7447 with no time limit.Activation rate00.51All, 7 daysClean, 7 daysClean, 1 dayClean, no capDefinition0.60.63830.42550.7447Diagram: Interview Clozo, CC BY 4.0 ·interview.clozo.ai/blog/and-how-would-you-define-that-metric-itself.html
One cohort, four definitions, four different activation rates.CC BY 4.0 — source: And how would you define that metric itself?
Text description of the diagram
  • The same cohort gives 0.6, 0.6383, 0.4255 or 0.7447 depending on the definition.
  • A seven-day window with bots removed gives 0.6383.

A second trap is how a rate is averaged. Optimizely's ratio metrics documentation sums the numerator across all qualifying units, sums the denominator across the same units, and divides the totals (a pooled ratio). With three illustrative accounts that have 9 of 10 seats active, 1 of 2 and 0 of 1, the pooled ratio is 0.7692, while the mean of the three per-account ratios is 0.4667.1 The two answer different questions, so say which one you mean.

Step 3: Write the inclusion rules and the event timestamp

The inclusion and exclusion rules say which rows are removed before counting: bots, internal test accounts, refunds, duplicate events. The timestamp rule says which clock assigns an event to a window: when the event happened, or when the system received it.

A practitioner spec template covers the grain, the formula with its numerator and denominator, include and exclude filters, identity rules, the event timestamp used, the time zone and a late-arriving data policy (Analytics Made Simple). It is practitioner consensus, not a standard. In our own voice, add the entity and the gaming risk to that checklist.

Exclusions and the event timestamp complete the rule. The late-data policy matters because a number read on Monday can change by Friday; say whether you freeze it or recompute it. Input: the rate from Step 2. Output: a rule that does not depend on who runs it.

Step 4: Name the gaming risk and add a guardrail

Goodhart's law is the observation that a measure that becomes a target ceases to be a good measure (Thomas and Uminsky, 2020). The mechanism is simple: when a measure rewards performance, people have an incentive to manipulate it in order to receive the reward (Goodhart's law analysis, 2022).

Kohavi, Tang and Xu note that revenue alone is an insufficient Overall Evaluation Criterion (OEC), the quantitative measure of an experiment's objective, because it could lead to plastering the site with ads, so Bing weighs revenue against user-experience metrics such as sessions per user (chapter 1 excerpt). A guardrail does the same job from outside the main metric, so a guardrail metric guards against gaming.

An illustrative ranking test shows it: variant Y lifts click-through rate (CTR), clicks divided by impressions, from 0.12 to 0.15, but next-day return falls from 0.3 to 0.26.1 If you stop at the optimized number, you ship the worse variant.

A metric definition names an entity and the event that is counted. The denominator and the time window change the number. Exclusions and the event timestamp complete the rule. A guardrail metric guards against gaming.

Knowing it is half the job. Saying it is the other half.

Interview Clozo is an AI interview copilot for real interview rounds: it hears the question and puts a strong answer on your screen, and you say it in your own words. See the features or how it works.

Start Free Trial →

The Staff-level answer

Interviewer asks

And how would you define that metric itself?

A strong answer

Take first-week activation rate. The entity is a workspace. The numerator is workspaces that finish the core workflow within seven days of creation. The denominator is all eligible workspaces created in the cohort, with bots and internal test accounts removed. I assign events by when they happened, in one fixed time zone, and I recompute once late data lands. Two analysts get the same number from that. Then I name the gaming risk: a team paid on this number can shrink the workflow, so I pair it with thirty-day retention as a guardrail and write down the baseline and the target.

What makes it Staff-level: it closes with the gaming risk and a named guardrail, not just a formula.

The rubric

A strong answer writes the formula; a Staff answer also writes the window, the exclusions, the gaming risk and the guardrail.
DimensionWeak answerStrong answerStaff answer
CorrectnessNames the metric onlyGives numerator and denominatorAdds window, exclusions and timestamp rule
Depth"Engagement" or "accuracy"Defines the eligible populationShows how each choice changes the number
Trade-offsNoneNotes one alternative definitionChooses a definition and says what it hides
CommunicationVague wordingOne clear formulaSayable in under a minute, with an example
Follow-up readinessSurprised by "why?"Can justify the denominatorNames the gaming risk and the guardrail

Three variants of this question

How would you define accuracy precisely?

Accuracy is the number of correct predictions divided by the total number of predictions (Google glossary). A complete answer adds on which data set it is computed and warns that it hides class imbalance.

How would you define the metric for a fraud model?

Name the entity (a transaction or an account), the counted event (a confirmed fraud label), the label delay and the window, and keep a business guardrail such as blocked good customers. The real-time fraud detection design shows the surrounding system.

Which metric would you optimize and which would you only monitor?

Optimize one simple, observable metric and monitor the rest as guardrails. Google's rules note that indirect effects such as next-day visits suit A/B tests and launch decisions better than a first objective.

Common mistakes

  • "Engagement went up, so it worked." (wrong) The name has no formula. (right) "Engagement is sessions per active user per week, bots removed."
  • "The rate is conversions over visits." (wrong) The population and window are missing. (right) "Conversions within seven days of first visit, over unique eligible visitors."
  • "I'll average the ratios across accounts." (wrong) Averaging ratios without saying so mixes two questions: small accounts count as much as large ones. (right) "I report the pooled rate for the business view and the per-account mean for the typical customer, and I say which one is the headline."
  • "Pick the best metric and optimize it forever." (wrong) The proxy drifts from the goal once it is a target. (right) "I optimize one metric, watch guardrails and revisit the choice after launch."

Follow-up questions

What is the difference between a metric and an objective?

A metric is any number the system reports; an objective is the metric the algorithm optimizes (Google).

How do you stop a team from gaming the metric?

You cannot remove the incentive, so you add a guardrail that the gaming would damage, and you review the definition when the number moves without a product change.

Why does the choice of denominator matter?

It decides who is counted as eligible. In the toy cohort, removing 60 bots moves the seven-day rate from 0.6 to 0.6383.1

Should the model optimize the same metric the business reports?

Often not directly. The model needs a simple, observable target, as in the retrieval, ranking and re-ranking funnel, while the business reports slower outcomes such as retention.

How does the definition change for a delayed outcome?

State the label delay and the maturity window, as the churn, long-term value and credit-risk design does. A rate read before outcomes mature is biased low. The delay is a moderation appeal outcome in harmful-content detection and the actual arrival time in arrival-time prediction.

Key takeaways
  • A metric definition names the entity, numerator, denominator, window, exclusions and timestamp.
  • The same data gives different numbers under different denominators and windows.
  • Pooled ratios and averaged ratios differ; say which one you report.
  • Goodhart's law means a target metric needs a guardrail metric beside it.

Sources

  1. Rules of Machine Learning: Best Practices for ML Engineering — Google for Developers (Zinkevich), 26 Oct 2026
  2. Machine Learning Glossary: Metrics — Google for Developers, 26 Oct 2026
  3. Trustworthy Online Controlled Experiments, Chapter 1 excerpt — Kohavi, Tang and Xu (book site), 1 Jan 2020
  4. The Problem with Metrics is a Fundamental Problem for AI (arXiv 2002.08512) — arXiv (Thomas and Uminsky), 20 Feb 2020
  5. Goodhart's Law — CNA, 1 Sep 2022
  6. Definitions and metric specs — Analytics Made Simple (practitioner page), 26 Oct 2026
  7. Ratio metrics — Optimizely documentation, 26 Oct 2026