Core Prompting Techniques
Few-shot, zero-shot, role prompting, and structured prompting patterns.
Delimiter and Markup Strategies
Using structural delimiters — XML tags, markdown headers, triple quotes, and custom markers — to separate prompt sections improves model comprehension by 15-20%, enables reliable parsing, and is the foundation of professional prompt layout.
Few-Shot Prompting
Few-shot prompting provides 3-8 input-output examples in the prompt to demonstrate the desired task, leveraging in-context learning to improve output quality, format consistency, and task comprehension beyond what instructions alone achieve.
Instruction Prompting
Instruction prompting uses clear, specific, actionable directives to guide model behavior, where the specificity gradient — from vague (“summarize”) to precise (“summarize in 3 bullet points of max 20 words each”) — directly determines output quality and consistency.
Many-Shot Prompting
Many-shot prompting uses 20-500+ examples in long-context models, approaching fine-tuning quality on some tasks while preserving the flexibility of in-context learning, with most gains realized by around 50 examples.
Negative Prompting and Constraints
Telling an LLM what NOT to do (“do not hallucinate”) is systematically less effective than telling it what TO do (“only cite provided sources”), because negation is processed less reliably by attention mechanisms and can paradoxically increase the unwanted behavior.
Prefilling and Output Priming
Prefilling starts the assistant’s response with predetermined text — such as { for JSON or Step 1: for structured reasoning — exploiting the autoregressive generation mechanism to dramatically improve output format compliance and quality.
Prompt Chaining
Prompt chaining decomposes complex tasks into sequential LLM calls where the output of one prompt becomes the input to the next, enabling tasks too complex for a single prompt while introducing error propagation that must be managed through validation gates.
Prompt Templates and Variables
Prompt templates are reusable prompt structures with {variable} slots that separate the static prompt logic from dynamic content, enabling consistent, maintainable, and testable prompt engineering at production scale.
Role and Persona Prompting
Assigning the model a specific role or persona (“You are an expert tax attorney…”) activates domain-relevant knowledge clusters, producing measurably better output on domain-specific tasks with 10-20% quality improvements, while the design spectrum ranges from light framing to detailed character sheets.
Zero-Shot Prompting
Zero-shot prompting provides only instructions — no examples — relying entirely on the model’s pretrained knowledge and instruction tuning to perform a task, and works best for well-defined tasks on capable, instruction-tuned models.