Certification
    June 9, 2026

    CCA · Page 5 — Domain 4: Prompt Engineering & Structured Output

    Exam-ready notes for CCA Foundations Domain 4 (20%): explicit criteria, few-shot prompting, JSON schemas, the Message Batches API, and prompt chaining.

    Share

    Domain 4 — Prompt Engineering & Structured Output

    CCA Foundations course · Page 5 of 8 · ← Back to all courses · Weight: 20%. Mark complete at the bottom to advance.


    4.1 — Explicit Criteria Over Vague Instructions · Core

    • Use categorical inclusion + exclusion lists ("flag X; never flag Y") — not "be conservative".
    • False-positive trust cascade: one noisy category undermines trust in accurate ones → disable the bad category first, fix its prompt separately.
    • Severity calibration with concrete code examples per level.

    4.2 — Few-Shot Prompting · Core

    • Show the reasoning, not just the answer.
    • 2–4 examples, on ambiguous cases only.
    • Five useful types: ambiguous · format · positive-negative · varied-structure · informal.

    4.3 — JSON Schemas & Structured Output · Core

    • Nullable fields + remove them from required → prevents the model fabricating values to satisfy the schema.
    • Add "unclear" / "other" enum values for ambiguous cases.
    • Self-correction fields: extract stated_total and calculated_total, plus a conflict_detected boolean.

    4.5 — Message Batches API · Core

    • 50% cost savings, 24-hour window, NO latency SLA, NO multi-turn tools.
    • custom_id correlates requests and enables failure resubmission.
    • Use the synchronous API if anyone is waiting on the result, or if tool loops are needed.

    4.6 — Prompt Chaining & Multi-Instance Review · Core

    • Attention dilution beyond ~14 files → split into per-file passes + a cross-file integration pass.
    • Pydantic retry only for format/structural errors — NOT when data is simply absent from the source.

    ⚠ Often-missed — Multi-Instance Verification Architecture (VIP routing) · Gap

    • Pass 1 generates; Pass 2 is an independent instance that verifies and outputs a confidence score.
    • Route on that score: send / human_review / regenerate.
    • Use tiered thresholds per customer segment.

    Exam reflexes for Domain 4

    • "Absent data causing retry loop" → nullable fields + remove from required.
    • "Conflicting / can't-sum totals" → self-correction fields (calculated_total, conflict_detected).
    • "High volume, can wait" → Batches API (50% / 24h / no SLA / no tools).
    • "Self-review bias" → independent instance, zero prior context.
    • "Misrouting" → fix descriptions, not few-shot (Domain 2).

    Ask about this article

    Get answers grounded in this post. AI-generated — based on this article, and may be imperfect.

    Free: CCA Foundations cheat-sheet (PDF)

    The domains, the 3 universal rules, core concepts, and exam-day shortcuts — one page. Enter your email and it's yours, plus my weekly AI-architecture notes.

    No spam. Unsubscribe any time.

    Scaled AI Weekly

    Enjoyed this? Get more like it every Monday.

    Real architecture decisions, LLMOps patterns that survive production, and engineering leadership advice — from 12+ years of building at enterprise scale. Free. No spam. Unsubscribe anytime.

    Join engineers building production AI systems

    Comments