Chat interfaces: make context and actions understandable
Design a conversation that exposes its limits and preserves user control.
Preparation: Token budgets and basic interaction design.
Plan 20–35 minutes with the activities; this is a study estimate, not a timed requirement. Both paths have complete narration. Your notes and progress are kept separately for each level.
FULL LOCAL NARRATION
Follow the complete explanation.
Narration includes worked solutions. Pause at each practice prompt before continuing. Formula notation has a spoken explanation; all teaching text remains readable.
High-school path. Design a conversation that exposes its limits and preserves user control.
Preparation: Token budgets and basic interaction design. Work through one section at a time. Predict the experiment result before changing its controls, then explain what the example leaves out.
A chat interface stores structured roles and content, then serializes them using a model-compatible template. The displayed bubbles are not necessarily the exact text the model receives. A play has speakers and stage directions; flattening everything into one paragraph can lose the roles.
Worked step 1. Inspect a system, user and assistant message.
Worked step 2. Apply the intended template.
Worked step 3. Check role boundaries and generation prefix.
Try it yourself. Are role labels merely decorative UI text?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Their serialization can affect model behavior and instruction interpretation.
Section 02 / 07
Budget the whole conversation
Context must accommodate instructions, history, evidence and any reserved output. A visible conversation can be longer than the portion supplied to the model. A backpack has limited space: adding more evidence may require removing something else.
available = capacity − instructions − history − evidence
Worked step 1. Budget is 8192 tokens.
Worked step 2. Instructions use 1000, history 2000 and evidence 3000.
Worked step 3. Remaining capacity is 2192 before other overhead.
Try it yourself. Can the interface promise unlimited memory from this budget?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Persistent storage and the active model context are different things.
Section 03 / 07
Streaming needs a clear state
Text can arrive gradually while the answer is still incomplete. Distinguish generating, waiting for a tool, completed and failed states so users know what can be trusted or interrupted. A sentence halfway through being spoken should not look like a finished instruction.
Worked step 1. Start a response.
Worked step 2. Pause the network midstream.
Worked step 3. Show a recoverable incomplete state rather than a false completion.
Try it yourself. Should a stalled spinner imply work definitely continues?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Timeouts and retry controls should communicate uncertainty and preserve the user’s input.
Section 04 / 07
Tool actions need their own permissions
Generating a suggestion and executing an external action have different consequences. Show what an action will do and apply the relevant authorization before execution. Drafting a letter is different from sending it to someone.
Worked step 1. Show recipient and message preview for a send action.
Worked step 2. Obtain required authorization.
Worked step 3. Display the actual result after execution.
Try it yourself. Can a tool result be invented to make the conversation feel smooth?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Report the real outcome, including errors or unknown status.
Section 05 / 07
Attach evidence to claims
Citations should lead to supporting material and remain associated with the claims they support. A list of links at the bottom can conceal unsupported statements. Place the page reference beside the sentence it actually supports.
Worked step 1. Choose one factual sentence.
Worked step 2. Open its cited source.
Worked step 3. Check whether the source supports the complete sentence.
Try it yourself. Does a working URL alone validate the claim?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Availability and substantive support are separate checks.
Section 06 / 07
Include keyboard, motion and failure paths
A modern interface should work for people who type, zoom, reduce motion or temporarily lose connectivity. Preserve their draft and give clear recovery controls. Test with the mouse set aside and text enlarged before calling the design finished.
Worked step 1. Navigate by keyboard.
Worked step 2. Enlarge text and switch views.
Worked step 3. Interrupt a request and verify the draft survives.
Try it yourself. Is a desktop screenshot sufficient accessibility evidence?
Pause the recording and write your reasoning before continuing. The worked solution follows.
Reveal worked solution
Worked solution. No. Interaction, semantics and recovery behavior require additional checks.
Section 07 / 07
Mastery and transfer
Bring the pieces together. First answer the checkpoint without the worked solutions. Then explain the mechanism in your own words, using one numerical example from this lesson.
A completed-looking chat bubble proves… Option 1: A tool action succeeded. Option 2: Nothing about an external action without its real result. Option 3: The whole history reached the model.
Pause here and choose an answer before continuing. The checkpoint explanation follows.
Reveal worked solution
The correct choice is option 2: Nothing about an external action without its real result. The interface must distinguish generated text, execution and verified outcomes.
Transfer task. Change one assumption in the worked example. State your prediction, calculate or test it in Workbench, then explain whether the result supports your prediction.
Reveal worked solution
Self-check rubric. Name the changed assumption, keep the other inputs fixed, show at least one intermediate calculation, and distinguish what the toy example guarantees from what would require a trained model or a real measurement.
WORKBENCH / PREDICT → TEST → EXPLAIN
Inspect exact numerical data
These are computed teaching fixtures. No remote AI model or GPU is called by the experiment.
CHECK YOUR UNDERSTANDING
Commit to an explanation.
Keep your learning record.
MODERN MODEL CASE STUDY
DeepSeek V4.1 Flash: where this idea goes next
Test long-context retrieval and cache-resumption boundaries. Follow the worked examples, then evaluate the reported gains and their limits.
Original worked examples and teaching text, grounded in these primary references. Numerical fixtures explain mechanisms; model quality and hardware performance require separate measurements. Both levels share key examples, with different explanations and checkpoints.