Reference

Prompt glossary

7 exam-critical terms in the Prompt category. See all categories →

AllAPIAgenticPromptClaude CodeTool DesignMCPContext

Chain of thought (CoT)

Prompt

Prompt technique asking the model to reason step by step (often in <thinking> tags) before producing the answer. Improves accuracy on reasoning tasks; costs tokens.

Few-shot

Prompt

Prompt pattern: include 2-5 input/output examples in <example> tags. Beats detailed instructions for classification, format, and edge cases.

XML tags

Prompt

Structural delimiters Claude is trained to recognize: <instructions>, <example>, <document>, <output_format>. Partition long prompts unambiguously.

Structured output

Prompt

Reliable way to get JSON: define a tool whose input_schema matches your desired JSON, then use tool_choice to force it. Schema is server-enforced.

Nullable field

Prompt

Schema pattern: fields that may not exist in source documents should be nullable, so Claude doesn't fabricate to fill a required field.

Prompt caching

Prompt

Mark stable prompt prefixes with cache_control: ephemeral. Subsequent calls within TTL reuse cached compute at reduced cost and latency. Dynamic content must go AFTER the cached prefix.

Independent review

Prompt

Fresh Claude instance with a reviewer prompt reviews another instance's output. More effective than self-review because it doesn't share the generator's assumptions.