Skip to content
Forward Deployed

Forward Deployed

Logistics Exception Handling

Design an assistant that detects shipment exceptions, drafts resolutions and lets only a narrow, audited set run automatically, with customs always going to a human.

Kind
Case study
Level
Core
View
Interview prep
Sections
4
By
Sourav Banerjee
Last updated
20 Nov 2026

Read the classic design: Logistics Exceptions: Designing Around a Policy Gate

Report an issue

Interview view. The case brief, design walkthrough, technical deep dives and quick review, condensed into bullets, tables and lines to say out loud, with interactive diagrams to step through.

Want to go deep? The full casebook has the complete reasoning in prose, the original diagrams, practice questions with worked answers and the sources.

Case brief

The case in one line: an assistant that spots stalled shipments and drafts a fix, where the agent proposes, a separate gate decides and customs never reaches the automatic path.

30-Second Cheat Sheet

  • The customer: a logistics operator shipping across the US, the EU and APAC through many carriers.
  • An exception: a shipment that should have moved and did not (customs hold, missed scan, weather delay).
  • Today: about 150 ops agents decide what to tell the customer or the carrier.
  • The assistant: watches feeds, spots exceptions, proposes a resolution. A narrow set of low-risk cases auto-resolves; everything else is a draft an ops agent approves, edits or rejects.
  • Rule 1: customs and regulatory holds always go to a human, whatever the model thinks.
  • Rule 2: no automated carrier action runs twice or runs without an audit row.
  • Rule 3 (the customer's): EU shipment data stays in the EU.
  • The pattern: the agent proposes and the gate decides.

1. A shipment that should have moved and did not

The problem

  • A logistics operator ships goods across the US, the EU and APAC through many carriers.
  • Some shipments stall:
    • A customs hold stops a parcel at a border.
    • A carrier misses a scan, so nobody knows where the parcel is.
    • A storm delays a whole route.
  • Each stall is an exception: a shipment that should have moved and did not.
  • Someone in operations then decides what to tell the customer or the carrier. About 150 ops agents do that work today.

What the operator wants

  • An assistant that watches the shipment feeds, spots exceptions and proposes a resolution:
    • The next expected scan.
    • A message for the customer.
    • A carrier call, such as a rebooking.
  • A narrow set of low-risk cases may resolve automatically.
  • Everything else becomes a draft that an ops agent approves, edits or rejects.

The rules that dominate the design

  • Users are few and the stakes are high.
  • Customs and regulatory holds always go to a human, whatever the model thinks.
  • No automated carrier action may run twice or run without an audit row. A duplicated rebooking or refund is real money and a real mess.
  • EU shipment data must stay in the EU. This third rule comes from the customer.

The core idea (the source's figure, as a flow)

carrier feeds → exception detection → agent drafts a resolution → gate → (run once + audit row) or (ops agent queue)

  • Carrier feeds produce events.
  • Detection decides which events are exceptions.
  • The agent drafts a resolution for each exception.
  • The gate is a separate, deterministic component. It answers one question: may this draft run automatically?
    • Yes → the action runs exactly once and is recorded.
    • No → the draft goes to a human.

Terms that recur

Term Meaning
Exception A shipment that should have moved and did not
Webhook A carrier pushing an event to us the moment it happens
Batch drop A carrier leaving a CSV or EDI file on a schedule
EDI Electronic data interchange: the long-standing structured format for trade documents
Idempotency key An identifier on an action, so repeating the request returns the first result instead of doing the work twice
Circuit breaker Stops calling a dependency that keeps failing and sends the work elsewhere, here to a human
Policy gate The deterministic component that decides auto-run versus human

2. Follow a missed scan in Frankfurt

The source traces one exception end to end: a parcel due to be scanned at a Frankfurt hub, and the scan never arrived.

  1. Normalise. The carrier's webhook, or the next line of its batch file, becomes one normalised event.
  2. Detect. Detection recognises a missed scan and pulls the shipment's value, its route and any freeze rules that apply.
  3. Gate. The policy gate looks at the case.
    • A weather delay with a known playbook might auto-message the customer.
    • A customs hold always queues a human.
  4. Draft. The ops agent sees a draft (next expected scan, customer text, proposed carrier call) instead of discovering that the system silently wrote to a carrier.
  5. Execute once. If the gate allows auto-resolution, the action runs once through an execution gateway and writes an audit row.
  6. Later variants add SAP and weather signals. The gate does not get looser when they arrive.
  • The whole path: feed → detect → policy → draft or narrow auto-action → audit.
  • The design kept out: "just ping the carrier for every blip." That puts a model and a carrier call behind every routine event: expensive and dangerous.

The trace with numbers

Caveat: these numbers are illustrative, not from the source.

  1. The Frankfurt parcel is worth $320. The route is one the carrier has rebooked many times.
  2. The agent proposes "rebook on the next linehaul and tell the customer the new date", with confidence above the agreed threshold.
  3. Customs first. Detection typed this case as a missed scan, so it is provisionally non-customs.
    • Before auto-action, confirm current carrier/customs status from authoritative fields. A detector label alone can be wrong.
    • Unknown, conflicting or stale status → human.
  4. Value and confidence. $320 is under $500 and confidence meets the threshold.
  5. Execute. The rebooking runs once with an idempotency key.
  6. Audit. The log records the verdict, the draft and the result.
  7. Change one fact: detection types the case as a customs hold. The same confident draft goes to an ops agent. Nothing the agent says can change that.

3. What you need to design

The task

  • Design the exception-handling assistant for one mid-size logistics customer.
  • Explain it end to end at interview depth, starting from its dangerous constraint.
  • Then hold up under follow-ups on:
    • Event ingestion and sizing
    • The policy gate
    • Idempotent execution
    • Regional data residency
    • Evaluation and rollout

Who it's for

  • Engineers preparing for Forward Deployed, solutions or applied-AI engineering interviews.
  • Especially a round asking for an event-driven agent that takes real actions under a policy gate.

What it assumes you know

  • Event streaming and batch ingestion
  • LLM agents with tool calls
  • Idempotent writes to external systems

LLM = large language model: reads and writes text. Powerful, but it will confidently make things up if you let it.

Variant What changes
Shipment rerouting over SAP data, real-time weather APIs and 500 regional warehouse managers SAP becomes both a source and a target. Weather adds a predictive signal. The approval surface widens. The gate does not get looser.
  • The walkthrough builds the anchor design first. The rerouting variant has its own deep dive.
  • Practice drills (follow-ups, the cost pivot, the hour plan) live in the full casebook.

Quick Recall: Lines to Say in the Interview

  • "The agent proposes and the gate decides."
  • "Customs and regulatory holds always go to a human, whatever the model thinks."
  • "No carrier action runs twice, and none runs without an audit row."
  • "EU data stays in the EU, because the customer requires it."
  • "A detector label alone can be wrong, so confirm customs status from authoritative fields."
  • "Pinging the carrier for every blip is expensive and dangerous."
  • "SAP and weather arrive later, and the gate does not get looser."

Design walkthrough

The goal: two ingestion paths feeding one exception pipeline, with an independent customs-first policy gate in front of every carrier action, regional data planes and an evaluation plan you raise unprompted.

30-Second Cheat Sheet

  • Ask four questions first: feed freshness and rate, who approves, the auto-versus-human boundary, regional topology. Each answer moves a box.
  • Requirements must be able to fail a test: "zero customs holds auto-resolved, ever" is a constraint, not a preference.
  • Size by event throughput, not users: ~200 events/s peak, upper bound ~17.3M events/day, against 4,500–7,500 human cases/day.
  • Model behind detection: cost and latency scale with disruptions, not scans.
  • Streaming and batch converge after ingestion. Batch lateness is surfaced, never averaged away.
  • Customs first in a separate gate, then under $500 and confidence meets threshold. Any missing field → human.
  • Shared control plane, regional data planes: EU data never leaves the EU, enforced in storage and application.
  • Idempotency key + circuit breaker + audit before action, then evaluation: offline replay → shadow → staged auto-resolve.

Spoken answer (source's short requirements line): "Functionally, ingest feeds, detect, draft, then a policy gate, customs always human. Non-functionally, no double actions, EU stays in EU, and we don't call the model on every webhook."


1. Ask the four questions that decide the design

The format

  • The source runs this as an FDE round, in interview order. Clarifying questions come first.
  • Record each answer and say out loud what it changes.
  • The questions shape the design. The interviewer scores whether you adapt to them.

FDE = Forward Deployed Engineer: sits with the customer, finds the real problem and ships a working system in their environment.

The prompt

  • The FDE is embedded with a mid-size logistics customer.
  • The customer wants an AI exception-handling assistant that watches the shipment pipeline and detects customs holds, missed carrier scans and weather delays.
  • It either auto-resolves them or drafts a resolution for a human ops agent to approve.
  • It works across multiple carriers and a mix of real-time and batch feeds.

Five questions worth asking

Ask Design consequence
How fresh is each carrier feed and at what peak rate? Webhook and batch ingestion need different adapters and latency promises
Who acts on a draft, and how many cases arrive per shift? Sizes the human queue and its SLA
Which cases may auto-resolve, and which are always human? Defines the policy gate before any carrier write
What are the shipment-value and confidence rules? Sets the narrow auto path and the calibration work
Which regions may store or access shipment data? Determines regional data planes and application access

SLA = service level agreement: the promise to the customer, usually with penalties. Looser than the SLO.

The four answers from the mock session

Asked Answer Implication
Data volume and freshness per carrier? Mixed. About 60% of carriers push real-time webhooks (scan events, status changes), about 200 events/s combined at peak. About 40%, mostly smaller regional carriers, send batch file drops (CSV/EDI) every 2–6 hours, a few thousand records each. Ingestion needs a streaming path and a scheduled batch path feeding the same pipeline, not one uniform interface.
Who are the users, and what scale? Internal only: the customer's ops team. About 150 agents across three shifts, about 40 concurrent at peak during shift handoff, each handling 30–50 cases a day. Low DAU, high stakes per interaction. Scale pressure comes from event throughput, not concurrent users: a very different profile from a consumer assistant.
Auto-resolve vs human-approval boundary? Value- and confidence-based. Under $500 with high confidence auto-resolves. Customs and regulatory holds always go to a human, regardless of confidence. Over $500, or below the confidence threshold, always goes to a human. The core risk-boundary decision. A policy layer in front of every auto-resolution, with customs as a distinct always-gated path, separate from the low-confidence case.
Regional or multi-tenant topology? One customer, one assistant experience, across US, EU and APAC with different carriers per region. EU data stays in the EU. That is their requirement; GDPR itself allows transfers with safeguards. Rules out a single global deployment or data store. Regional data isolation behind one coherent experience.

DAU = daily active users.

Each answer moved a box

  • Mixed feeds → ingestion split into two paths.

  • Low DAU → sizing moved from users to event throughput.

  • Auto-versus-human rule → the policy gate with its own customs path.

  • EU residency → regional data planes.

  • That visible adaptation is what the round scores.

  • The source's example auto-resolvable case: rebooking a missed scan on a known route. It becomes the first cohort the rollout enables.

Place it beside its sibling

Case Shared foundation What changes
Logistics exception assistant (anchor) Two feed types, one detection path, resolution draft, independent policy gate 150 ops agents; value/confidence boundary; EU residency
Shipment rerouting over SAP and weather Same event normalisation, gate, action and audit pattern SAP becomes source and target, weather adds a predictive signal, 500 regional managers expand the approval surface

Where the mock session ended

  • The architecture prompt that step 4 answers: "Walk me through your high-level architecture. What are the major components, and how does an event, say a missed carrier scan, flow through the system from ingestion to either auto-resolution or a human agent's queue?"
  • Practise picking up from there.

2. State requirements as testable constraints

  • Functional = what the system does. Non-functional = how well, and under which constraints.
  • A requirement that cannot fail a test is a preference.
    • "Reliable" is a preference.
    • "Zero customs holds auto-resolved, ever" is a constraint. It is the one that shapes the architecture.

What the system must do (in order)

  1. Ingest webhooks and CSV/EDI drops.
  2. Normalise and deduplicate them.
  3. Detect disruptions.
  4. For each exception, propose a resolution with its signals and a confidence.
  5. Enforce the customs-first, value and confidence policy.
  6. Auto-execute only eligible actions, idempotently.
  7. Let agents approve, edit or reject everything else.
  8. Audit every verdict and every action.
  • A new carrier is an adapter, not a rewrite of the core.

Functional requirements with acceptance tests

Priority Functional requirement Accepted when
Must Ingest shipment events, real-time and batch Both paths write the same normalised schema; a batch diff emits only changed shipments
Must Detect customs holds, missed scans, weather delays Recall per exception type on a labelled replay set (step 10)
Must Classify each exception by type, value and confidence Every exception at the gate carries all three; a missing field routes to a human
Must Auto-resolve low-risk, low-value, high-confidence cases Only under $500, only when confidence meets the threshold, never customs
Must Draft a resolution for everything else and route it to an ops agent The draft shows the action, the signals and the confidence
Must Let an ops agent approve, edit or reject a draft Each choice logged with the agent's identity and the original draft
Must Full audit trail of every decision, automated or human Any resolution reconstructable from the audit log alone
Should Extend to new carriers without redeploying the core A new carrier is an adapter plus config, no pipeline release

Non-functional requirements (the short interview version)

Requirement Example target / constraint
Safety Zero customs holds auto-resolved; missing type, value or confidence → human
Residency EU data stays in the EU (the customer's rule; GDPR itself allows transfers with safeguards)
Reliability No silently lost exception or double action
Freshness Separate metrics for real-time and batch feeds
Latency / cost Low time-to-draft; cost per resolved exception
Security Least-privilege carrier credentials
Load (illustrative) ~60% of carriers on webhooks, ~200 events/s combined peak; 40% send files every 2–6 h. ~150 agents, ~40 concurrent, 30–50 cases a day each. Upper bound ~17.3M events/day against ~4,500–7,500 human cases/day. Detect cheaply on all events; call the model only on exceptions.

GDPR = General Data Protection Regulation: the EU's data-privacy law, including where data may live.

Quality requirements in testable form

Quality Source requirement Testable form
Residency EU data never leaves the EU A cross-region query from a US session is refused; replication config has no EU→non-EU path
Reliability A missed exception is a real shipment sitting stuck Detection recall per type tracked daily; zero dropped events on the queue
Latency Low latency from detection to draft Time-to-draft p95 tracked separately for real-time and batch carriers
Auditability Every auto-resolution and human decision traceable 100% of gate verdicts and agent actions in the immutable log
Cost Cost-efficient at a modest, bounded scale (150 agents, not millions of consumers) Cost per resolved exception, with the model called only on detected exceptions
Extensibility New carriers without a core redeploy Adapter contract test passes before a carrier goes live

The customs rule dominates

  • The gate holds it as an invariant for every input, including a model that is wrong and confident.
  • Nobody tunes it the way they tune a threshold.

3. Size by event throughput, not by users

  • Event throughput and correctness constrain this system, not user count.
  • 40 concurrent agents suggest modest interface concurrency, but do not establish one server's capacity or availability requirements.
  • 200 events a second, bursting during a regional storm, is the real sizing problem.
  • Say this aloud: it decides where the model sits.
Quantity Figure Consequence
Real-time events at peak ~200 events/s Stream and detection must absorb bursts; a queue sits in front
Upper bound per day at the peak rate 200 × 86,400 ≈ 17.3M events Far too many for an LLM; detection must be cheap
Human-handled cases per day 150 agents × 30–50 ≈ 4,500–7,500 Human capacity is thousands/day; total exception and draft volume still needs measurement
Concurrent approvers at peak ~40, during shift handoff The approval queue, not the model, is the human bottleneck
Batch drops Every 2–6 hours, a few thousand records each Batch exceptions surface hours late by design

The gap is the design

  • 17.3M is an upper bound: it assumes the peak holds for a full 24 hours, which it will not.
  • Even so, the gap to human cases is three orders of magnitude.
  • Most events are routine scans that only need to update shipment state.

Where the model sits

Placement Cost and latency scale with
Model on the event stream Every scan
Model behind detection Disruptions only
  • So detection is a rules-and-classifier layer on the stream.
  • The resolution model runs only on the small fraction of events that are exceptions.
  • The throughput deep dive works through the rest of the arithmetic.

4. Draw the architecture end to end

  • Two ingestion paths, one exception pipeline, and a policy gate before anything acts. The diagram should say that before you explain any box.
  • The agent drafts an action and a confidence. A separate deterministic policy gate decides whether it may run.
  • Shared, versioned logic deploys into US, EU and APAC regional data planes. EU records and audit data never replicate out of the EU.

The source's diagrams, in words

  • End-to-end view: carriers (60% real-time, 40% batch) → webhook ingestion and scheduled EDI/CSV batch ingestion → one normalised event stream → detection (customs hold, missed scan, weather delay) → resolution agent (action + confidence) → policy gate → permitted auto-resolution or human queue (approve, edit, reject) → carrier or ops systems, with every decision audited.
  • Trust-boundary view: batch rows are diffed against last state with late detection tagged. The gate has three outcomes:
    • Customs, regulatory or unknown → human queue.
    • Other cases outside threshold → human queue.
    • Under $500 and confidence meets threshold → execution with scoped carrier permission and an idempotency key.
    • Two of the three outcomes reach a regional operator. All paths reach an immutable regional audit.
  • Planes view: one shared, versioned control plane deployed over three regional data planes.
  • Mermaid and regional views: the customs check sits before the value-and-confidence check, an open carrier circuit returns work to the human queue, and every branch writes to the regional audit log.

Two planes

Plane Holds Copies
Control plane The logic: prompts, tools, routing, policy, UI Shared, versioned identically everywhere
Data plane Shipment data and its audit trail One per region

Three rules that go with the picture

  • Version the same prompts, tools, routing, customs rule, $500 threshold, confidence threshold, UI, carrier adapters, evaluation gates and releases in each region.
  • Nothing executes before policy. Circuit breakers protect carrier calls.
  • Keep regional: event stores, audit verdicts, actions, confidence and decision summaries. EU data never leaves the EU.

The twelve components, in the order an event meets them

Fails how: fails closed (stops and refuses), degrades (keeps working with less) or alerts. This column matters most in follow-ups.

# Component Responsibility Fails how
01 Webhook ingest Validates, deduplicates, pushes real-time events onto the stream immediately Closed on a bad payload; events buffer at the carrier's retry
02 Batch file ingest Picks up EDI/CSV drops on schedule, parses, diffs against last known state per shipment Degrades: a late drop is flagged, not silently skipped
03 Event normalisation and stream One schema for both paths, queue-backed Degrades to backlog; alert on depth
04 Disruption detection Classifies into customs hold, missed scan, weather delay Degrades: an unclassifiable event routes to a human
05 Resolution Agent Drafts an action with confidence and reasons; never executes Degrades: no draft, case goes to the queue bare
06 Policy Gate Customs first, then value and confidence; the auto-versus-human verdict Closed: any missing field or error means human
07 Auto-resolve executor Executes with an idempotency key behind a circuit breaker Degrades to the human queue when the carrier API is flaky
08 Human approval queue Ops agents approve, edit or reject drafts Alerts on depth during shift handoff
09 Carrier / ops systems Systems of record that move the shipment Outside the design; guarded by least-privilege scopes
10 Audit log Every verdict and action, with confidence and reasoning Closed: an action that cannot be logged does not run
11 Shared control plane Logic, routing, policy definitions, UI, versioned identically per region A bad release rolls back everywhere at once
12 Regional data plane Event store, any vector store, audit log; never replicates across regions Closed at the region boundary

Walk a missed scan through it in seven steps

  1. Ingest. Webhooks are validated and deduplicated. Files are parsed and diffed, so only shipment-state differences are emitted. Both become one regional event schema, with batch detection lag kept visible.
  2. Queue and detect. The queue absorbs storms. Rules or a small classifier find customs, missed-scan and weather exceptions. Routine scans only update state.
  3. Draft. The resolution agent returns an action draft, a confidence and its signals. It cannot call carrier write APIs directly.
  4. Customs first. The independent gate checks customs and regulatory status, using detection's type, not the agent's label. Customs or unknown → human.
  5. Value and confidence. For a non-customs case, only under $500 with confidence meeting the agreed threshold may auto-resolve. All others enter the regional approval queue.
  6. Execute. Scoped carrier credentials, an idempotency key and a circuit breaker. A flaky or non-idempotent carrier falls back to human handling.
  7. Audit. Every verdict, draft, approval, edit, rejection and execution is logged in the regional audit store. EU data and access stay in the EU.

Point at three things while the diagram is up

  • The gate is its own box, not a check inside the agent (step 6 explains).
  • Both ingestion paths converge after ingestion, not before (step 5).
  • The region boundary cuts through storage, not logic (step 7).

5. Converge streaming and batch after ingestion

  • About 40% of carriers only send files.
  • Forcing them onto a fake real-time interface buys nothing: polling a drop every few seconds makes the infrastructure more complex, not the data fresher.
  • A poll cannot make a carrier report sooner than it reports.

The two paths

Path What it does
Webhook ingest Validates and deduplicates each event, pushes it onto the stream immediately. Detection must be low-latency here.
Batch ingest Picks up the drop on its schedule, every 2–6 hours, parses it and diffs against the last known state of each shipment, so only changes enter the stream.
Both Write the same normalised event schema

What the shared schema still needs

  • Provenance, event time, ingest time, carrier sequence/version and feed freshness.
  • Reject duplicate IDs.
  • Prevent an older batch row from overwriting a newer webhook state.
  • Resolve conflicting statuses through carrier-specific authority rules, not arrival order.

The diff, with numbers (illustrative)

  • A batch file has three thousand rows: 2,950 shipments unchanged since the last drop.
  • Without the diff: detection sees 3,000 events and might re-flag yesterday's exceptions.
  • With it: detection sees 50 changed shipments.

The failure the diff cannot find

  • A shipment that stays unchanged past its expected next scan.
  • Fix: persist its expected-scan deadline and schedule a keyed timer or a periodic due-state sweep.
  • At the deadline, check late-event allowance and feed health.
  • A stale batch feed means "cannot establish movement", not proof the parcel is physically stuck.
  • An unchanged row or no webhook must not remove the deadline check.

Surface the lateness

  • A missed scan on a batch carrier is detected late by design. Surface it to agents, because it changes how urgently they should act.
  • Tag every batch-sourced exception with its detection lag, and show it on the draft.
  • Keep separate time-to-detect p50 and p95 for webhook and batch feeds.
  • An average would blend a seconds-scale clock with an hours-scale one and describe neither.

p95 = the time within which 95% of exceptions are detected. p50 = the median.

  • Same idea elsewhere: channel adapters in the Agent Platform for Non-Technical Users case. Here the channels are carrier feeds, and a new carrier is a new adapter, not a change to detection.

6. Put customs first in the policy gate

  • The gate is its own component, not a side-check inside the Resolution Agent.
  • The customer said customs must never be bypassed, so the gate must be testable and auditable on its own.

The source's gate, as a flow

proposal (action, confidence, value, exception type) → customs or regulatory exception? → yes: always human approval / no: value under $500 and confidence meets threshold? → yes: automatic resolution / no: human approval

  • The exception type comes from the detection service, not the agent's output.
  • A missing or unknown type goes to the Human Approval Queue exactly like a customs hold.

Why the order matters

  • The customs check runs first and short-circuits everything else.
  • A confidence score cannot outvote a rule it is never compared with.
  • This mirrors the customer's framing: customs is a hard compliance boundary and never competes with a confidence score.

Trace the wrong order

  1. A candidate checks confidence first and treats customs as one more reason for low confidence.
  2. A customs hold arrives where the model is 0.99 confident in a rebooking (illustrative value).
  3. The case passes the confidence check. Only a later rule might catch it.
  4. In principle a high-confidence model could auto-resolve a customs hold: the one outcome the customer ruled out.
  5. With customs first, the same case never reaches a confidence comparison.
  • Same structure as deny-rules-first in the Tool-Using Agent with Safety Controls tool gateway, with the same short-circuit logic.

Soundbite: "Customs is an invariant checked first, so no confidence score is ever compared with it."

Three details make the gate trustworthy

  • Detection is independent of the drafting model, but not infallible.
    • Require current carrier/regulatory evidence for a non-customs verdict.
    • Test misclassified customs cases, not only correctly labelled cases with forced high confidence.
  • The $500 rule needs an explicit currency and valuation basis.
    • Exactly $500, an unknown currency or a missing approved conversion → human review.
    • A bare numeric comparison cannot authorise a multi-region shipment.
  • The remaining details:
    • Take the type from detection, not the agent. An agent that mislabels a customs hold as a weather delay must not talk its way past the gate.
    • Fail closed on any missing field. No value, no type, no confidence or a missing policy version → human.
    • Version the policy definitions in the control plane. A threshold change is a release with an audit entry, not a config edit, and the policy version travels with every decision.

7. Share the logic, isolate the data by region

  • The customer requires EU data to stay in the EU, so a single global deployment is out.
  • It is the customer's rule, stricter than GDPR, which allows transfers out of the EU with safeguards.
  • Say so: it tells the interviewer you know where the constraint comes from and who could relax it.

The pattern: shared logic, isolated data

Half Holds Rule
Shared control plane Agent logic, model routing, policy definitions, UI Deployed identically in each region
Regional data plane Event store, any vector store, audit log Never replicates across regions
  • Figure, in words: shared versioned logic, policy and UI → US data and audit; EU data and audit (never leaves the EU); APAC data and audit.
  • An ops agent in any region sees the same UI and the same policy.
  • Partitioned by region: execution, storage, model calls, telemetry and support access.
  • Name the pattern instead of only drawing three boxes. It is the tenancy ladder from the Secure Multi-Tenant AI Platform case, applied at the region level instead of the customer level.

Mirror residency in the application layer

  • By default an EU session cannot query US shipment data, and a US session cannot query EU data.
  • Storage isolation alone leaves the application free to join across regions: a service with credentials in two regions could read both and combine them.

The cost: reporting

  • Cross-region analytics needs an aggregation layer that respects residency.
  • The source's example ships aggregated metrics only, no raw EU data. The residency deep dive covers the enforcement points.

8. Make every action safe to retry and every carrier safe to lose

Two different failures

Failure What it means
Missed exception A shipment sitting stuck
Duplicated action A double booking or a double refund

Stateless behind a queue

  • Keep detection and resolution stateless behind a queue. State lives in the event store and the audit log.
  • A regional weather event then smooths into backlog instead of overwhelming detection.
  • Detection scales out, because no instance holds state of its own.

Duplicates come from timeouts

  • A client that times out cannot tell a failed rebooking from a slow one, so it retries.
  • Every auto-resolve action gets an idempotency key: the retry returns the first result instead of booking twice.
  • Legacy carrier APIs that cannot honour a key carry a real cost: they may be forced into human-only handling regardless of confidence.
  • The execution deep dive traces a timed-out rebooking step by step.

Circuit breakers and retry limits

  • A flaky carrier should degrade to "route to human", not pile up retries that delay every other exception behind it.
  • Limit retries too, so a breaker that has not yet opened cannot become a retry storm.

Two failures with their own measurements

  • Lateness. Track time-to-detect separately for real-time and batch. An average hides that a meaningful share of exceptions are detected hours late by design, not by failure.
  • Human capacity. Put SLAs on the approval queue. With 40 concurrent agents, a queue that grows faster than agents clear it at shift handoff is a capacity problem the AI cannot solve. Alert on queue depth, not only event latency.

The main guide's remaining failure rules

  • Customs is an invariant, not a threshold: a high-confidence model cannot override it.
  • A missing field fails to the human queue.
  • An unavailable audit store blocks action.
  • Queue depth and approval age are separate SLOs, each with its own alert.

SLO = service level objective: an internal target, tighter than the SLA.


9. Audit every decision and explain every draft

  • The customer's compliance posture depends on traceability: every auto-resolved action and every human decision must be reconstructable after the fact.

The audit log is a first-class store

  • Not a side effect of other components.
  • Records every gate verdict (customs → human, or value-and-confidence → auto or human).
  • Records every ops agent action: approve, edit or reject.
  • Each entry is immutable and carries the model's confidence and reasoning trace.
  • Dispatch requires durable intent, so missing pre-action evidence blocks execution.
  • Completion evidence still needs reconciliation after crashes or lost responses: monitor unresolved operations as well as missing audit rows.

Least privilege

  • The execution path holds only the scopes needed to rebook or reschedule, never broad account-level credentials.
  • Regional access control is enforced at the application layer (step 7).

Explainability at the point of approval

  • The draft must say why the model proposed it: which signals, which confidence.
  • An agent approving a black box under time pressure is how a wrong suggestion becomes a wrong human decision too.
  • Human review is a control only when the human can see what they are reviewing.
  • For the Frankfurt parcel, the draft shows:
    • The missing hub scan.
    • The last known location.
    • The route history behind the rebooking.
    • For a batch carrier, how late the exception was detected.

10. Evaluate it before anyone asks

  • The rerouting prompt ends: "how do you build it, and how do you evaluate it?"
  • The source's question bank names hand-waved evaluation as the second failure mode of the round. Most candidates fumble "how do you know your AI system is actually working well?"
  • Tie every design choice to how it would be evaluated, and raise the plan unprompted.

One question, one instrument per layer

What could go wrong First evaluator
Did detection catch the disruption at all? Recall per exception type on a labelled replay of historical shipments
Did it flag routine scans as disruptions? Precision per type; false-alarm rate per agent shift
Would the gate ever auto-resolve a customs hold? Invariant test: adversarial customs cases with forced high confidence; required result zero
Is the confidence score honest? Calibration curve on the replay set; error rate of auto-resolved cases at or above the threshold
Are drafts good enough to approve? Approve-unedited, approve-edited and reject rates per exception type
Did the resolution unstick the shipment? Outcome join: delivered within the revised ETA, from SAP, days later
Does a retry ever double-book? Fault-injection test: kill the executor mid-call, replay, count bookings
Can an EU record reach a US session? Residency test from every region's session, on every release
Is batch lateness hidden? Time-to-detect p50/p95 split by feed type

Three terms

Term Meaning
Recall Share of real exceptions detection caught
Precision Share of flagged events that were real exceptions
Calibration Does stated confidence match observed accuracy? At 0.9 on a hundred cases, roughly ninety should be right. Matters most at and above the auto threshold, because those cases run without a human.

ETA = estimated time of arrival.

Three stages

  1. Offline. Replay months of historical shipment and weather data through detection and the agent, with no carrier writes. Compare against what the ops team actually did. This builds the golden set and calibrates the threshold.
  2. Shadow. The agent drafts for live exceptions, but humans act on everything. Compare draft with human decision per type. Auto-resolve stays off until the agreement rate on sub-$500 cases clears a target agreed with the ops lead.
  3. Staged auto-resolve. One region and one well-integrated carrier first, on missed scans on known routes (the source's own example). Watch outcome and reversal rates. Then widen.

The rerouting evaluation trap

  • The route not taken is never observed, so "the reroute helped" cannot be read off a single shipment.
  • Measure against a matched holdout of comparable exceptions handled the old way: delay hours and cost per exception.

The release gate

  • Detection recall must not drop.

  • Customs auto-resolutions stay at zero on adversarial cases.

  • The residency test passes.

  • The audit is complete.

  • Draft fluency is not on the list. A gain in draft wording does not compensate for a customs gate failure.


11. Weigh the trade-offs out loud

  • Every decision costs something. Name each cost rather than presenting the design as free.
Decision Advantage Trade-off
Unified stream (webhook + batch) One detection code path; simpler to add carriers Batch exceptions detected late by design, so surface the lag
Policy Gate as a separate component Independently testable; customs rule cannot be bypassed by a confidence-score bug Extra hop in the critical path
Regional data planes, shared control plane Compliant by construction; consistent UX and policy Cross-region reporting needs a residency-respecting aggregation layer
Queue-backed ingestion Absorbs bursts Latency under normal load; backlog needs monitoring
Idempotent auto-resolve Safe to retry Every carrier must support idempotency keys; legacy ones may not, forcing some carriers to human-only

Soundbite (the source's one-line summary): "The design centres on one non-negotiable, the Policy Gate. Everything else feeds it correctly and acts on its verdict safely."


Quick Recall: Lines to Say in the Interview

  • "Each of the four answers moved a box."
  • "'Reliable' is a preference; zero customs holds auto-resolved, ever, is a constraint."
  • "Two hundred events a second is the sizing problem, not forty agents."
  • "The model sits behind detection, so cost scales with disruptions, not scans."
  • "A poll cannot make a carrier report sooner than it reports."
  • "The exception type comes from detection, never from the agent's own label."
  • "Exactly $500, an unknown currency or a missing field goes to a human."
  • "Shared logic, isolated data, enforced in storage and in the application."
  • "Offline replay, then shadow, then one region and one carrier on known-route missed scans."

Technical deep dives

The goal: the mechanisms behind the follow-ups: throughput and freshness, gate inputs and idempotent execution, residency enforcement, the rerouting variant, operating metrics and cost.

30-Second Cheat Sheet

  • 200 events/s is not 200 decisions/s. 17.3M/day is a capacity upper bound, not a forecast; measure the exception fraction before sizing inference.
  • Stamp three times on every event: source, ingest, detection. Watch oldest-event age, not only queue depth.
  • Each gate input has one owner: detection supplies the type, the agent supplies action, confidence, reasons. The agent holds no carrier-write credentials.
  • Idempotency key per shipment and resolution version. An edit reconciles v1 first before any v2 dispatch.
  • Audit store down → no action. Persist intent before dispatch, the receipt after; an outbox is not an atomic carrier transaction.
  • Residency has two enforcement points: storage and application sessions. Model inputs are regional data too.
  • Rerouting is the same system: SAP, weather and 500 managers map onto ingestion, detection and the approval surface.
  • Cost scales with exceptions; storm latency is a queue and human problem, not a model one.

1. Event rate, exception rate and feed freshness

Follow the numbers

  • Sizing established that ~200 webhook events a second at peak does not mean 200 agent decisions a second.
  • Stream: a peak sustained for 24 hours = 200 × 86,400 ≈ 17.3M events. An upper bound for capacity planning, not a daily forecast.
  • Humans: ~150 agents × 30–50 cases a day = 4,500–7,500 cases in the simple estimate.
  • Inference spend tracks detected exceptions and calls per exception, because cheap detection runs first.
  • Human case capacity is not an upper bound on automated cases. Measure the exception fraction and auto-resolve share before sizing inference.

What the 40 concurrent agents size

  • 40 concurrent agents at shift handoff size the review interface and the queue SLA, not stream ingestion.
  • The classic mistake: scaling the model tier for a load that only the queue and the humans feel.

Each ingestion path does a different job

  • Batch-only carriers report every 2–6 hours. No polling trick removes that upstream delay.
Path Job before the shared schema
Webhook ingest Validates the payload and deduplicates carrier retries (a carrier that did not see our acknowledgement resends the same event)
File ingest Parses CSV or EDI and diffs the latest shipment state, emitting only changes
Both Write the same regional event schema

Three timestamps

Stamp Meaning
Source time When the carrier says it happened
Ingest time When we received it
Detection time When detection classified it
  • ingest − source = the carrier's own delay (hours for a batch drop).
  • detection − ingest = our queue delay.

Monitor the right queue numbers

  • A regional queue absorbs weather bursts.
  • Monitor oldest-event age and detection recall, not only queue depth.
    • A deep queue draining quickly is fine.
    • A shallow queue whose oldest event is two hours old is not. Only oldest-event age shows the difference.
  • Recall shows whether detection still finds exceptions under load.

2. Gate inputs, identity and idempotent execution

Each input has one owner

Input Owner
Exception type Detection
Proposed action, confidence, reasons The agent
Carrier-write credentials Not the agent. Even a badly behaved agent has no path to a carrier that bypasses the gate.

The gate's order

  1. Customs and regulatory status first.
  2. Then only a non-customs shipment below $500 with calibrated high confidence enters auto-execution.
  3. A missing type, value, confidence or policy version → human review.
  • Store the policy version with the decision, so an auditor can see which rule set produced a verdict.
  • Test forced-high-confidence customs examples on every release.

Trace a timed-out rebook

Idempotency key = an identifier tied to the specific shipment and resolution version, so a retry returns the first result.

  1. The executor sends "rebook shipment S on the next linehaul" with key S:resolution-v1 (an illustrative format).
  2. The carrier books it, but the response is lost and the executor times out.
  3. A timed-out rebook could have succeeded, so a blind retry risks a second booking.
  4. With the key, the retry carries S:resolution-v1 again. A carrier that honours keys returns the first booking.
  5. An ops agent later edits the resolution:
    • First reconcile S:resolution-v1 and determine whether it already booked.
    • Only a distinct, still-needed and approved operation gets S:resolution-v2.
    • An edit is not permission to dispatch a second booking while the first is uncertain.
    • The key tracks the decision, not just the shipment, so a deliberate change is not mistaken for a duplicate.

Carriers without idempotent semantics

  • May stay human-only, because step 4 has no safe equivalent for them.
  • Limit retries and use a circuit breaker to send work to review when a carrier is unhealthy.

Audit around the side effect

  • Audit automated and human decisions alike: the original draft, the agent's edit or rejection, the action result.
  • If the audit store is down, take no action.
  • Before dispatch: persist intent, policy verdict, approved payload hash and operation ID.
  • After confirmation: persist the authoritative receipt.
  • A crash between the carrier effect and the receipt write leaves an uncertain action that must be reconciled. The pre-action log cannot prove completion by itself.
  • An outbox couples local state and queued work, but it does not make the carrier call and the local log one atomic transaction.

Soundbite: "The pre-action log proves intent, not completion, so an uncertain action is reconciled, never re-sent blind."


3. Residency at the storage and application layers

What lives where

Plane Holds
One versioned control plane Prompts, model routes, policy definitions, UI logic
US, EU and APAC data planes Their own event stores, model inputs and audit logs
  • Model inputs are listed on purpose: a prompt with EU shipment details is EU data, so the model call for an EU exception runs in the EU.

Whose rule it is

  • EU data never leaves the EU because the customer requires it.
  • GDPR alone would allow transfers with safeguards.
  • If the customer later relaxed the rule, the GDPR-compliant transfer route would be a design option. That is why the source keeps the two apart.

Two enforcement points

Point What it stops
Storage isolation EU records leaving EU stores
Application sessions A cross-region query from a service that can reach both regions. Isolated storage alone does not block it.
  • The step 10 release test checks this from every region's session.

Cross-region reporting

  • Uses approved aggregate metrics, not raw shipment records.
  • Aggregation alone does not remove the residency obligation: small groups, shipment identifiers and low-count slices may still expose shipment data.
  • Review the permitted metric schema and suppress disallowed detail before export.
  • A global dashboard can show EU exception counts or median time-to-draft, but not EU shipment rows.

4. The rerouting variant: SAP, weather and 500 managers

The prompt

  • "A logistics firm wants an AI agent to handle automated shipment rerouting. They have SAP data, real-time weather APIs, and 500 warehouse managers on different regional systems."
  • Same system, three different nouns.
  • The source's question bank says it tests three things:
    • Multi-system data unification
    • Stakeholder surface area
    • Whether evaluation is first-class (step 10 of the walkthrough covers it)

Map the anchor onto the prompt

Rerouting-prompt noun Where it lands in the anchor What changes
SAP data System of record behind "carrier / ops systems" and the event store SAP becomes an ingestion source and an execution target; changes arrive by change feed or batch extract, so the batch-diff path applies
Real-time weather APIs A detection signal for "weather delay", on the streaming path Weather is predictive: detection can flag before a scan is missed; forecasts need a freshness stamp
500 warehouse managers The human approval surface, larger than the anchor's 150 agents Still low-DAU; approvers sit in different tools, so the draft must reach them where they work
Different regional systems The regional data planes of step 7 One adapter per regional system, behind one normalised schema
Automated rerouting The auto-resolve action A reroute is a side effect: idempotency key, least-privilege scope, gate before execution
  • SAP = authoritative shipment state and a possible write target.
  • Weather = a predictive signal stamped with freshness.
  • The 500 managers = distributed approvers.
  • Regional differences belong in adapters, not the core.

The six-step framework the source narrates

  1. Clarify the mission. On-time delivery, cost, or fewer manual touches? Primary user: the warehouse manager or a central ops desk?
  2. Name stakeholders and success metrics.
    • Warehouse managers approve reroutes.
    • Central logistics owns the SAP integration.
    • Regional IT owns each regional system.
    • Customs and compliance own the always-human rule.
    • Each group calls success by a different number, so agree the metrics before the build.
  3. Map the inputs. What data exists, in what shape, who owns it, how fresh?
    • SAP is authoritative but batchy.
    • Weather is fresh but probabilistic.
    • Regional systems differ in schema and in whether they accept writes at all.
  4. Decompose and sequence by risk.
    • First: data ingestion and quality. A reroute based on a wrong shipment state is the worst failure.
    • Second: the agent and gate.
    • Third: the manager-facing surface.
  5. Ship a walking skeleton. The thinnest path from one SAP extract and one weather feed to one region's managers, even with a mocked agent. It proves the integration story before the model matters.
  6. Adapt live. Expect "you lost access to the weather feed." Re-derive without defending the old plan. Weather-driven detection falls back to scan-driven detection, and the draft states weather data was unavailable.

The data-unification probe

  • Question: how do you unify customer data split across SAP, Salesforce and Postgres for an agent?
  • The anchor's answer: normalise into one event schema per region at ingestion. Never let the agent query three systems of record live.
  • Why: live queries put three freshness clocks, three permission models and three failure modes inside every agent step.

5. Operating metrics after launch

  • Step 10 defines the release suite. This covers what the team watches once auto-resolve is live, and how it feeds back into policy.

Where each signal comes from

Signal Source What it tells you
Detection recall and false alarms per type The replay set Is detection catching and not over-flagging?
Approve-unedited rate per type The audit log The draft was usable
Approve-edited rate per type The audit log A high edit rate on one type: the agent misunderstands it
Reject rate per type The audit log Where drafts fail outright
Outcome SAP, joined days later against the revised ETA What actually happened

Two fault tests on every release

  1. Kill the executor mid-call and replay, then count bookings. The answer must be one.
  2. Attempt every region-to-region access and confirm each is denied.
  • Rerouted shipments are compared with matched holdouts, because one shipment cannot show the alternative route's outcome.

Five production numbers

Number Why
Cost per resolved exception The unit economics
Model calls per exception Keeps the model behind detection honest
Time-to-draft by feed Two clocks, never averaged
Queue age The human bottleneck
Reversal rate A resolved case a human later had to undo: the most direct sign auto-resolve has widened too far

The audit log drives the HITL boundary

HITL = human in the loop: a person approves or corrects the AI before anything risky happens.

  • Edit and reject rates per type decide where the confidence threshold sits and which types stay human-only.
  • Changing the threshold is a control-plane release with an audit entry (step 6), so every widening has a recorded reason.

6. Cost and latency scale with exceptions

  • Keep model calls behind detection: cost scales with exceptions, not routine scan volume.

Four controls within an exception

  1. Template the common missed-scan rebook, so the most frequent case needs little or no free-form generation.
  2. Cap agent steps, carrier calls and retries per exception.
  3. Route by difficulty: difficult drafts a human will read go to a stronger model, only when it helps. Routine drafts use a small model.
  4. Cache shipment and route lookups within a case, keyed on the event version, so a stale lookup never drives an action.

Latency during a storm is a separate problem

  • The batch path is slow by design, and no model choice changes that.
  • On the real-time path: latency = detection + drafting + queue, and a burst lands in the queue.
  • The answer: prioritise the backlog by shipment value and deadline and scale stateless detection out, not buy a faster model.
  • During a weather burst the human approval queue may become the real bottleneck, and no model change helps there either.
  • The cost pivot drill in the full casebook turns this into a ten-minute interview answer.

Soundbite: "The model is off the stream, and each exception has a cap on steps, calls and retries, so a storm costs queue time, not runaway spend."


7. References and source boundaries

What each prompt contributed

  • The source page consolidated several prompts from its group into one read.
Case in the group What it contributes here
AI Logistics Exception-Handling Assistant, the FDE round (anchor) Discovery, requirements, sizing, architecture, ingestion, the gate, regional planes, reliability, audit, trade-offs and the sixty-minute delivery
OpenAI FDE prompt: shipment rerouting over SAP, weather APIs and 500 warehouse managers The evaluation plan, the rerouting stakeholder and data-unification map, and follow-ups
Self-drill (written for the source page) The cost pivot

Reused patterns (named, not repeated)

  • Deny-first gate from the Tool-Using Agent with Safety Controls case.
  • Tenancy ladder from the Secure Multi-Tenant AI Platform case.
  • Channel adapters from the Agent Platform for Non-Technical Users case.

Caveats to keep

  • All volumes, shares and staffing figures are the mock session's planning answers, not measurements.
  • The confidence threshold and the shadow agreement target are deliberately left open: they need replayed history and the ops lead's sign-off.
  • Apache Flink timers describe keyed processing and event-time timers. Event-time timers require watermark progress, so a stopped feed also needs a health/deadline check.
  • AWS transactional outbox guidance explains local dual-write recovery, not atomic carrier effects.
  • No carrier or SAP environment was connected.
  • Residency fact-check (27 September 2026): the European Commission's rules on international data transfers confirm GDPR allows transfers out of the EU with safeguards, so "EU data stays in the EU" is the customer's rule.

Quick Recall: Lines to Say in the Interview

  • "Two hundred events a second is not two hundred decisions a second."
  • "Seventeen point three million a day is a capacity bound, not a forecast."
  • "Only oldest-event age tells a draining queue from a stuck one."
  • "The agent holds no carrier-write credentials, so nothing reaches a carrier without the gate."
  • "The key tracks the decision, not just the shipment, and an edit reconciles v1 before any v2."
  • "An outbox doesn't make the carrier call and the local log one atomic transaction."
  • "A prompt with EU shipment details is EU data, so the model call runs in the EU."
  • "Never let the agent query three systems of record live."
  • "Reversal rate is the most direct sign auto-resolve has widened too far."

Quick review

One sentence: two ingestion paths converge after ingestion, the model only drafts on detected exceptions, and an independent customs-first gate plus a safe executor keep automated actions narrow, auditable and regional.

30-Second Cheat Sheet

  • Ask first: feed freshness and rate, who approves, what may auto-resolve, the value and confidence rule, where data must reside.
  • The agent proposes and the gate decides. The exception type comes from detection, never the agent's self-label.
  • Auto only when: non-customs, under $500, confidence meets the threshold. Any missing field → human.
  • Numbers: ~200 events/s peak, ~17.3M/day upper bound, files every 2–6 h, ~150 agents, ~40 concurrent, 4,500–7,500 human cases/day.
  • EU data stays in the EU as the customer's rule, not because GDPR requires it.
  • Safe execution: idempotency key per shipment and resolution version, circuit breaker to a human, no action while the audit store is down.
  • Proof: offline replay → shadow → one carrier, one region; zero customs auto-resolves is a release invariant.

1. Recall the path, the numbers and the proof

Ask first

  1. Feed freshness and rate?
  2. Who approves?
  3. Which cases may auto-resolve?
  4. What is the shipment value and confidence rule?
  5. Where must data reside?

Whiteboard path

Webhooks + batch diff → regional normalised queue → cheap detection → agent draft → customs-first policy gate → auto executor or human queue → carrier action → regional audit

  • The agent proposes and the gate decides.
  • The exception type comes from detection, never from the agent's self-label.

Numbers and rules

Item Value
Webhook events at peak About 200 events/s
Upper bound per day About 17.3M events
Batch files Every 2–6 hours
Ops agents About 150
Concurrent at peak About 40
Cases per agent 30–50 a day
Human cases per day 4,500–7,500
Auto-resolve rule Non-customs, value under $500, confidence meets the threshold
Missing field Goes to a human
EU residency The customer's rule, not because GDPR requires it
Batch lateness Visible on the draft and in split p50/p95 time-to-detect

Failure and proof

  • An idempotency key per carrier action, tied to shipment and resolution version.
  • A circuit breaker that falls back to a human.
  • No unaudited action, and no action while the audit store is down.
  • A legacy non-idempotent carrier may be human-only.
  • Rollout: offline replay → shadow → one carrier and one region on known-route missed scans.
  • Zero customs auto-resolves is a release invariant.
  • Measure detection recall and outcomes, and use a matched holdout for reroutes.

Sixty-second close: "Two ingestion paths converge after ingestion. The model only drafts on detected exceptions. An independent customs-first gate and safe executor keep automated actions narrow, auditable and regional."


2. Key takeaways

  • Discovery: the four clarifying answers are the design, and each one moved a box.
  • Requirements: stated so a test can fail them. The customs rule is an invariant, not a threshold.
  • Sizing: by event throughput, so the model sits behind detection and scales with disruptions, not scans.
  • Diagram: two ingestion paths, one pipeline, and a gate before anything acts.
  • Ingestion: batch and streaming converge after ingestion; batch lateness is surfaced, not averaged away.
  • Gate: its own component, checking customs first, before value and confidence.
  • Residency: a shared control plane with regional data planes keeps EU data in the EU behind one experience.
  • Reliability: idempotency keys, circuit breakers, split time-to-detect and queue SLAs make actions safe and failures visible.
  • Audit: a first-class store, and every draft explains itself at the point of approval.
  • Evaluation: raised unprompted: replay offline, shadow, then staged auto-resolve, with the customs invariant as a release gate.
  • Rerouting: the same system. SAP, weather and 500 managers map onto ingestion, detection and the approval surface.
  • Trade-offs: every decision carries a named cost, and the Policy Gate is the one non-negotiable.
  • Pacing: the hour goes to the questions, the gate and the evaluation plan.
  • Cost pivot: keep the model off the stream and bound each exception's steps, calls and retries.

Flashcard Drill


Quick Recall: Lines to Say in the Interview

  • "The agent proposes and the gate decides."
  • "The exception type comes from detection, never from the agent's self-label."
  • "Non-customs, under $500, confidence meets the threshold; anything else, or anything missing, goes to a human."
  • "Two hundred events a second at peak; about seventeen point three million a day as an upper bound."
  • "EU data stays in the EU because the customer requires it, not because GDPR does."
  • "No unaudited action, and no action while the audit store is down."
  • "Zero customs auto-resolves is a release invariant."
  • "Replay offline, then shadow, then one carrier and one region on known-route missed scans."

Where next