Open-source project
dair-ai/Prompt-Engineering-Guide avatar
dair-ai/Prompt-Engineering-Guide

Prompt Engineering Guide by DAIR.AI: What It Covers and How to Use It

GitHub describes it as 🐙 Guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.. The repository metadata lists MDX as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

78,721 stars8,652 forksMDXMIT

At a glance

What is it?
The Prompt Engineering Guide from DAIR.AI is a MIT-licensed MDX repository that collects techniques, papers, notebooks, and worked examples for prompting large language models. It is for researchers and developers who want a structured reference across prompting methods rather than the documentation of a single model provider.
Who is it for?
The Prompt Engineering Guide is the right starting point for a developer or researcher who wants a single place to read about the full range of prompting techniques, with citations to the original papers and worked examples. It is not a substitute for the model provider's own documentation when working with a specific API, because the guide's cross-model scope means it cannot track the latest features of any one model closely.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Activity is slowing. The repository last received commits 6 months ago.
What is it written in?
Mainly MDX, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

What the Prompt Engineering Guide is and who it addresses

The Prompt Engineering Guide is a reference collection for prompt engineering with large language models. The README describes the subject directly: "Prompt engineering is a relatively new discipline for developing and optimizing prompts to efficiently use language models for a wide variety of applications and research topics."

The guide is aimed at two groups. Researchers use it to find techniques that improve LLM performance on tasks like question answering and arithmetic reasoning. Developers use it to design prompting strategies that connect LLMs to other tools and build reliable application pipelines. The content spans introductory material through advanced techniques, covering both the concepts and the papers that introduced them.

The project is published as a website at promptingguide.ai. The repository is the source of that website. Readers who want to follow the guide without cloning anything can use the website directly. Those who want to contribute translations or corrections, or run the site locally, work through the repository.

How the repository is organised and what it contains

The top-level structure separates content by type. The `pages/` directory holds the primary English content in MDX format, the format used by the Nextra documentation framework that powers the site. The `ar-pages/` directory holds Arabic translations. The `guides/` directory contains additional guide files. The `notebooks/` directory holds Jupyter notebooks for hands-on examples. The `prompts/` directory contains the Prompt Hub examples organised by task type.

The guide is available in 13 languages according to the README. The MDX files in the repository are the source for the multilingual content displayed on the website.

The techniques section is the most referenced part of the guide. It covers: Zero-Shot Prompting, Few-Shot Prompting, Chain-of-Thought Prompting, Self-Consistency, Generate Knowledge Prompting, Prompt Chaining, Tree of Thoughts, Retrieval Augmented Generation, Automatic Reasoning and Tool-use, Automatic Prompt Engineer, Active-Prompt, Directional Stimulus Prompting, Program-Aided Language Models, ReAct Prompting, Multimodal Chain-of-Thought Prompting, and Graph Prompting. Each technique page links to the originating paper and includes usage examples.

The applications section addresses practical tasks: function calling, generating synthetic datasets for RAG, generating code, and a workplace case study for job classification. The Prompt Hub section organises ready-to-use prompt templates by task: classification, coding, evaluation, information extraction, image generation, mathematics, question answering, reasoning, text summarisation, and adversarial prompting.

Accessing the guide and running it locally

The primary access path is the website at https://www.promptingguide.ai/. No account is needed, and all content is free.

To run the site locally or contribute content, clone the repository and install dependencies. The site is a Next.js application using the Nextra docs theme, as shown in the package.json file in the repository. The scripts section of that file defines:

json
"scripts": {
  "dev": "next dev",
  "build": "next build",
  "start": "next start"
}

Running `npm run dev` starts a local development server. The repository uses `pnpm-lock.yaml` for lockfile management. The key dependencies from package.json include nextra 2.13.2 and next 13.5.6.

The `notebooks/` directory contains Jupyter notebooks for hands-on exploration of specific techniques. These are self-contained and can be run independently of the website. The README mentions that the guide is part of a broader set of resources also offered through DAIR.AI Academy as paid structured courses.

Chain-of-Thought, ReAct, and Tree of Thoughts: what the guide actually explains

The guide's most-referenced technique pages cover Chain-of-Thought (CoT) prompting, which demonstrates that asking a model to show its reasoning steps improves accuracy on tasks that require sequential logic. The guide covers both standard CoT and Multimodal CoT, which extends the technique to inputs that include images.

