D4 · domain126 questions · 30 free

Prompt Engineering & Structured Output (D4)

Prompting techniques, structured outputs, JSON schema, few-shot.

Prompt Engineering & Structured Output (D4) is the craft of getting precise, machine-usable answers out of Claude: explicit criteria, few-shot examples, and JSON-schema-enforced output you can trust downstream. The exam tests whether your prompts hold up under real data, not just happy-path demos.

Expect questions on designing prompts with explicit criteria to cut false positives, few-shot prompting for consistency, enforcing structured output with tool use and JSON schemas, building validation, retry, and feedback loops for extraction quality, efficient batch processing, and multi-instance or multi-pass review architectures.

This domain spans 6 subtopic areas, covered by 126 practice questions across 31 easy, 65 medium, and 30 hard items.

Start practicing — 30 freeSee a sample question ↓
Sample question · free
EasyD4 · 4.1S5 · Claude Code in CI/CD

Your CI/CD pipeline posts Claude Code feedback as PR comments, but reviewers complain that 30% flag valid code as problematic. What prompt change most directly reduces these false positives?

Try it interactively →

What's covered

Subtopic areas in Prompt Engineering & Structured Output, drawn from the exam blueprint: