Contents
Map

11 · Prompt & Context Engineering

Appendix - Summary & Key Terms

View as:

Appendix - Prompt & Context Engineering

What We Learned

  • Specify the task, constraints, evidence and output format using the model's message structure.
  • Use examples, decomposition, tool use or verification when they improve measured performance.
  • Constrained output formats enforce structure; semantic correctness still needs validation.
  • Manage context with retrieval, compression, offloading and stable cacheable prefixes.
  • Version prompts, evaluate changes and optimize on training/dev cases while keeping a held-out test.

Key Acronyms, Concepts & Jargon

TermShort meaning
Zero-shot / few-shotInstructions without examples / instructions with example demonstrations.
ICLIn-Context Learning: adapting behavior from examples in the prompt without weight updates.
CoT / ReActChain of Thought / Reasoning and Acting: intermediate reasoning / reasoning interleaved with tools.
ToT / self-consistencyTree of Thoughts / choosing among multiple sampled reasoning paths.
Prompt chainingPasses one model step's output into the next step.
Instruction hierarchyRules for resolving conflicting instructions by source priority.
JSON SchemaSpecifies the expected structure and types of JSON data.
Constrained decodingRestricts allowed next tokens to enforce an output grammar or schema.
Context engineeringSelects and organizes instructions, evidence, history and tool results.
Prompt cachingReuses computation for a matching prompt prefix.
Prompt injectionAttempts to turn untrusted content into controlling instructions.
DSPyFramework for declarative model programs and metric-driven optimization.
Prompt optimization / overfittingSearch for better prompt behavior / tailoring it too closely to development cases.

Back to section overview

⚡AI-assisted content - always verify, always explore multiple perspectives·