Personalized Credit Offer Recommendations

Medium · ML System Design · Machine Learning Engineer · Technical Screen

Prompt

Architect a personalized offer recommendation platform for a consumer finance app that matches members with credit offerings such as credit cards and personal loans. Your ranking system should drive both immediate user engagement (click-through rate) and completed credit applications across a catalog containing thousands of active partner offers.

Design for the following operating conditions:

  • Traffic & latency: Serve 50 million daily active users (DAU) while keeping end-to-end recommendation latency below 200 ms.
  • Available signals: Member profile attributes, periodic credit-bureau score snapshots, past credit application records, and live behavioral events (impression, click, dismiss).
  • Outcome sparsity & lag: Downstream lender outcomes—application completions, underwriting approvals, and loan disbursements—occur on only a tiny fraction of impressions and frequently arrive days or weeks after an offer was shown.

Scope & Expectations

  • Multi-stage retrieval and ranking: Narrowing thousands of catalog offers to a small eligible shortlist and ordering them accurately inside a 200 ms latency budget.
  • Batch and streaming features: Selecting high-signal creditworthiness and live-intent features while keeping offline training aligned with online serving.
  • Sparse, delayed-label training: Constructing training targets and loss functions when conversions are rare and partner decisions arrive days or weeks late.
  • Serving topology and validation: Defining APIs, feature storage, model serving, data pipelines, offline evaluation splits, and production A/B experiments.

