AI EngineeringInterview preparation
Intermediate·Concept·2 min read

Human-in-the-loop

Practice this question

Overview

  • 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

  1. Prepare immutable proposal
  2. Persist pause
  3. Notify/display review
  4. Authenticate reviewer
  5. Validate approval scope/expiry
  6. Resume
  7. Revalidate current business rules
  8. 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.
Adapted from 13_AI.MD · “Human-in-the-loop”. Code examples are study fragments. Difficulty and core labels are editorial estimates; version-specific behavior should be checked against your project.