A real-time fraud detection system uses Claude to analyze transaction patterns. The system must evaluate each transaction within 800ms end-to-end (including network round-trips). Input context per transaction is approximately 3,000 tokens including 30-day transaction history. The fraud team wants Claude to explain its reasoning for every flagged transaction. Current architecture uses Claude 3 Sonnet and achieves 1,400ms P95. Which architectural change most directly addresses the latency requirement without sacrificing explainability?
Select an answer to reveal the explanation.
Short Explanation
Here's the deal — you need to switch to Claude 3 Haiku and stream the result. Haiku cuts time-to-first-token and generation speed, while streaming lets you act on the fraud flag as soon as it appears and show the reasoning as it arrives.
Full Explanation
The option that switches to Claude 3 Haiku and implements streaming with partial-result rendering is architecturally superior because it addresses both requirements simultaneously. Switching to Haiku dramatically reduces time-to-first-token and generation speed for 3,000-token inputs — helping meet the 800ms requirement. Critically, streaming with partial-result rendering means the fraud flag decision, represented by the first substantive output token, can be emitted and acted on immediately while the explanation continues streaming to the analyst interface — preserving explainability without blocking on full response completion. The Haiku-only option switches to Haiku but ignores that the 800ms requirement includes full response generation for the explanation — streaming is the key architectural insight for decoupling the decision gate from explanation delivery. The 7-day history option reduces context window, potentially harming fraud detection accuracy by losing older pattern signals — a capability tradeoff that should be tested carefully, and the latency saving may be insufficient. The prompt-caching option helps with repeated system prompts but transaction data is unique per call — cache hit rates on the variable transaction history will be low, providing marginal latency improvement.