Prompt Engineering Guide
by DAIR.AI
Eighteen named prompting techniques, each linked back to the paper it came from.
Overview
The Prompt Engineering Guide is maintained by DAIR.AI and published both as a website and as an MIT-licensed GitHub repository with more than 77,000 stars, making it one of the largest open AI-education projects in existence. The site is organised into around fourteen top-level sections: Introduction, Prompting Techniques, AI Agents, Guides, Applications, Prompt Hub, Models, Risks & Misuses, LLM Research Findings, Papers, Tools, Notebooks, Datasets and Additional Readings. The Introduction covers LLM settings such as temperature and top-p, the elements of a prompt, and general design tips. The Prompting Techniques section is the core and documents eighteen named methods in a consistent format: zero-shot, few-shot, chain-of-thought, meta prompting, self-consistency, generate-knowledge, prompt chaining, tree of thoughts, retrieval-augmented generation, automatic reasoning and tool-use, automatic prompt engineer, active-prompt, directional stimulus, program-aided language models, ReAct, reflexion, multimodal chain-of-thought and graph prompting. Applications covers fine-tuning, function calling, code generation and synthetic data generation; the Prompt Hub is a browsable library of worked prompts grouped by classification, coding, creativity, mathematics and reasoning; the Models section profiles more than twenty model families. The repository is translated into thirteen languages, and DAIR.AI additionally sells self-paced courses through its academy, but the guide, the notebooks and the paper index are entirely free.
At a Glance
- Topic
- Models
- Level
- All Levels
- Format
- Guide
- Cost
- Free
- Duration
- ~6-10 hours to read end to end; used as a reference thereafter
- Provider
- DAIR.AI
- Hands-on
- Yes — code/exercises
- Certificate
- None
What You’ll Learn
- ✓Tune temperature, top-p and other settings before blaming the prompt itself
- ✓Apply eighteen named prompting techniques and know when each one fits
- ✓Move from zero-shot to few-shot to chain-of-thought deliberately rather than by guesswork
- ✓Build retrieval-augmented generation and tool-use prompts from documented patterns
- ✓Recognise prompt injection, jailbreaking and other adversarial misuse patterns
- ✓Adapt prompts across model families using the per-model guides
- ✓Use the Prompt Hub's worked examples as starting points for your own tasks
Highlights
- •77.4k GitHub stars and MIT licensed, so it can be forked as internal training material
- •Each technique links the paper it came from, letting you go straight to the primary source
- •Kept current with new techniques and model releases rather than frozen at 2023
- •Runnable notebooks and a datasets section, not prose alone
- •Available in thirteen languages, which is rare for material at this depth
Who It’s For
Best For
- ✓Engineers who have been prompting by intuition and want the named techniques
- ✓Teams writing internal prompting standards or onboarding material
- ✓Anyone who needs the paper behind a technique, not just the recipe
- ✓Developers moving an existing prompt set between model families
Prerequisites
- •None for the introduction: it starts from what a prompt is
- •Python and notebook familiarity for the hands-on notebooks
- •API access to an LLM in order to try the examples
FAQ
What is Prompt Engineering Guide?
DAIR.AI's continuously updated reference for prompt engineering, and one of the most-used AI learning resources on GitHub at over 77,000 stars. It covers eighteen named prompting techniques from zero-shot through tree of thoughts and ReAct, plus retrieval-augmented generation, AI agents, function calling, model-specific guides, adversarial risks, notebooks and a searchable hub of example prompts.
Is Prompt Engineering Guide free?
Prompt Engineering Guide is free to access.
What level is Prompt Engineering Guide for?
Prompt Engineering Guide is aimed at a all levels audience. Recommended background: None for the introduction: it starts from what a prompt is, Python and notebook familiarity for the hands-on notebooks, API access to an LLM in order to try the examples.
How long does Prompt Engineering Guide take?
Expect roughly ~6-10 hours to read end to end; used as a reference thereafter. Most learners work through it at their own pace.
What will I learn from Prompt Engineering Guide?
You'll learn: Tune temperature, top-p and other settings before blaming the prompt itself; Apply eighteen named prompting techniques and know when each one fits; Move from zero-shot to few-shot to chain-of-thought deliberately rather than by guesswork; Build retrieval-augmented generation and tool-use prompts from documented patterns; Recognise prompt injection, jailbreaking and other adversarial misuse patterns; Adapt prompts across model families using the per-model guides; Use the Prompt Hub's worked examples as starting points for your own tasks.
Topics
Sources
This page was written from 3 sources, 1 on domains other than promptingguide.ai.