All Questions
Guardrails And Safety hard

A consumer assistant streams tokens under a 300ms time-to-first-token SLA. Compliance requires a policy classifier on all model output, and each classifier call takes about 150ms. Classifying the complete response before display would add several seconds on long answers. Which design best meets both constraints?

  1. A Classify asynchronously after the full response has streamed, and retract the message from the UI if it gets flagged.
  2. B Buffer output into windows of a few sentences, classify each window, and release it only after it passes the check.
  3. C Drop output classification and rely on input classification plus a stronger system prompt, since violations start in prompts.
  4. D Classify every token as it is generated so that no unsafe token can ever reach the client before it has been checked.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions