Cognitive Orchestration

Free preview · Lesson 2

Prompt Engineering

Once a model is in front of you, the quality of what you get back depends heavily on how you ask. Prompt engineering is the practice of structuring requests — instructions, examples, and format — so the model reliably produces what you need.

What you'll take away
  • Apply the core prompting patterns: clear instructions, few-shot, chain-of-thought, and structured output.
  • Explain why prompting alone breaks down once work spans many turns, tools, and documents.

Once a model is in front of you, the quality of what you get back depends heavily on how you ask. Prompt engineering is the practice of structuring requests — instructions, examples, and format — so the model reliably produces what you need.

The techniques that matter

A few patterns recur across every serious guide:

Technique

What it does

Clear instructions & role

State the task, audience, and output format explicitly

Few-shot examples

Show 1–5 worked examples so the model imitates the pattern

Chain-of-thought

Ask the model to reason step by step before answering

Structured output

Request JSON, XML tags, or a fixed schema for downstream use

Chain-of-thought prompting — first shown by Wei et al. (2022) — was a watershed: simply asking a model to "think step by step" markedly improved arithmetic and reasoning accuracy. The 2024 Prompt Report later catalogued dozens of such techniques into a single taxonomy.

Example. "Summarise this contract" is a weak prompt. "You are a paralegal. List the three obligations, two termination clauses, and any auto-renewal in a markdown table; quote the clause text" is a strong one — role, task, structure, and grounding in one breath.

Why it is not enough

Prompt engineering optimises a single message. As soon as work spans many turns, tools, and documents, the bottleneck moves from "the prompt" to "everything else in the window" — which is exactly why context engineering emerged. Prompting remains foundational, but it is the first technique, not the last.

References & further reading