Prompt Component Taxonomy

A prompt can be decomposed into six distinct functional components, each serving a specific purpose in directing model behavior:

Directive: The core instruction or question, what you want the model to do.

Examples (Exemplars): Input-output pairs demonstrating the desired behavior. The foundation of few-shot prompting.

Output Formatting: Specifications for structure (JSON, markdown, CSV, specific schemas. Structural rather than stylistic.

Style Instructions: Modifications to tone, voice, or presentation, stylistic rather than structural.

Role (Persona): An identity frame for the model to adopt, often improving domain-specific outputs.

Additional Information: Context, constraints, or background knowledge needed to complete the task. Sometimes called “context” though this term is overloaded in the prompting space.

Not every prompt requires all components. The art is knowing which components add value for a given task.

Related: 05-atom—in-context-learning-definition, 05-molecule—exemplar-design-principles