Chapter C44 · Interactive Course
What is actually in a conversation
Roles, precedence, templates, assembly, compaction and memory.
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
-
Messages have roles
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.
-
Instruction priority belongs to the host
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.
-
A chat template packages messages
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.
-
Context is assembled
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.
-
Compaction trades detail for space
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.
-
Context, memory and retention differ
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.
-
Reasoning text is not an audit trail
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.
-
Reconstruct the model input
Given a visible chat and an inclusion log, mark what reached the model, what was summarized and what remains outside the request.