Skip to content
Claude Certified Architect – Professional (CCAR-P) Exam Prep

Lesson 9 of 31 · 7 min

x
9/31

Prompt Engineering Techniques

Video lesson: CCAR-P 09/31: Prompt Engineering Techniques

Detail on criteria and examples: explicit criteria and few shot prompting. This note is the architect's catalogue.

Techniques (verified, from Anthropic's prompting guide)

TechniqueGuidance
Clear and directExplicit instructions; request "above and beyond" behaviour explicitly
Context and motivationState why, so Claude generalises
Examples3 to 5, relevant, diverse, in <example> tags
XML structureSeparate instructions, context, examples and inputs with consistent tags
RoleUseful in the system prompt; specifics matter more
Long contextDocuments at the top, query at the end (up to 30% better on complex multi-document input)
Thinking and effortAdaptive thinking; effort levels low, medium, high, xhigh, max; default effort varies by model
Output controlSay what to do, not only what not to do; specify format; structured outputs for schemas
ChainingExplicit chains when you need intermediate outputs or a fixed pipeline; self-correction chain: draft, review, refine
Tool useClear tool descriptions; parallel tool calling guidance; investigate before answering
Hallucination controlAllow "I don't know", extract quotes first for long documents, verify claims with citations

Obsolete or changed

  • Prefilled assistant responses are not supported on newer models (400 error); migrate to direct instructions, structured outputs or tool calling.
  • Techniques from older model generations may overtrigger or underperform; check the model-specific guidance and migration notes.

Thinking, effort and cost

Thinking tokens are billed as output tokens and count toward the context window. Effort is a primary cost and latency lever: Anthropic's tests found running at low effort and re-running failures at high gave about 40% lower cost than everything at high at the same pass rate when outputs can be checked (verified, directional) (D3.3).

Agentic prompting cautions

  • Newer models may over-delegate to subagents and may be overeager; add explicit guidance on scope and when to delegate.
  • Tell the model it is allowed to investigate before answering; do not claim things about code you have not opened.
  • Do not focus on passing tests by hard-coding; verify behaviour.

Choosing techniques (design guidance)

Start with clear, explicit instructions and a few good examples; add structure (XML) when prompts mix content types; add chaining or subagents only when one call is not enough; add schema-constrained output when a program consumes the result; measure each change against an evaluation set (D4.1).

Exam traps

  • Relying on prefill for format control.
  • Stuffing contradictory instructions.
  • More examples that are all alike.
  • Maximum effort everywhere with no measurement.
  • Ignoring model-specific guidance after an upgrade.

References

  1. Prompting best practices — checked Oct 16, 2026
  2. Reduce hallucinations — checked Oct 16, 2026
  3. Optimizing for cost and intelligence — checked Oct 16, 2026

Check your understanding

  • Prefill used to force JSON on a new model returns 400. Replacement?Show answer

    Answer

    Structured outputs (or tool calling).
  • Where do long documents go relative to the question?Show answer

    Answer

    Documents first, question last.
  • A cheap way to cut cost while keeping pass rate when outputs are checkable?Show answer

    Answer

    Run at lower effort and re-run failures at higher effort.
Previous

Progress is saved in this browser.

Next Lesson