Streaming Responses
streaming
Practice Problems
Streaming State Reducer
Write the pure reducer behind a streamed assistant answer: accept only contiguous events from the active run, ignore replays and stale runs, mark gaps as interrupted without losing text, keep finished runs final, and never mutate the input.
AI Engineering
Diagnose incomplete model output
Work out why a model's answer looks cut off or incomplete by reading termination metadata, token budgets, and stream evidence before changing any setting.
Stream, stop, and replace a response
Explain how a streaming feedback UI shows partial output, what Stop really cancels, and how run IDs keep late events from an old attempt out of a new answer.
Implement a streaming state reducer
Implement a pure reducer that keeps a streamed answer consistent through stale runs, replays, gaps, and stops, and predict its transitions. Then review a fetch integration for decoding, framing, cancellation, and end-of-stream defects.
Design a resilient streaming chat
Design a streaming interview-practice chat that keeps one answer correct across reconnects, several open tabs, and cancellation races, checks citations against current access, and never repeats its booking tool during recovery.
