← Lessons

quiz vs the machine

Platinum1830

System Design

The Fraud Scoring Pipeline

Combining rules, features, and models to score a transaction risk in real time.

6 min read · advanced · beat Platinum to climb

The scoring goal

A fraud scoring pipeline evaluates each transaction and produces a risk score used to approve, decline, or send it for review. It must decide in milliseconds while drawing on rich history.

Pipeline stages

  • Feature enrichment gathers signals like device, velocity, and prior behavior.
  • Rules apply hard cutoffs such as a blocked country or an obvious mismatch.
  • A model combines features into a probability of fraud.
  • A decision maps the score to approve, review, or decline.

Latency and freshness

Some features are precomputed for speed while others, like the count of transactions in the last minute, must be fresh. Balancing precomputed and real time features keeps latency low without going stale.

Operational guidance

  • Combine fast rules with a learned model rather than relying on one.
  • Keep velocity features fresh while precomputing stable ones.
  • Log every decision so the model can be retrained and audited.

Key idea

A fraud pipeline enriches features, applies rules, scores with a model, and maps the score to a real time decision.

Check yourself

Answer to earn rating on the learn ladder.

1. Why combine rules with a model rather than using only one?

2. Why must velocity features be fresh?

3. Why log every fraud decision?