Skip to main content

Prompt Engineering Guide

Free open-source guide to prompting LLMs, from DAIR.AI: basics, techniques like chain-of-thought and RAG, agents, context engineering, model notes and risks. Available in 13 languages.

Visit website

About Prompt Engineering Guide

Prompt Engineering Guide is a free, open-source reference on how to work with large language models. It was started by DAIR.AI, and the guide itself is maintained in a public GitHub repository.

What it covers

  • Basics: prompt elements, general design tips and worked examples.
  • Techniques: zero-shot and few-shot prompting, chain-of-thought, self-consistency, prompt chaining, tree of thoughts, retrieval-augmented generation (RAG), ReAct, program-aided models and more. Each comes with a short explanation and links to the original papers.
  • Agents and context engineering: agent components, workflows vs. agents, function calling, and context engineering for AI agents.
  • Applications: generating data, generating code, classification and other case studies.
  • Model notes: pages on major model families, plus a collection of LLMs.
  • Risks: prompt injection, prompt leaking, jailbreaking, bias and factuality, and summaries of recent LLM research.

Notes

  • The guide is translated into 13 languages, including Chinese (/zh).
  • DAIR.AI also sells paid courses through DAIR.AI Academy, which the site promotes in a banner. The guide itself stays free.

Good for

Anyone who wants a structured, citation-backed overview of prompting techniques, from beginners to developers building LLM apps. For a deeper machine-learning foundation, see Dive into Deep Learning.

Similar sites

Khan Academy

Free world-class lessons in maths, science and more.

Coursera

University courses and certificates; audit many for free.

freeCodeCamp

Learn to code with free interactive curriculum and certifications.

Duolingo

Gamified language learning that builds a daily habit.