Context & In-Context Learning

Autoregressive generation, the prompt stack, context engineering, and long-context degradation.

10concepts
88flashcards
74minutes of reading
  1. 01 Context Compaction and Handoff When an agent's conversation approaches the window limit, compaction summarises the history and reinitialises a fresh window from the summary; what survives the compression determines whether the agent continues or silently restarts. intermediate 6m 15 cards
  2. 02 Context Engineering The discipline of curating exactly which tokens occupy the model's window during inference, and why it became the core skill for building agents that run longer than a single turn. intermediate 9m 5 cards
  3. 03 In-Context Learning How large models learn a task from examples in the prompt alone, with no weight updates, and why this emergent ability reframed how we use LLMs. intermediate 7m 4 cards
  4. 04 Many-Shot In-Context Learning What changes when you put hundreds or thousands of examples in the prompt instead of five, why the gains keep coming after few-shot plateaus, and how model-generated rationales substitute for scarce human data. intermediate 7m 15 cards
  5. 05 RAG vs Long Context The engineering decision the million-token window forced, what controlled comparisons actually found about quality and cost, and why routing between retrieval and full-context beats picking a side. intermediate 7m 15 cards
  6. 06 The Prompt Stack and Chat Roles What a chat prompt actually is under the hood: a single token sequence built from system, user, and assistant turns wrapped in special tokens, and why that structure is load-bearing. intermediate 6m 5 cards