All lessons in AI Engineering: From Foundation Models to Evaluated Applications

Context Engineering and Trust Boundaries

Select useful context and distinguish instructions from untrusted retrieved content.

60 minutes · Members lesson · preview

What you will learn

  • Assemble a context packet that preserves required evidence within a defined token budget.
  • Distinguish application instructions, user requests, retrieved content, and verified execution state.
  • Design tests for missing evidence, conflicting sources, and instruction-like content without granting data new authority.

The prompt is clear, yet the assistant gives the wrong return deadline. Inspection shows that the current policy was placed after a long conversation and removed by truncation. In another case, a retrieved document contains a sentence telling the assistant to disclose account records. Both failures concern what enters the request and how the application treats it.

Context engineering is the deliberate selection, organization, and updating of information used for a task. This lesson connects that work to trust boundaries. The small exercises are design checks; the separate P04 practice builds and tests a context-processing component. All policy packets and token counts below are fictional teaching data.

Choose another lesson