Interview prompt
Problem context
Skills being evaluated
Use the sequence below to surface constraints, choose boundaries, test failure behavior, and defend trade-offs. Concrete numbers are interview assumptions, not claims about a real production system.
Clarify the decision
- Define whether the field is a cache, evidence, or authoritative decision, and what freshness and false-positive rates are acceptable. Ask how algorithm versions are approved, explained, and rolled back.
Establish scale assumptions
- Assume billions of entities, a multi-week scan, high update churn, and limited source read budget. Partition by stable entity key and calculate whether recomputation can outrun live mutation for every cohort.
Functional and non-functional requirements
- Never present an unversioned value, avoid overwriting a result computed from newer source state, default safely when absent, and preserve the evidence used for each consequential decision.
High-level architecture
- Write a versioned derivation record containing algorithm version, source version or watermark, computed time, confidence, and reason codes. Live change processing and batch backfill use the same deterministic computation service; a policy layer decides which versions may gate traffic.
Data model and flow
- The backfill reads a source snapshot or version, computes, then conditionally writes only if the entity has not advanced beyond its input. Conflicts requeue from the latest source; live events continuously close the freshness gap.
Consistency and transaction boundaries
- The derived value is valid only relative to a source version and algorithm version. The transaction path reads the value plus policy version and chooses allow, deny, or conservative review; it never treats missing as an accidental default.
Failure modes and recovery
- Checkpoint ranges, bound retries, quarantine deterministic failures, and monitor cohorts that cannot converge. A kill switch changes policy to the prior approved algorithm or review mode without deleting evidence.
Security and privacy
- Restrict source features and derived explanations, prevent sensitive feature leakage in logs, and audit which version influenced each decision. Deletion must remove both derived values and retained feature evidence according to policy.
Observability and SLOs
- Track coverage by tenant and cohort, source-version lag, conditional-write conflicts, computation failures, decision deltas between versions, and business harm metrics. Shadow the new version on live traffic before enforcement.
Capacity and cost
- Use incremental feature reads, priority cohorts, and shared batch/stream compute to avoid two inconsistent implementations. Retain full evidence only for regulated decisions; aggregate lower-risk diagnostics.
Alternatives and trade-offs
- Freezing source records would simplify proof but is impossible. Unconditional last-write-wins is cheap but can publish stale computation; source-version conditional writes create retries yet preserve truth.
Evolution and migration
- Deploy schema and readers first, then live derivation in shadow, then historical backfill, and only after coverage and quality gates enable enforcement by cohort. Keep old algorithm outputs through a defined rollback and appeal window.
What Staff and Principal candidates should emphasize
- Distinguished candidates connect data protocol to policy, explainability, and business harm. They unify batch and streaming logic, version every input and decision, and design gradual enforcement rather than a binary launch.
Decision trade-offs
Write rule
Option A
Last completed computation wins
Option B
Conditional write against source version
Recommendation:Use source-version conditions because completion time does not imply fresh input; requeue conflicts from current state.
Computation paths
Option A
Separate optimized batch and streaming implementations
Option B
One versioned deterministic computation contract
Recommendation:Share the contract and core implementation; optimize wrappers only after parity tests prove identical semantics.
Follow-up interview questions
- 01What should the transaction path do when no derived value exists?
- 02How do you prove batch and streaming computations are semantically identical?
- 03How would you appeal and reconstruct a decision made six months ago?
- 04When may the previous algorithm’s outputs be deleted?
Common weak answers and mistakes
- 01Storing a derived value without source and algorithm versions.
- 02Letting a slow backfill overwrite a newer live computation.
- 03Using different logic in batch and stream without equivalence tests.
- 04Turning on enforcement globally as soon as nominal coverage reaches one hundred percent.
Interviewer evaluation rubric
Runs a bulk update and adds a consumer but cannot prevent stale overwrite or explain mixed algorithm versions.
Versions outputs, shares computation logic, checkpoints backfill, and uses coverage gates and shadow decisions.
Adds source-version conditional writes, explicit missing policy, evidence retention, harm metrics, and cohort rollback.
Integrates derivation correctness with governance, appeals, privacy, and a long-lived algorithm evolution model across many teams.