Step-by-step walkthrough

  1. Clarify requirements and frame the ML objective

    Recommending credit cards and personal loans looks like a standard e-commerce recommender on the surface, but three domain realities change the design completely:

    1. Delayed, rare outcomes: Only a tiny fraction of shown offers become approved applications, and bank decisions arrive days or weeks later.
    2. Real user harm from bad recommendations: Applying for credit usually triggers a hard credit inquiry (an official credit-bureau check recorded on the user's file that temporarily lowers their credit score by a few points). Recommending a flashy card that rejects the user hurts both the user's score and their trust in the platform.
    3. Regulated financial data: Credit attributes must follow strict privacy and fair-lending rules, so protected demographics can never be model inputs and every ranking must be auditable.

    Functional requirements

    • Given a user opening a surface (home feed, offers tab, or loan calculator page), return the top 5 personalized promotions from ~5,000 active offers across ~300 partner banks (issuers).
    • Log real-time user interactions (impression, click, dismiss, application_start) and ingest delayed partner postbacks (server-to-server callbacks or daily batch files reporting application_complete, approved, declined, and funded).
    • Enforce hard business rules: state availability, minimum issuer credit criteria, frequency caps, dismissal cooldowns, and partner daily budgets.

    Non-functional requirements

    • Scale: 50 million daily active users (DAU).
    • Latency: End-to-end p99 latency under 200 ms, leaving ~100 ms for the backend recommendation service after network overhead.
    • Freshness: In-session actions (such as clicking two personal-loan offers or dismissing a card) must update subsequent recommendations within seconds.

    Mathematical objective. Our goal is to lift both immediate click-through rate (CTR) and completed applications while factoring in downstream lender approvals. To rank offers consistently, we combine the funnel stages into a single expected-value score:

    User funnel:
      impression -> click -> application_start -> application_complete -> approved
    
    Expected value of showing offer o to user u:
      score(u, o) = pCTR(u, o)
                  * pComplete(u, o | click)
                  * pApprove(u, o | complete)
                  * value(o)
    

    Here pCTR is the probability the user clicks, pComplete | click is the probability they finish the application given they clicked, pApprove | complete is the probability the issuer approves the completed application, and value(o) is the platform payout (optionally blended with estimated user savings). Multiplying by pApprove prevents the "luxury card trap" where an aspirational card gets high clicks and high completions but 95% rejections.

  2. Back-of-the-envelope scale and funnel numbers

    Let us ground the architecture in concrete traffic, funnel, compute, and storage estimates:

    Traffic
      Daily active users (DAU)       50M
      Requests per user per day      ~4        -> 200M requests/day
      Average / peak QPS             200M / 86,400 ≈ 2,300/s avg; ~7,000/s peak; size for 10,000/s
      Slots per request              5         -> 1,000M (1B) impressions/day
    
    Funnel volume (illustrative baseline rates)
      Impressions                    1,000M / day   (100%)
      Clicks (1% of impressions)        10M / day   (1.0%)
      App starts (20% of clicks)         2M / day   (0.2%)
      Completions (50% of starts)        1M / day   (0.1%   = 1 in 1,000 impressions)
      Approvals (40% of completions)   400k / day   (0.04%  = 1 in 2,500 impressions)
    
    Typical feedback delays
      Click                          seconds to minutes
      Application start              minutes to 24 hours
      Application completion         ~70% same day, ~95% within 7 days of click
      Approval / disbursement        cards: minutes to 7 days; loans: 1 to 4 weeks (~95% within 30 days)
    
    Serving compute & storage
      Heavy ranker candidates        300 offers/req * 10,000 req/s = 3M candidate scorings/s
      Ranker FLOPs (~1M params)      ~2 MFLOPs/candidate * 3M/s = ~6 TFLOP/s (a small GPU or CPU pool)
      Raw impression logs            1B/day * ~1 KB (with logged features) = ~1 TB/day
      Downsampled training table     keep 100% of clicks (10M) + 10% of non-clicks (99M) = 109M rows/day
                                     60-day window = ~6.5B rows (~6.5 TB)
      Online feature store           ~100M registered users * ~2 KB/user = ~200 GB in sharded RAM
    

    Three design lessons jump directly out of these numbers:

    • Approvals and completions are too sparse to train on alone. With only 1M completions and 400k approvals per day out of 1B impressions, denser intermediate events (click at 10M/day and application_start at 2M/day) must provide most of the representation learning.
    • 5,000 offers is small enough for exact vector retrieval, yet too large to heavy-rank every offer. Computing 5,000 64-dimensional dot products takes only 320k multiply-adds (< 1 ms in RAM), so we do not need a complex approximate nearest-neighbor index. However, running a heavy neural network with rich user-by-offer cross features on all eligible offers at 10,000 QPS would triple feature-fetch bandwidth and model compute—so a two-stage retrieval + ranking architecture hits the sweet spot.
    • Negative downsampling must preserve probability calibration. Keeping all 10M clicks and sampling 10% of the 990M non-clicked impressions cuts training rows by ~9x. During training, we give each sampled non-clicked row an importance weight of 1 / 0.1 = 10 in the loss function so the weighted dataset matches the true 1B-impression distribution. (If a standalone CTR model is trained unweighted on 10% negatives, its raw output p' is inflated and must be rescaled via p = p' / (p' + (1 - p') / 0.1) before multiplying probabilities.)
  3. API contracts and data model

    When a user clicks an offer, they often finish applying on the partner bank's website days later. To link that delayed event back to the exact recommendation that caused it (attribution), every recommended offer carries a cryptographically signed tracking_token containing (request_id, offer_id) that the partner echoes back in postbacks.

    GET /v1/recommendations?surface=home&slots=5
      Headers: Authorization: Bearer <user_token>
      200 OK:
      {
        "request_id": "req_81f2",
        "model_version": "mtl_rank_2026_11_20",
        "offers": [
          {
            "offer_id": "loan_1931",
            "position": 1,
            "approval_odds_band": "GOOD",
            "tracking_token": "sig_req_81f2_loan_1931"
          }
        ]
      }
    
    POST /v1/events                       (batched from mobile/web client)
      [{"request_id": "req_81f2", "offer_id": "loan_1931",
        "event_type": "impression | click | dismiss | apply_start", "ts": 1764234843}]
    
    POST /v1/postbacks                    (webhook or daily SFTP batch from partner issuers)
      {"tracking_token": "sig_req_81f2_loan_1931",
       "status": "application_complete | approved | declined | funded", "ts": 1764580110}
    

    Core storage tables:

    offers           offer_id PK, issuer_id, product_type, apr_min, apr_max, annual_fee,
                     allowed_states[], min_credit_band, min_income, payout_value,
                     daily_budget_remaining, launched_at, status
    impressions      (request_id, offer_id) PK, user_id, surface, position, ts, model_version,
                     p_ctr, p_complete, p_approve, is_exploration, propensity, logged_features_ref
    events           (request_id, offer_id, event_type, ts)
    postbacks        (tracking_token, status) PK, issuer_id, event_ts, received_ts
    labels           (request_id, offer_id) PK, clicked, click_ts, started, completed,
                     complete_ts, approval_state (approved | declined | NULL),
                     decision_ts, labels_updated_at
    online_features  user:<user_id>              -> batch credit vector + real-time session counters
                     user_offer:<user_id>        -> hash map of 7-day offer impressions & dismissals
    

    Recording propensity (the exact probability with which an offer was chosen when exploring) lets us evaluate new exploration policies offline later, while labels_updated_at tracks how much time has elapsed since the impression so training knows whether a negative label is mature or still waiting.

  4. High-level system architecture

    The system separates a fast, stateless online serving path (< 100 ms server p99) from streaming (seconds) and batch (daily) data pipelines:

      Mobile / Web App
         |  GET /v1/recommendations                           POST /v1/events (clicks, dismissals)
         v                                                                     |
    +------------------+                                                       v
    | API Gateway      |                                             +------------------+
    +------------------+                                             | Event Collector  |
         |                                                           +------------------+
         v                                                                     |
    +---------------------------------------------------+                      v
    | Recommendation Service (stateless)                |            +------------------+
    |  1. Parallel read <-- Online Feature Store (RAM) <------------ | Event Bus (Kafka)|<-- Partner
    |  2. Hard eligibility <-- In-RAM Offer Catalog     |  Flink     +------------------+    Postbacks
    |  3. Light retrieval: User Tower . Offer Vectors   |  stream       |            |
    |  4. Heavy ranker: Multi-task DNN (batched RPC)    |  counters     v            v
    |  5. Re-ranker: pApprove floor, diversity,         |      +--------------+  +------------------+
    |     budget pacing, exploration slot               |      | Stream Jobs  |  | Data Warehouse   |
    +---------------------------------------------------+      | (Flink)      |  | (Immutable Logs) |
         |  top 5 offers + async impression log -------------> +--------------+  +------------------+
         v                                                                               |
      Mobile / Web App                      Daily Spark jobs: point-in-time feature joins +
                                            delay-aware label builder --> Training (GPU) -->
                                            Isotonic Calibration --> Model Registry --> Canary
    

    Server-side p99 latency budget (~90 ms total, safely under 200 ms end-to-end):

    API gateway + auth token decode                         10 ms
    Parallel online feature reads (user + user_offer keys)  15 ms
    Stage 0 hard eligibility + Stage 1 vector retrieval     15 ms
    In-process offer feature lookup (5,000 offers cached)    1 ms
    Stage 2 multi-task ranker (300 candidates in 1 batch)   40 ms
    Stage 3 business re-ranking & exploration slot           5 ms
    Serialization (impression log emitted asynchronously)    4 ms
    -------------------------------------------------------------
    Total backend p99 budget                                90 ms
    
  5. Deep dive 1: two-stage candidate generation and eligibility

    To narrow ~5,000 offers down to 5 relevant, safe promotions within 55 ms of retrieval + ranking budget, we run a funnel of filters:

    ~5,000 active catalog offers
       |
       v  [Stage 0: Hard Eligibility Rules]  (deterministic, in-memory)
    ~1,000 eligible offers
       |
       v  [Stage 1: Multi-Source Light Retrieval]  (two-tower dot product + domain sources)
      300 candidate offers
       |
       v  [Stage 2: Heavy Multi-Task Deep Ranker]  (cross features + funnel probabilities)
        5 final offers  (after Stage 3 diversity, approval floor, and exploration rules)
    

    Stage 0: Hard eligibility rules (~5,000 -> ~1,000 offers). We use deterministic rules rather than ML here because contractual and compliance constraints cannot tolerate model errors:

    • Drop offers unavailable in the user's state, paused by compliance, or out of daily issuer budget.
    • Drop products the user already holds or from an issuer that declined the user in the past 90 days.
    • Drop offers where the user clearly misses the issuer's published minimum credit band or income.
    • Enforce fatigue caps: suppress an offer for 30 days after 3 user dismissals, or after 3 unclicked impressions in 7 days.

    Stage 1: Light retrieval (~1,000 -> 300 candidates). Our primary Stage 1 retriever is a two-tower neural network (an embedding lookup model with two separate sub-networks: a user tower that maps user features into a 64-number vector online, and an offer tower that maps each offer into a 64-number vector offline). Because 5,000 offers * 64 floats * 4 bytes ≈ 1.3 MB fits comfortably inside L2/L3 cache on every server, we compute exact dot products across all ~1,000 eligible offers in under 1 ms.

    We train the two-tower model on dense positive interactions (click and application_start) using a full-catalog softmax loss (comparing the clicked offer against all eligible offers rather than only offers in the training mini-batch, which avoids penalizing popular offers unfairly). To guarantee coverage beyond click propensity, we merge and deduplicate four candidate sources up to 300 offers:

    1. Two-tower personalized similarity (top 200 offers by user_vec . offer_vec).
    2. High approval-odds retrieval (top 50 offers with the highest historical approval rate for the user's credit band).
    3. Segment trending (top 30 offers with rising application starts in the user's credit band + state over the past 24 hours).
    4. Cold-start pool (up to 20 offers launched within the last 14 days, feeding the exploration slot).
  6. Deep dive 2: multi-task ranking with proxy labels

    Why did the two-tower retriever stop at 300 candidates? Because a two-tower model must keep user and offer vectors separate until the final dot product, so it cannot compute fine-grained cross features (interactions between a specific user and a specific offer, such as "user's credit score minus this card's historical approval threshold" or "number of times this user saw this offer this week"). Stage 2 evaluates all 300 candidates in one batched forward pass with full cross features.

    Sharing dense intermediate signals via Multi-Task Learning. Training a deep network solely on application_complete (0.1% of impressions) overfits quickly. Instead, we build a Multi-Task Learning (MTL) network (one neural network that predicts multiple related targets from shared lower layers) so the abundant click (10M/day) and application_start (2M/day) signals teach rich user-offer representations that the sparser application_complete head reuses:

    Inputs: [User features | Offer features | User x Offer cross features | Context]
                                   |
                    Shared Embedding + Expert Layers (MMoE)
                       /               |                \
                      v                v                 v
                 Tower 1          Tower 2            Tower 3
                  pCTR        pStart | click    pComplete | click
                    |                                    |
                    +---------------> (x) <--------------+
                                       |
                         pCTCVR = pCTR * pComplete|click
    

    Four critical modeling details make this ranker accurate in production:

    1. Avoiding sample selection bias with entire-space training. If we train pComplete | click only on clicked impressions, the model learns exclusively from users enthusiastic enough to click, then misbehaves when asked to score all 300 candidates at serving time (sample selection bias). Following the Entire-Space Multi-Task Model (ESMM) pattern, we multiply pCTR * pComplete|click = pCTCVR (post-view click-and-completion probability) and supervise both pCTR and pCTCVR across all impressions (with sampled non-clicks weighted ×10).
    2. Mixture-of-Experts trunk. Because flashy cards attract clicks (pCTR high) while practical debt-consolidation loans drive completions (pComplete high), forcing one shared hidden layer can cause tasks to pull weights in opposite directions. A Multi-gate Mixture of Experts (MMoE) uses 4–6 small shared sub-networks ("experts") with separate attention weights per tower so each task emphasizes the patterns it needs.
    3. Dedicated pApprove underwriting model. We keep pApprove(u, o | complete) as a separate gradient-boosted tree or neural model trained on decided applications (enriched where available with partner soft-pull pre-qualification checks, which check credit eligibility without affecting the user's score and reduce applicant-only bias). Keeping pApprove separate lets compliance audit it directly and lets us retrain it immediately if one partner bank tightens underwriting.
    4. Debiasing position and calibrating probabilities. Users click slot 1 more than slot 5 simply because it sits at the top (position bias). During training, position feeds a tiny side sub-network added to the click logit; at serving time we set position = 1 for every candidate so offers compete purely on relevance. Finally, because score = pCTR * pComplete * pApprove * value multiplies probabilities by dollars, rank order is not enough—we apply isotonic regression (a fast non-parametric monotonic curve fit on a validation set) per product type so a predicted 0.05 truly converts 5% of the time.

    Stage 3 re-ranking drops any candidate with pApprove < 0.20 (tuned per product category), sorts by score(u, o), enforces diversity (at most 2 offers of the same product type in the top 5 and at most 1 per issuer in the top 3), paces partner budgets, and populates an exploration slot on 10% of requests.

  7. Deep dive 3: feature engineering across batch and real-time

    Financial product propensity depends on both slow-moving creditworthiness and fast-moving shopping intent:

    Feature group Concrete examples Update cadence Pipeline
    Credit snapshot Credit score band, 30-day score delta, revolving credit utilization %, open credit lines, hard inquiries in last 6 months, delinquencies Daily + on bureau refresh Spark batch + event trigger
    Financial need Self-reported income, housing status, total balance on high-APR cards (strong signal for personal-loan debt consolidation) Daily Spark batch
    Application history Existing products held, historical applications/declines per issuer, days since last credit application Seconds to minutes Kafka -> Flink
    Real-time session intent Visited loan calculator in last 10 min, read "balance transfer" article, clicks/dismissals in current session Seconds Kafka -> Flink -> Online Store
    Offer attributes Product type, APR range, annual fee, sign-up bonus value, 30-day empirical approval rate by credit band Minutes to daily Offer catalog + Spark
    User × offer cross user_credit_score - offer_median_approved_score, impressions of this offer in last 7 days, user's historical CTR on this product category Seconds + daily Request-time compute + Flink

    Eliminating training-serving skew. Training-serving skew happens when the feature values used during offline training accidentally differ from what the live server saw—for example, joining an impression from November 1 with the user's credit score from November 15 (which already dropped because they applied for the card on November 1, leaking the future!). We prevent this two ways:

    • Log features at serving time: When the Recommendation Service scores the top candidates, it writes the exact feature snapshot into the asynchronous impression log. Offline training joins delayed labels directly to those logged features.
    • Point-in-time joins for new backfilled features: Whenever we engineer a brand-new feature offline, the backfill query joins each historical impression strictly with the latest feature snapshot whose timestamp is <= impression_ts.
  8. Deep dive 4: labeling strategy and delayed feedback

    Suppose a user clicks a personal loan offer on Monday morning, compares rates all week, finishes the form on Friday, and receives bank approval two Mondays later. Look at what happens if our daily Tuesday training job naively treats every uncompleted click as label = 0:

    Monday 09:00    User clicks loan offer (request_id = req_81f2)
    Tuesday 02:00   Daily training runs -> only 17h elapsed, no completion postback yet!
                    Naive pipeline marks req_81f2 as NEGATIVE (0)  <-- WRONG!
    Friday 18:00    User finishes loan application (postback arrives at day 4.4)
    

    Treating immature examples as true negatives systematically biases pComplete and pApprove downward—worst of all for newly launched offers, where 100% of impressions are recent! A three-part labeling strategy keeps recent training runs unbiased:

    1. Maturity windows (waiting period) for ground truth: From historical delay curves, we pick the elapsed window by which ~95% of eventual conversions have arrived: 1 hour for clicks, 24 hours for application starts, 7 days for application completions, and 30–45 days for issuer approvals. Only rows older than a stage's window are marked "final" for offline evaluation.
    2. Fresh proxy labels for fast adaptation: Because click and application_start mature within a day, the shared layers and early towers train cleanly on yesterday's data without waiting a week.
    3. Delay-aware / time-weighted loss for recent clicks: Instead of throwing away the most recent 7 days of completion data, we weight each not-yet-converted click by how much of the typical delay window has already passed. Let p be the model's predicted eventual completion probability given a click, and let F(elapsed) be the cumulative delay distribution (the historical fraction of completions that arrive within elapsed hours of a click—for instance, F(2 hours) = 0.30 and F(7 days) = 0.95).

      • In a time-weighted log loss, a positive completion always gets full weight 1.0, while a click that has waited elapsed hours without completing yet gets negative weight F(elapsed) (so a 2-hour-old uncompleted click counts as only 0.30 of a negative!).
      • Better yet, we can write the exact censored negative log-likelihood (Chapelle, 2014): if no conversion has arrived by elapsed, the probability of seeing "nothing yet" is 1 - p * F(elapsed) (either the user never converts, 1 - p, or they will convert later, p * (1 - F(elapsed))):
    import numpy as np
    
    
    def time_weighted_loss(p: float, converted: bool, elapsed_hours: float, delay_cdf) -> float:
        """Down-weight recent negatives by the fraction of conversions usually seen by now."""
        # Clamp probability away from 0 and 1 so log never overflows.
        p_safe = float(np.clip(p, 1e-12, 1.0 - 1e-12))
        if converted:
            return -float(np.log(p_safe))
        # A 2-hour-old non-converted click (F = 0.30) gets only 30% of a full negative penalty.
        maturity_weight = float(delay_cdf(elapsed_hours))
        return -maturity_weight * float(np.log(1.0 - p_safe))
    
    
    def delayed_feedback_loss(p: float, converted: bool, elapsed_hours: float, delay_cdf) -> float:
        """Exact negative log-likelihood accounting for conversions still in flight."""
        p_safe = float(np.clip(p, 1e-12, 1.0 - 1e-12))
        if converted:
            return -float(np.log(p_safe))
        # Probability of observing zero conversion by elapsed_hours is 1 - p * F(elapsed_hours).
        prob_converted_by_now = p_safe * float(delay_cdf(elapsed_hours))
        return -float(np.log(1.0 - prob_converted_by_now))
    

    Before every training run, an automated label completeness check verifies each partner bank's postback volume against its 14-day baseline; if a partner's daily SFTP file failed to arrive, those impressions are held back rather than poisoning training as fake negatives.

  9. Offline evaluation and online A/B testing

    Offline validation (strictly time-based split). Never split historical financial data randomly—a random split puts a user's Tuesday impression in test and their Wednesday impression in train, leaking both user state and market-wide APR shifts. We train on days [T - 60, T) and evaluate on days [T, T + 7) only after waiting until day T + 14 (or T + 37 for approvals) so test labels have matured:

    • Retrieval: Recall@300 measured against the heavy ranker's top 5 when run exhaustively on an offline sample of 1,000-offer eligible sets.
    • Per-task probability quality: AUC (area under the ROC curve, measuring how well the model ranks positives above negatives from 0.5 random to 1.0 perfect), log loss, and calibration ratio (mean(predicted) / mean(observed), required to sit within 0.95–1.05 per product type and credit band).
    • Page-level ranking: NDCG@5 (Normalized Discounted Cumulative Gain at 5, which rewards placing completed/approved offers at slot 1 higher than slot 5), sliced by credit band, new users, and newly launched offers.

    Online A/B testing.

    • Randomization unit: Hashed user_id (not request), so a user sees consistent offers across sessions and delayed applications attribute cleanly to one variant.
    • Timeline for delayed labels: Expose users for 14 days, then wait 7 additional days before reading the primary metric at day 21 so ~95% of application completions from day-14 clicks have arrived. Keep a small long-term holdout (e.g., 2% of traffic) to read final 30-to-45-day issuer approvals at day ~55.
    • Primary & guardrail metrics: Primary metric is unique application completions per exposed user (plus expected approved value per user). Guardrails are application decline rate, offer dismissal rate, CTR (never ship a click gain that lowers completions!), and p99 serving latency.
    • Sample-size math: Suppose 5% of exposed users complete at least one application over 14 days (p = 0.05), and we want to detect a 2% relative lift (0.05 -> 0.051, so delta = 0.001) at 95% confidence (z = 1.96) and 80% power (z = 0.84):
    n_per_arm = 2 * (1.96 + 0.84)^2 * p * (1 - p) / delta^2
              = 15.68 * 0.05 * 0.95 / (0.001)^2
              ≈ 745,000 users per arm
    
    At 50M DAU, 745k users per arm is under 2% of active users! During the test, we also split partner daily budgets proportionally between Control and Treatment (for example 50%/50% on a full ramp) so an aggressive variant cannot drain a shared issuer budget and artificially starve Control.
    
  10. Scaling, failure modes, monitoring, and trade-off summary

    Scaling & safe degradation. Stateless Recommendation Service pods autoscale across availability zones; the GPU/CPU model server uses dynamic batching (grouping the 300 candidates of one request—or across concurrent requests arriving within 2 ms—into one matrix multiply). Every failure mode degrades to a safe, filtered fallback—never to unfiltered offers:

    Failure scenario Safe fallback behavior
    Heavy ranker timeout (> 50 ms) Rank the 300 retrieved candidates by two_tower_score * band_approval_rate
    Online feature store timeout Use locally cached daily credit band + explicit feature_missing = 1 indicator
    Flink streaming lag (> 5 min) Serve using daily batch features + eligibility rules; page data platform on-call
    Bad model push Shadow traffic -> 1% canary gated on calibration & latency -> 1-click registry rollback

    Drift monitoring in volatile markets. Interest-rate hikes or bank underwriting tightening can shift behavior overnight. We monitor three layers:

    1. Input feature drift: Daily Population Stability Index (PSI) (a score comparing today's feature histogram to the training histogram, where PSI > 0.2 signals a major distribution shift) on credit utilization, recent inquiries, and offer APRs.
    2. Delay-aware calibration: Hourly predicted / observed CTR, daily completion calibration against p * F(elapsed) on recent cohorts, and weekly approval calibration per issuer and credit band. If one issuer's observed approval rate drops 25% while user features stay flat, that issuer tightened underwriting—we automatically raise its pApprove safety floor and trigger an approval-model retrain.
    3. User trust health: Decline rate per 1,000 completions, dismissal rate, and partner postback heartbeat alerts.

    Summary of key trade-offs:

    • Expected value (pCTR * pComplete * pApprove * value) vs. CTR: Protects users from hard-inquiry rejections and maximizes real conversions, at the cost of maintaining multiple calibrated probability heads.
    • Two-stage retrieval + heavy ranking vs. single-stage: Keeps p99 latency under 100 ms with rich cross features on 300 candidates, while exact 5,000-offer dot products avoid approximate-index maintenance.
    • Multi-task proxy labels + delayed-feedback loss vs. waiting 7–30 days: Adapts to fresh user intent and newly launched offers within hours rather than weeks, at the cost of tracking per-product delay distributions F(elapsed).

Intuition & how it works

Think of recommending credit cards and personal loans like acting as a trusted financial advisor rather than a sidewalk flyer promoter. A flyer promoter hands the flashiest luxury card brochure to every passerby just to maximize interest, even if the bank will reject 90% of those applicants two weeks later. A good advisor first filters out offers the bank will decline, listens to what the person is shopping for right now, and recommends the handful of products they both want and can actually get approved for.

Why do naive approaches fail here? If you train a single model to maximize clicks, it promotes aspirational luxury cards that generate huge click-through rates but massive bank rejection rates—triggering hard credit inquiries (official lender checks on a credit report that temporarily ding a user's score) and destroying user trust. Conversely, if you train a model only on final conversions or loan approvals, only ~1 in 1,000 impressions completes an application and bank decisions arrive days or weeks late—so the model starves for positive examples and mistakenly treats yesterday's recommendations as failures simply because users and banks have not finished acting yet.

Walk through a concrete mini-example with one user (credit_score = 670, who just used an in-app debt-consolidation calculator) and three catalog offers:

  • Offer A (Luxury Travel Card): Minimum score 760, $200 partner payout.
  • Offer B (Debt-Consolidation Personal Loan): Minimum score 640, $150 partner payout.
  • Offer C (Standard Cashback Card): Minimum score 650, $80 partner payout.
  1. Eligibility & light retrieval: Deterministic rules immediately eliminate Offer A (670 < 760), protecting the user from an almost certain rejection. A fast two-tower model (which represents the user and each offer as 64-number vectors and scores them by dot product) retrieves Offer B, Offer C, and 298 other eligible candidates in under 15 ms.
  2. Multi-task expected-value ranking: A deep multi-task learning (MTL) network (a neural network with shared lower layers that learns simultaneously from dense clicks, application_starts, and sparser completions) combines with an approval model to compute score = pCTR * pComplete|click * pApprove|complete * value:
    • Offer B: 0.04 * 0.30 * 0.70 * $150 = $1.26 (boosted by the real-time calculator session feature!)
    • Offer C: 0.03 * 0.40 * 0.80 * $80 = $0.77 Offer B ranks #1 and Offer C ranks #2.
  3. Delay-aware learning: Suppose the user clicks Offer B at 9:00 AM, and at 11:00 AM our training job runs before the user finishes applying. Because historical delay curves show only 30% of loan completions happen within 2 hours of a click (F(2h) = 0.30), our delayed-feedback loss gives this uncompleted click only a gentle 0.30 negative weight instead of mislabeling Offer B as a failed recommendation.

Key trade-offs

  • Expected value (pCTR * pComplete * pApprove * value) vs. pure CTR ranking: Ranking by CTR is fast and simple to learn, whereas multiplying funnel probabilities requires calibration (tuning model outputs via curves like isotonic regression so a predicted 0.05 means 5 out of 100 actually convert). In credit products that extra work is mandatory, because uncalibrated CTR ranking pushes high-click, high-rejection offers.
  • Delay-aware loss on fresh data vs. waiting for labels to mature: Waiting 7 days for application completions (or 30+ days for loan approvals) yields clean labels without extra math, but leaves the model a week to a month stale and completely blind to newly launched offers. Weighting recent negatives by the empirical cumulative distribution function (CDF) F(elapsed) (the historical share of conversions that arrive within elapsed time) lets the model learn from fresh data today, at the cost of maintaining delay curves per product type.
  • Multi-task proxy labels vs. single-target conversion modeling: Dense intermediate events (clicks at 1% and application_starts at 0.2%) give 10x more signal than completions (0.1%) and arrive within hours, preventing overfitting on rare offers. The trade-off is potential negative transfer (tasks competing for network capacity, mitigated with a Multi-gate Mixture of Experts trunk) and the need to verify in A/B tests that proxy gains translate into real completions and approvals.
  • Separate pApprove model vs. one unified network: Keeping approval probability in its own model adds a second training pipeline, but lets bank underwriting shifts be retrained on their own 30–45 day maturity schedule and audited independently by fair-lending compliance teams.
  • Two-stage retrieval + heavy ranking vs. scoring all offers in one stage: With ~5,000 offers, exact vector dot products fit in ~1.3 MB of server memory without an approximate nearest-neighbor index, yet filtering down to 300 candidates still cuts heavy cross-feature lookups and neural-network compute by over 3x to stay safely inside the 200 ms p99 budget.
  • Logging features at serving time vs. recomputing features offline: Writing served feature vectors into the impression log costs ~1 TB/day of storage, but completely eliminates training-serving skew (differences between live feature values and reconstructed historical values).

Common mistakes

  • Optimizing clicks without an approval filter or probability term, which boosts flashy cards that reject users and trigger unnecessary hard credit checks.
  • Treating recent uncompleted clicks as hard negatives (label = 0), which severely under-predicts slow-converting products like personal loans and starves newly launched offers.
  • Training pComplete | click only on clicked impressions and serving it on all candidates (sample selection bias), without supervising the joint product pCTR * pComplete|click across the full impression space.
  • Downsampling non-clicked impressions without importance weights or prior correction, which inflates predicted probabilities by 10x and breaks expected-value multiplication.
  • Using random train/test splits instead of chronological splits, leaking future user credit-score changes and macroeconomic rate shifts into training.
  • Stopping an online A/B test on day 14 without waiting for conversion maturity, missing the 7-day completion tail (and 30-day approval tail) from the final week of exposed users.
  • Sharing partner daily budgets across Control and Treatment arms, allowing one variant to exhaust an issuer's daily cap and artificially depress the other variant.
  • Failing open to unfiltered catalog offers during an outage, which could show state-ineligible or compliance-blocked financial products.

Follow-up questions

  • How can you prevent the recommender from surfacing credit offers where the user faces a high probability of lender rejection? Use defense in depth across three layers: first, deterministic Stage 0 eligibility rules drop any offer whose published minimum credit band or income requirement the user misses, or from an issuer that declined the user in the past 90 days. Second, a calibrated pApprove(user, offer) model—trained on historical lending decisions plus soft-pull pre-qualifications (credit checks that estimate eligibility without hurting the user's score, reducing bias from seeing only voluntary applicants)—enforces a hard minimum floor (such as pApprove >= 0.20) and multiplies directly into the ranking score so low-odds offers drop down the page. Third, track the realized rejection rate as a strict A/B guardrail and display transparent approval-odds bands ("Good", "Fair") in the UI so users apply with realistic expectations.
  • How would you introduce exploration for newly launched or low-exposure offers while protecting user experience? Restrict exploration strictly to the safe candidate set—offers that already pass Stage 0 eligibility rules and the pApprove safety floor—so you never gamble with a user's credit score. Reserve one lower position (such as slot 5) on 10% of requests (only 2% of total impressions) and select among under-explored offers using Thompson sampling (a bandit strategy that draws a random score from each offer's probability distribution so uncertain offers get tested naturally and poor ones fade out quickly), warm-started with a Beta prior centered on similar offers in that user's credit band and rewarded by fast click and application_start signals. Log the exact selection probability (propensity) on every explored slot so you can run inverse-propensity weighting (re-weighting logged random picks to estimate how an alternative exploration policy would perform offline) and cap any user-experience cost.
  • Which production metrics would you monitor to catch data and concept drift during rapid shifts in interest rates or lending standards? Monitor three layers continuously: (1) Input drift via daily Population Stability Index (PSI) (a divergence score comparing live feature distributions against training baselines, alerting above 0.2) on credit utilization, recent inquiries, stated income, and offer APRs; (2) Prediction and calibration drift by comparing mean predicted probabilities against observed rates—hourly for clicks, daily against delay-adjusted expectations p * F(elapsed) for completions, and weekly per issuer and credit band for approvals; and (3) Business and data-pipeline guardrails including per-issuer postback volume, rejection rates, and dismissals. When one bank's approval calibration suddenly drops while user credit features stay stable, that signals concept drift (the bank tightened underwriting rules rather than users changing), automatically raising the pApprove floor for that issuer and triggering a fast approval-model retrain.

Follow-up questions

Similar questions

More Creditkarma interview questions

All 2 Creditkarma questions →