---
title: Prompt Engineering Techniques Guide
description: A reference guide to established prompt engineering techniques — zero-shot, few-shot, chain-of-thought, ReAct, RAG, and more — with when to use them, how they work, and canonical sources.
canonical: https://prompeteer.ai/techniques
---

# Prompt Engineering Techniques Guide

A reference guide to established prompt engineering techniques — zero-shot, few-shot, chain-of-thought, ReAct, RAG, and more — with when to use them, how they work, and canonical sources.

## Foundational patterns

- [Zero-Shot Prompting](https://prompeteer.ai/techniques/zero-shot-prompting) — Zero-shot prompting asks a model to perform a task from an instruction alone, with no worked examples. It relies entirely on knowledge the model already learned during pre-training and instruction tuning.
- [Few-Shot Prompting](https://prompeteer.ai/techniques/few-shot-prompting) — Few-shot prompting includes a handful of solved input–output examples in the prompt so the model infers the pattern and applies it to a new input. It steers format and behavior without any fine-tuning.
- [Role / Persona Prompting](https://prompeteer.ai/techniques/role-prompting) — Role prompting assigns the model a persona or expertise ("You are an experienced editor…") to steer tone, vocabulary, and priorities. It sets consistent context for how the model should approach the task.
- [Few-Shot Example Selection](https://prompeteer.ai/techniques/few-shot-example-selection) — Which examples you include in a few-shot prompt — and their order — strongly affects results. Choosing relevant, representative, well-balanced examples (often ones similar to the input) outperforms picking them at random.

## Reasoning & decomposition

- [Chain-of-Thought Prompting](https://prompeteer.ai/techniques/chain-of-thought) — Chain-of-thought prompting asks the model to work through intermediate reasoning steps before giving a final answer. Making the reasoning explicit substantially improves performance on arithmetic, commonsense, and multi-step problems.
- [Self-Consistency](https://prompeteer.ai/techniques/self-consistency) — Self-consistency samples several independent chain-of-thought answers and takes the majority result. Averaging over diverse reasoning paths corrects individual mistakes and improves accuracy over a single greedy chain.
- [Task Decomposition](https://prompeteer.ai/techniques/task-decomposition) — Task decomposition breaks a hard problem into smaller sub-problems the model solves in order, then combines. Structuring the work — as in least-to-most prompting — improves accuracy on problems too complex to solve in one pass.

## Agentic & tool use

- [ReAct (Reason + Act)](https://prompeteer.ai/techniques/react) — ReAct interleaves reasoning traces with tool actions, letting a model think, act, observe the result, and think again. This loop grounds reasoning in real information and reduces hallucination on tasks needing external data.
- [Prompt Chaining](https://prompeteer.ai/techniques/prompt-chaining) — Prompt chaining splits a complex job into a sequence of prompts where each step's output feeds the next. Smaller, focused calls are more reliable and easier to debug than one monolithic prompt.

## Output control & formatting

- [Structured / JSON Output](https://prompeteer.ai/techniques/structured-output) — Structured output constrains the model to emit machine-readable data — usually JSON matching a schema — so responses integrate reliably with code. Modern APIs can enforce the schema so every response parses.
- [System Prompts](https://prompeteer.ai/techniques/system-prompts) — A system prompt sets durable instructions — role, rules, format, and boundaries — that apply across the whole conversation. It governs behavior more reliably than instructions buried in a single user message.
- [Constraint & Negative Prompting](https://prompeteer.ai/techniques/constraint-prompting) — Constraint prompting states explicit rules and boundaries — what to include, avoid, and how to format — so output stays within limits. Positive, specific constraints steer models more reliably than vague "don't" instructions.
- [Temperature & Sampling Control](https://prompeteer.ai/techniques/sampling-control) — Temperature, top-p, and related decoding parameters control randomness in generation. Lower values make output focused and deterministic; higher values increase diversity and creativity at the cost of consistency.

## Grounding & context

- [Retrieval-Augmented Generation (RAG)](https://prompeteer.ai/techniques/retrieval-augmented-generation) — RAG retrieves relevant documents from an external source and adds them to the prompt so the model answers from that evidence. It grounds responses in current, private, or authoritative data and cuts hallucination.
- [Context Engineering](https://prompeteer.ai/techniques/context-engineering) — Context engineering is the discipline of curating everything in the model's context window — instructions, examples, retrieved data, tools, and history — so the right information is present, relevant, and not crowded out.
