What it is
The Prompt Engineering Guide is a repository of guides, papers, lectures, references and tools for prompt engineering with large language models. It covers introductory topics, prompting techniques, applications, a prompt hub, model pages, and risks and misuses. A web version is hosted at promptingguide.ai, and the guide can also be run locally with Node and pnpm.
Who it's for
- Developers designing prompting techniques that interface with LLMs and other tools
- Researchers using prompt engineering to improve LLM performance on tasks like question answering and arithmetic reasoning
- Learners who want a structured overview of prompting techniques, applications and tools
- Contributors who want to add or check translations of the guide
Requirements
Requirements
- Node >=18.0.0 (to run the guide locally)
- pnpm (to run the guide locally)
Setup
Install Node and pnpm
Install Node >=18.0.0, then install pnpm if it is not already on your system (see https://pnpm.io/installation).
Install dependencies
Install the packages needed to run the guide locally.
bashpnpm i next react react-dom nextra nextra-theme-docsStart the guide
Boot the guide, then browse it at http://localhost:3000/.
bashpnpm dev
Examples
Run the guide locally
bashpnpm i next react react-dom nextra nextra-theme-docs
pnpm devWhat it does: Installs the dependencies and starts the dev server; the guide is then available at http://localhost:3000/. Useful for checking a new translation.
Cite the guide
bibtex@article{Saravia_Prompt_Engineering_Guide_2022,
author = {Saravia, Elvis},
journal = {https://github.com/dair-ai/Prompt-Engineering-Guide},
month = {12},
title = {{Prompt Engineering Guide}},
year = {2022}
}What it does: BibTeX entry the README asks users to use when citing the guide in work or research.
Pros & cons
Pros
- Pro:Broad coverage: introduction, techniques (zero-shot, few-shot, chain-of-thought, RAG, ReAct and more), applications, prompt hub, models and risks
- Pro:Includes a 1-hour video lecture, a notebook with code and slides
- Pro:Available as a web version and can be run locally; MIT licensed
- Pro:Supports 13 languages and accepts translations
Cons
- Con:The README says the most up-to-date guides are on the website, so the repo content may lag
- Con:Local setup is documented only for contributors checking changes, with no other usage instructions
- Con:Some related courses are offered through a paid academy rather than in the repo