Original practice scenario: A hypothetical online game processes achievement events and awards a reward. Servers retry after a timeout, and old events can be replayed after recovery. Design a safe handler.
Read model answer +
Bind the award to a unique achievement occurrence and commit its outcome with the player-state change. Delivery retries must not create new economic events inside the game.
Work through it
Define event identity, player identity and achievement version, validating the server-authorized event rather than trusting a client-supplied reward amount.
Within the player-state boundary, record the processed occurrence and apply the reward atomically; return the previous result for an identical retry.
Handle out-of-order prerequisites and replay from checkpoints, preserving a correction path for an invalid event already processed.
Tradeoffs to discuss
Serializing updates per player simplifies consistency but creates hot-player limits; sharding requires careful coordination for rewards spanning shared teams or inventories.
Common pitfalls
A timestamp or achievement name alone may not identify a repeatable occurrence.
Test a failure after reward commitment but before acknowledgment, and reject conflicting payloads under the same event identity.
Original practice scenario: A hypothetical communications product needs to route potentially harmful text in several languages for review. How would you evaluate a model without assuming translated test data is representative?
Read model answer +
Define the review decision and language-specific error costs with suitable reviewers. Translation can preserve literal words while losing slang, code switching and the social context needed for classification.
Work through it
Assemble appropriately sourced examples across languages, dialects and mixed-language cases, retaining independent labels and disagreement rather than forcing uncertain cases into certainty.
Compare the model with simple baselines using per-language precision and recall at the actual review budget, separating unsupported languages.
Test drift, adversarial spelling and ambiguous quotations, then provide reviewer escalation and appeal or correction mechanisms appropriate to the hypothetical product.
Tradeoffs to discuss
A shared multilingual model simplifies maintenance but may perform unevenly; specialized models need more data and ongoing evaluation.
Common pitfalls
Do not report only a micro-average dominated by the largest language population.
A routing score is not proof of harmful intent or authority for an irreversible enforcement action.