ReAct Prompting is documented as a technique that combines reasoning and acting: the model generates a thought, takes an action (such as a tool call or search), observes the result, and continues reasoning. The ReAct approach is foundational to many agent implementations and the guide covers it with reference to the original paper.

Tree of Thoughts (ToT) extends CoT by allowing the model to explore multiple reasoning paths and backtrack when one path fails, rather than committing to a single linear chain. The guide's coverage includes the core mechanism and when ToT offers an advantage over standard CoT: specifically, tasks that require exploration or where intermediate steps can be evaluated independently.

These three techniques represent the practical core of what most developers encounter when building LLM applications. The guide's value is not that it introduces these techniques (the original papers do that), but that it places them in a structured sequence with consistent notation and cross-references to related methods.

What the guide does not cover and where it falls short

The guide is model-agnostic and cross-model. It does not track the latest capabilities or context window sizes of any specific LLM. A developer working with a particular model provider's newest release will need to check that provider's documentation for current limits, supported features, and API changes. The guide covers principles that generalise; it cannot cover model-specific behaviour that changes with each release.

The last push to the main branch was on 2026-03-11. That is more than six months before this writing. The website at promptingguide.ai may reflect updates that have not been pushed to the repository, but the repository itself has not received commits recently. Techniques introduced after that date are not documented here.

The guide does not include evaluation benchmarks comparing the techniques it describes. It presents the methods and refers to their originating papers, but does not include systematic comparisons of which technique performs better on which task type. A developer choosing between Tree of Thoughts and ReAct for a specific problem will need to look at the referenced papers or run their own experiments.

Prompt Engineering Guide versus model provider documentation

The major model providers (OpenAI, Google, Anthropic) each maintain their own prompting documentation. Provider documentation is current with that model's latest features, covers provider-specific parameters, and is updated when the model's behaviour changes. It is the authoritative reference for a single model.

The Prompt Engineering Guide is different in scope and purpose. It covers techniques that work across models, introduces academic papers that formalised each approach, and organises them by mechanism (zero-shot, few-shot, chain-of-thought, agent-based). It reached 3 million learners as of January 2024 according to the README, and supports 13 languages, which provider documentation typically does not.

The practical difference for a developer: provider documentation tells you how to use a specific API and which parameters to set. The DAIR.AI guide tells you what class of prompting technique to use and why, independent of which provider you end up calling. Starting with the guide to understand the landscape and then using provider documentation for implementation details is a reasonable sequence.

Editorial conclusion

The Prompt Engineering Guide is the right starting point for a developer or researcher who wants a single place to read about the full range of prompting techniques, with citations to the original papers and worked examples. It is not a substitute for the model provider's own documentation when working with a specific API, because the guide's cross-model scope means it cannot track the latest features of any one model closely. The last push to the main branch was on 2026-03-11, which is more than six months before this writing, and no GitHub releases exist. The most current content is at promptingguide.ai; the repository itself should be treated as the source of the website, not as an always-current reference.

Frequently asked questions

How should I learn prompt engineering?

The Prompt Engineering Guide at promptingguide.ai organises techniques from introductory basics through advanced methods like Chain-of-Thought, ReAct, and Tree of Thoughts, with references to the originating papers. DAIR.AI also offers structured paid courses through DAIR.AI Academy for a more guided learning path.

What techniques does the Prompt Engineering Guide cover?

The guide covers 16-plus techniques including Zero-Shot, Few-Shot, Chain-of-Thought, Self-Consistency, Prompt Chaining, Tree of Thoughts, Retrieval Augmented Generation, ReAct, Automatic Prompt Engineer, Program-Aided Language Models, and Graph Prompting, each with references to the originating paper.

Does the Prompt Engineering Guide cover RAG and AI Agents?

The guide covers Retrieval Augmented Generation as a prompting technique and includes ReAct Prompting, which is the foundational pattern for agent reasoning and tool use. The repository description explicitly lists prompt engineering, context engineering, RAG, and AI Agents as topics.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/dair-ai-prompt-engineering-guide.svg)](https://hysenlabs.com/projects/dair-ai-prompt-engineering-guide)
Community notes

Community notes