Chapter C44 · Interactive Course

What is actually in a conversation

Roles, precedence, templates, assembly, compaction and memory.

Start chapter in web app

Core Learning Concept

Reconstruct the actual model input from the supplied record. Distinguish message roles, quoted material, selected files, summaries, and retrieved snippets. Compare what was visible to the user with what reached the request. Diagnose missing context and instruction boundaries using the recorded setup rather than the appearance of the chat.

What You’ll Learn in This Chapter

  1. Messages have roles

    Activity 1 of 8 · 5 min

    Identify a message role separately from its wording.

    A message role is structured metadata assigned by the host or API, such as user, assistant, or tool. Typing “system:” inside a document does not change its actual role. Roles help the application organize messages and instruction authority; the exact available roles and rules depend on the host.

    Start activity →

  2. Instruction priority belongs to the host

    Activity 2 of 8 · 4 min

    Use a supplied host's priority rules to resolve one conflict.

    Instruction priority is determined by system architecture rules, not aggressive phrasing. System envelopes and user prompts typically outrank retrieved document text. Never let untrusted document excerpts silently hijack higher-level application behavior.

    Start activity →

  3. A chat template packages messages

    Activity 3 of 8 · 4 min

    Explain why models need the expected message formatting.

    A chat template converts structured conversation turns into a unified token stream using special boundary markers. Mismatched templates cause severe instruction confusion or degraded outputs because the model misinterprets turn boundaries.

    Start activity →

  4. Context is assembled

    Activity 4 of 8 · 4 min

    Identify which material was actually included in a request.

    The application assembles context before a model response. It may select messages, excerpts, tool results, and instructions rather than forwarding everything visible or stored. A file being open on screen is not evidence that its contents were included. Inspect the supplied input or available trace when diagnosing an omission.

    Start activity →

  5. Compaction trades detail for space

    Activity 5 of 8 · 4 min

    Recognize information lost in a supplied summary.

    Compaction summarizes or reduces earlier context to fit later work. It can preserve important constraints but may also lose details or qualifications. If an exact value matters, recover it from an authoritative record and supply it again. A summary is useful working context, not a guaranteed lossless archive.

    Start activity →

  6. Context, memory and retention differ

    Activity 6 of 8 · 4 min

    Separate request input from stored notes and service logs.

    Request context is information used now; product memory is selected information saved for reuse; retention concerns stored data and its lifetime. Starting a new conversation does not necessarily clear all three. Check the relevant controls and policies rather than inferring data handling from the visible chat history alone.

    Start activity →

  7. Reasoning text is not an audit trail

    Activity 7 of 8 · 4 min

    Choose observable evidence over a plausible explanation.

    Reasoning text and narrative explanations are generated words, whereas system logs record genuine tool operations. Compare assistant claims directly against immutable execution receipts to verify what actions actually took place.

    Start activity →

  8. Reconstruct the model input

    Activity 8 of 8 · 6 min

    Given a visible chat and an inclusion log, mark what reached the model, what was summarized and what remains outside the request.

    Start activity →