KatInterview

Debugging False Approvals in a Risk Scoring System

BehavioralModel answer
HardModel answerBehavioraldebuggingsoftware-engineeringsystems

Last updated

Investigate why a return-eligibility scoring service incorrectly approves high-risk requests and identify root causes across inputs, logic, and control flow.

You maintain a risk-scoring service for an e-commerce platform that evaluates return requests. The service computes a risk score from multiple signals:

  • Customer's historical return count
  • Item value
  • Account age
  • Product category
  • Fraud and abuse indicators

Requests with scores above a threshold are rejected. However, you've recently observed that some high-risk returns are being incorrectly approved, leading to fraud losses.

Your task: Explain your debugging approach and identify six distinct categories of bugs that could cause these false approvals. For each category:

  1. Describe what could go wrong
  2. Explain how you would detect it
  3. Propose how to fix it
  4. Suggest how to prevent recurrence

Focus on systematic root-cause analysis rather than guessing. Consider the full pipeline: data collection, feature computation, scoring logic, and decision-making.

Hints

Hint 1

Think about the entire decision pipeline: where do inputs come from, how are they transformed, and where is the final decision made?

Hint 2

Replaying past decisions with logged data can isolate whether bugs are in runtime behavior or in the scoring logic itself

Hint 3

Consider what happens when services fail, data is missing, or edge cases like new categories appear