LLM features in the frontend
For engineers
Streaming UI, partial results, retries and honest affordances for AI features in a web app
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
A streamed reply contains an accented character whose bytes are split across two network chunks. What prevents it from showing as a broken symbol?
Check yourself · 2 of 5
An assistant streams a JSON object that your code parses to fill a form. When should the form fields update?
Check yourself · 3 of 5
A user presses Stop while an answer streams. What should the interface show?
Check yourself · 4 of 5
Which interface cue best helps a reader judge whether an AI answer can be trusted?
Check yourself · 5 of 5
Tokens arrive about 80 times per second and the page stutters. Which change helps most?
Topics
- Streaming tokens into the page4 min read · Rendering partial model output as it arrives without layout jumps, flicker or broken markdown
- Showing partial and uncertain results4 min read · Progressive disclosure, working states, and when to hold back an unfinished answer
- Retries, cancel and timeouts in the UI5 min read · What the user sees when a request fails, is cancelled or is retried behind the scenes
- Keeping the UI honest about the model4 min read · Labels, grounded uncertainty cues and edit affordances so people do not over-trust the output
Start here
- AI SDK UI: chatbot (opens in a new tab)DocsFree
Working chat hook with streaming status, stop, regenerate and error states to compare with your own code.
- AbortController (MDN) (opens in a new tab)DocsFree
How to cancel a fetch and what the abort error looks like.
- AbortSignal.timeout() (MDN) (opens in a new tab)DocsFree
A built-in way to abort a request after a fixed time, with a distinct TimeoutError.
Scenarios
Helps to know first
110 questions · last verified 2026-12