Prompt Engineering Guide

Stale
GitHub MDX MIT

Description

Comprehensive guides, papers, lessons, notebooks and resources for prompt engineering, context engineering, RAG, and AI Agents.

Key Features

  • Prompt engineering techniques - systematic coverage of Zero-Shot, Few-Shot, Chain-of-Thought, Tree of Thoughts and other core methods
  • RAG and tool-use guides - detailed coverage of Retrieval Augmented Generation, ART, ReAct and other reasoning-with-tools techniques
  • Model-specific guides - dedicated prompting strategies for ChatGPT, GPT-4, LLaMA, Gemini, Mistral, Code Llama and more
  • Application template library - prompt templates for classification, coding, math reasoning, summarization, image generation, information extraction
  • Multi-language support - available in 13 languages serving over 3 million learners as a global knowledge resource
  • Adversarial prompting and safety - covers prompt injection, jailbreaking attacks and defense strategies

Use Cases

💡 Beginners systematically learning prompt engineering from scratch to master core LLM interaction techniques
💡 Developers referencing prompt templates in production projects for classification, summarization, code generation tasks
💡 Researchers tracking the latest prompt engineering papers and methods like CoT, ToT, RAG
💡 Enterprise teams conducting LLM application training to unify and elevate prompt engineering skills
💡 AI safety researchers studying adversarial prompting techniques to evaluate and improve model robustness

Strengths & Limitations

Strengths

  • High community interest (78.0k stars)
  • Permissive open-source license (MIT)
  • Established track record (3 years in production)
  • Responsive to issues, low backlog

Categories

Quick Start

# Clone the prompt engineering guide repository
git clone https://github.com/dair-ai/Prompt-Engineering-Guide.git
cd Prompt-Engineering-Guide

# Online version (recommended) - visit directly:
# https://www.promptingguide.ai/

# Run the docs site locally
npm install
npm run dev

Related Projects

LLocalSearch

5.9k · Go
Stale B

A completely locally running search aggregator using LLM agents. Users can ask questions and the system uses a chain of LLMs to find answers without any external API keys.

goagentrag +2
  • · Completely local operation with no API keys required — full privacy protection
  • · Recursive LLM agent chain for multi-step internet search and reasoning
  • · Live logs and source links providing transparency into agent reasoning

Scira

11.9k · TypeScript
Active A+

A minimalistic AI-powered search engine that helps you find information on the internet and cites it too. Powered by Vercel AI SDK.

typescriptllmrag +3
  • · Agentic research platform with multi-step planning that breaks complex questions into sub-tasks
  • · 17 search modes including Web, Academic, GitHub, Reddit, Stocks, Crypto, YouTube, and X (Twitter)
  • · 28 integrated tools for search, financial data, location, media, code execution, and file query

MemAgent

1.1k · Python
Stale B

A MemAgent framework that can extrapolate to 3.5M context tokens, along with a training framework for RL training of any agent workflow.

memoryagentrag +2
  • · Ultra-Long Context Processing: Extrapolate from 8K training context to 3.5M tokens with performance loss under 5%
  • · Reinforcement Learning Driven: Trained with RLVR (Reinforcement Learning from Verifiable Rewards), extends DAPO algorithm for end-to-end multi-turn conversation optimization
  • · Linear Time Complexity: Breaks through computational bottlenecks in long-text processing with linear resource scaling

Vane

36.6k · TypeScript
Active A+

An AI-powered answering engine with multi-model integration, web search and local knowledge base, providing a Perplexity-like search experience.

ragtypescriptllm +2
  • · Multi-model LLM support — Use local models via Ollama or connect to OpenAI, Anthropic Claude, Google Gemini, Groq and more
  • · SearxNG privacy search — Integrates SearxNG meta search engine aggregating multiple search providers without tracking identity
  • · Smart search modes — Speed Mode for quick answers, Balanced Mode for daily searches, Quality Mode for deep research