KatInterview

Detecting Bot Accounts and Measuring Generative Ad Tools

Statistics & ExperimentsModel answer
MediumModel answerStatistics & Experimentsexperimentationmetricsmachine-learning

Last updated

Design metrics and experiments to evaluate an automated account integrity classifier and a generative AI ad creation tool on a social platform.

Background

You work as a Data Scientist at a large social platform with two ongoing projects that need rigorous evaluation:

  1. Bot Account Classifier: An ML model assigns each account an "inauthenticity score." Any account scoring above 0.85 is automatically suspended. The team wants to know how well the system is actually working.
  2. Generative Ad Creative Tool: Advertisers can now use an AI tool to auto-generate images and copy for their ads. Leadership is worried that easier ad creation will flood the auction with low-quality or policy-violating content, degrading the user experience over time.

What You Are Asked to Do

Part 1 — Metrics

Propose a primary metric to measure how well the bot detection system performs. Explain why accuracy is a poor choice here. Then describe how you would estimate model performance on the large population of accounts that are never flagged and therefore never reviewed.

Part 2 — Experiment Design

You want to run a randomized controlled trial (RCT) to measure whether exposure to AI-generated ads hurts 30-day user retention. Describe your experimental design. Specifically, address how you would handle the fact that users are interconnected — one user's behavior can be influenced by ads their friends or network connections were exposed to.

Part 3 — Threshold Trade-offs

The model team proposes tightening the suspension threshold to improve precision (fewer wrongful suspensions). Walk through the downstream business consequences of this change. How would you formally quantify the cost of a false positive and the cost of a false negative, and how would those costs feed back into setting the threshold?

Hints

Hint 1

Fake accounts are typically 3–5% of all users. Think about what a trivial baseline classifier would score on accuracy, and what that tells you about accuracy as a metric. What would you actually want to maximize, and what constraint would you put on the other side?

Hint 2

The tool is adopted by advertisers, but your outcome lives on the user side. Randomizing advertisers doesn't isolate what users see — think carefully about what unit you actually want to randomize and what spillover paths exist.

Hint 3

To put a number on the threshold decision, try writing out a dollar cost for each error type separately, then derive the decision rule from those two numbers. A middle tier between 'suspend' and 'do nothing' can also reduce the effective cost of being wrong.