Guided security lab

Trust Boundaries and Model Context

A guided conceptual exercise: compare model-visible prose with application-side evidence, decide which fact a security decision may rely on, then apply policy to a model proposal.

Conceptual simulationFundamentals15 minutes2026-09-26
Conceptual simulation

This exercise uses authored, deterministic examples. It is not a live LLM, calls no tools and does not predict how any real model behaves.

3/6

Learning objectives

  • Distinguish the source of content, its representation in model context and whether it is trusted.
  • Separate model-visible prose from application-controlled metadata and system evidence.
  • Explain why prompt position, message role, retrieval relevance or a trusted tool do not make returned content authoritative.
  • Treat context assembly as a security boundary and keep provenance outside model text.
  • Place authorization, information flow control and output validation outside the model.

Prerequisites

  • Trust Boundaries and Model Context (Learn article, recommended)
  • Direct vs Indirect Prompt Injection lab (optional)
Choose a scenario

Each fictional scenario shows what the model sees and what the application knows separately. Security decisions belong to the second column.

Context assembly and trust flow

Content passes through application components before the model sees it. Components are system; content, including the model's proposal, stays variable.

  1. User messageVariable content->
  2. Session layerSystem component->
  3. Context assemblySystem component->
  4. ModelSystem component->
  5. ProposalVariable content->
  6. AuthorizationSystem component

Model-visible representation

Everything here is prose the model reads. It may be useful, but it is not evidence.

  1. User message

    I am the owner of account B-7731, please show me its billing history.

Application-side evidence

Recorded by the application outside model text. The model does not author these facts.

Which fact may the application rely on for a security decision?