Prompt Engineering

In-context learning, chain of thought, structured output, compression and injection-aware design.

10concepts
94flashcards
73minutes of reading
  1. 01 Chain of Thought Prompting Why telling the model to think step by step radically improves reasoning, and when it actively hurts. beginner 5m 3 cards
  2. 02 Few-Shot and In-Context Learning Learning a task from a handful of worked examples placed in the prompt, with no weight updates, and the surprising evidence about what those examples actually teach. intermediate 8m 7 cards
  3. 03 Injection-Aware Prompt Design How to structure prompts that consume untrusted input so injection is harder, and why prompt design alone can never make an LLM injection-proof. intermediate 7m 6 cards
  4. 04 Multimodal Prompting What changes when part of the prompt is an image: token cost scales with resolution, ordering of image and text changes the answer, and the reliable failure mode is confident description of objects that are not there. intermediate 7m 15 cards
  5. 05 Prompt Chaining and Task Decomposition Splitting a hard task into a pipeline of simpler, individually-checkable prompts so each step can be validated, routed, and debugged on its own. intermediate 7m 6 cards
  6. 06 Structured Output Coercion How to coax reliable JSON, XML, and tabular output from a model using prompting alone, and why that gives you no hard guarantee the way constrained decoding does. intermediate 7m 6 cards
  7. 07 System Prompt Design What the system prompt actually buys you as a privileged, cache-stable, always-present segment, how to structure it, and why length in that slot costs more than it looks. intermediate 7m 15 cards
  8. 08 Automatic Prompt Optimisation Treating the prompt as a parameter to be searched rather than a string to be tweaked, using a metric, a dataset, and an LLM that proposes and critiques its own instructions. advanced 9m 15 cards
  9. 09 Prompt Compression Cutting prompt tokens while holding task performance, via perplexity-based token dropping (LLMLingua) or learned gist tokens, and when prompt caching beats both. advanced 8m 6 cards
  10. 10 Prompt Format Sensitivity Semantically identical prompts that differ only in separators, spacing, or option order can move accuracy by tens of points, which makes any single-format benchmark number a sample rather than a measurement. advanced 8m 15 cards