Original practice scenario: A hypothetical payment-processing service receives numbered clearing files from a partner. Files can be retransmitted, arrive out of order or contain malformed records. Design acceptance and reconciliation.
Read model answer +
Separate transport receipt, file validation and business acceptance. A successful upload must not imply that every clearing record was accepted or that an expected file actually arrived.
Work through it
Identify the partner, business date, file sequence and content fingerprint; distinguish identical retries from conflicting content under the same identity.
Validate the complete envelope and declared record controls, staging records before an atomic acceptance decision or an explicit record-level exception policy.
Track expected versus received file sequences and reconcile accepted counts and amounts, returning durable receipts that support replay and operator investigation.
Tradeoffs to discuss
File-level atomicity simplifies reconciliation but rejects valid records alongside a defect; partial acceptance requires detailed receipts and careful retry semantics.
Common pitfalls
A missing sequence is different from an empty valid file.
Never repair control totals by dropping unmatched records or assuming retransmitted content is necessarily identical.
Original practice scenario: A hypothetical risk model uses relationships between merchants, accounts and devices. How can a random transaction split overstate performance, and what evaluation would be more credible?
Read model answer +
Graph relationships can transmit information across a split even when transaction rows differ. Evaluation should reproduce the graph and labels available at prediction time.
Work through it
Define the prediction event and build graph features from an explicit historical cutoff, excluding later transactions, investigations and entity resolutions.
Use chronological evaluation and additional tests for new merchants or devices, ensuring that label-derived embeddings or aggregate statistics are fitted only on training evidence.
Compare with non-graph baselines and report performance by familiar versus unseen entities, alongside false-alert workload and stability as the graph changes.
Tradeoffs to discuss
Entity-held-out tests are demanding and reveal generalization limits, while chronological tests better represent continued operation among existing participants.
Common pitfalls
Do not compute one full-period graph and merely hide evaluation labels afterward.
Shared devices or merchant relationships may be legitimate; connectivity alone should not be presented as proof of wrongdoing.