Home / CCA-F / Prompt Engineering / Advanced Prompt Techniques — Detail & Examples
DWG 4.2 — DETAIL & EXAMPLES

Advanced Prompt Techniques — Detail & Examples

Part of Prompt Engineering · overview: domain-4.html
In this page

A chain-of-thought worked example, a 3-step prompt chain, and how Plan Mode functions as a checkpoint on risky changes.

4.2aChain-of-thought, before and after

WORKED EXAMPLE · LETTING THE MODEL SHOW ITS WORK
TASKA multi-step word problem: "If a subscription is $12/month and a user upgrades to annual billing at a 20% discount, what's the annual price?"
  1. Without reasoning space, the model jumps straight to an answer, with no way to catch an arithmetic slip.
  2. With a step-by-step prompt, it works through: 12 × 12 = 144 (full annual cost) → 144 × 0.20 = 28.80 (discount amount) → 144 − 28.80 = 115.20.
  3. Because each intermediate step is visible, a wrong step is easy to spot and catch before it becomes the final answer.
Result:$115.20 — and each step of the calculation is independently checkable.

4.2bPrompt chaining across steps

PROMPT 1Extract all numeric figures and their labels from this quarterly report.
PROMPT 2 (uses output of 1)Given these labeled figures, calculate quarter-over-quarter percent change for each.
PROMPT 3 (uses output of 2)Write a 3-sentence executive summary of the trends in these percent changes.

Each step is small enough to verify on its own — a mistake in extraction is easy to catch before it propagates into a wrong percent-change calculation, which is easy to catch before it propagates into a wrong-sounding summary.

4.2cPlan Mode as a checkpoint

In Claude Code, asking for a risky multi-file refactor under direct execution means changes start landing immediately. Under Plan Mode, Claude first proposes which files it intends to touch and how, and waits for approval — the same checkpoint logic from Domain 1.4, applied specifically to code changes.


Claude Certified Architect — Study NotesDWG 4.2