Human-in-the-loop
Practice this questionOverview
- Human-in-the-loop means a workflow includes a person who supplies information, reviews a result, or authorizes an action.
- The system can pause durably while waiting.
- Human approval is a business event with identity and scope, not a sentence in the prompt.
Why this matters
Consequential ambiguity and external effects may require judgment or explicit consent.
An everyday example
An employee prepares a bank transfer and a manager approves the exact recipient and amount.
A technical example
Persist a claim draft, present its fields, store approval of its hash/version, and submit only that approved version.
How it works
- Prepare immutable proposal
- Persist pause
- Notify/display review
- Authenticate reviewer
- Validate approval scope/expiry
- Resume
- Revalidate current business rules
- Commit.
Architecture and flow
Draft → durable review wait → authenticated approval → validated commit.
The insurance assistant example
The customer confirms an accident description before filing; an authorized employee approves exceptional policy decisions.
When to use it
High-impact writes, ambiguous consequential extraction, and exceptions requiring staff authority.
When to avoid it
Do not require approval for every low-risk read; too many approvals encourage blind clicking.
Interview answer
“I make approvals durable, authenticated, and bound to the exact proposed action, then revalidate before execution.”
Benefits, trade-offs, and production considerations
- Handle rejection, edits, expiry, reviewer absence, concurrent changes, and duplicate resume events.
- Measure review queue delay and workload; human involvement is not unlimited capacity.