AI EngineeringInterview preparation
Intermediate·Concept·2 min read

Workflows

Practice this question

Beginner — Deterministic versus agentic workflow?

  • Deterministic transitions follow defined code and recorded outcomes.
  • Agentic transitions delegate some next-step choices to a model.
  • I use AI for language uncertainty and deterministic control for business invariants.

Intermediate — Why is idempotency important?

  • Retries can happen after a successful effect but before the response arrives.
  • A scoped operation key and payload hash let the service return the same receipt instead of creating another claim or sending another email.

Senior — Temporal or BullMQ?

  • I use a queue for isolated background jobs and a durable workflow platform for long-lived coordination, timers, and human events when justified.
  • BullMQ still needs explicit business lifecycle records; Temporal still needs idempotent activities and deterministic workflow logic.

Scenario — Submission timed out. Should you retry?

  • First classify the outcome as potentially unknown.
  • Query or reconcile the external receipt by operation key, then retry only under a documented idempotency contract.
  • Reporting failure immediately could encourage duplicate customer submissions.
Adapted from 13_AI.MD · “29.11 Workflows”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.