站内导读
中文 这是一份面向 LLM 的 Prompt Engineering 指南,汇集论文、教程与工具,说明提示设计如何影响问答、算术推理等任务表现。内容覆盖 Zero-Shot、Few-Shot、CoT、RAG、ReAct 等技巧,并延伸到函数调用与数据生成等应用场景。适合研究者与开发者系统查阅。
日本語 LLM向けプロンプトエンジニアリングのガイドで、論文・学習資料・ツールをまとめています。プロンプト設計が質問応答や算術推論などの性能に与える影響を解説し、Zero-Shot、Few-Shot、CoT、RAG、ReActなどの手法と関数呼び出しやデータ生成の応用例を扱います。研究者や開発者の参照用です。
한국어 LLM을 위한 프롬프트 엔지니어링 가이드로, 논문과 학습 자료, 도구를 모아 정리했습니다. 프롬프트 설계가 질의응답과 산술 추론 같은 작업 성능에 미치는 영향을 설명하고, Zero-Shot, Few-Shot, CoT, RAG, ReAct 기법과 함수 호출, 데이터 생성 응용 사례를 다룹니다. 연구자와 개발자가 참고하기 적합합니다.
English A guide to prompt engineering for LLMs that collects papers, learning materials, and tools. It explains how prompt design affects tasks such as question answering and arithmetic reasoning, covering Zero-Shot, Few-Shot, CoT, RAG, and ReAct, plus applications like function calling and data generation. Suited to researchers and developers.
README · 详细文档
来源 · 查看原文
Prompt Engineering Guide
<h5 align="center"> Sponsored by <a href="https://serpapi.com/"><img src="https://cdn.rawgit.com/standard/standard/master/docs/logos/serpapi.png" height=35 valign="middle"></a> </h5>
Prompt engineering is a relatively new discipline for developing and optimizing prompts to efficiently use language models (LMs) for a wide variety of applications and research topics. Prompt engineering skills help to better understand the capabilities and limitations of large language models (LLMs). Researchers use prompt engineering to improve the capacity of LLMs on a wide range of common and complex tasks such as question answering and arithmetic reasoning. Developers use prompt engineering to design robust and effective prompting techniques that interface with LLMs and other tools.
Motivated by the high interest in developing with LLMs, we have created this new prompt engineering guide that contains all the latest papers, learning guides, lectures, references, and tools related to prompt engineering for LLMs.
🌐 Prompt Engineering Guide (Web Version)
🎉 We are excited to launch our new prompt engineering, RAG, and AI Agents courses under the DAIR.AI Academy. Join Now!
The courses are meant to compliment this guide and provide a more hands-on approach to learning about prompt engineering, context engineering, and AI Agents.
Use code PROMPTING20 to get an extra 20% off.
Happy Prompting!
Announcements / Updates
- 🎓 We now offer self-paced prompt engineering courses under our DAIR.AI Academy. Join Now!
- 🎓 New course on Prompt Engineering for LLMs announced! Enroll here!
- 💼 We now offer several services like corporate training, consulting, and talks.
- 🌐 We now support 13 languages! Welcoming more translations.
- 👩🎓 We crossed 3 million learners in January 2024!
- 🎉 We have launched a new web version of the guide here
- 🔥 We reached #1 on Hacker News on 21 Feb 2023
- 🎉 The First Prompt Engineering Lecture went live here
Guides
You can also find the most up-to-date guides on our new website https://www.promptingguide.ai/.
- Prompt Engineering - LLM Settings - Prompt Engineering - Basics of Prompting - Prompt Engineering - Prompt Elements - Prompt Engineering - General Tips for Designing Prompts - Prompt Engineering - Examples of Prompts
- Prompt Engineering - Zero-Shot Prompting - Prompt Engineering - Few-Shot Prompting - Prompt Engineering - Chain-of-Thought Prompting - Prompt Engineering - Self-Consistency - Prompt Engineering - Generate Knowledge Prompting - Prompt Engineering - Prompt Chaining - Prompt Engineering - Tree of Thoughts (ToT) - Prompt Engineering - Retrieval Augmented Generation - Prompt Engineering - Automatic Reasoning and Tool-use (ART) - Prompt Engineering - Automatic Prompt Engineer - Prompt Engineering - Active-Prompt - Prompt Engineering - Directional Stimulus Prompting - Prompt Engineering - Program-Aided Language Models - Prompt Engineering - ReAct Prompting - Prompt Engineering - Multimodal CoT Prompting - Prompt Engineering - Graph Prompting
- Prompt Engineering - Function Calling - Prompt Engineering - Generating Data - Prompt Engineering - Generating Synthetic Dataset for RAG - Prompt Engineering - Takling Generated Datasets Diversity - Prompt Engineering - Generating Code - Prompt Engineering - Graduate Job Classification Case Study
- Prompt Engineering - Classification - Prompt Engineering - Coding - Prompt Engineering - Creativity - Prompt Engineering - Evaluation - Prompt Engineering - Information Extraction - Prompt Engineering - Image Generation - Prompt Engineering - Mathematics - Prompt Engineering - Question Answering - Prompt Engineering - Reasoning - Prompt Engineering - Text Summarization - Prompt Engineering - Truthfulness - Prompt Engineering - Adversarial Prompting
- Prompt Engineering - ChatGPT - Prompt Engineering - Code Llama - Prompt Engineering - Flan - Prompt Engineering - Gemini - Prompt Engineering - GPT-4 - Prompt Engineering - LLaMA - Prompt Engineering - Mistral 7B - Prompt Engineering - Mixtral - Prompt Engineering - OLMo - Prompt Engineering - Phi-2 - Prompt Engineering - Model Collection
- Prompt Engineering - Adversarial Prompting - Prompt Engineering - Factuality - Prompt Engineering - Biases
- Prompt Engineering - Overviews - Prompt Engineering - Approaches - Prompt Engineering - Applications - Prompt Engineering - Collections
- Prompt Engineering - Tools
- Prompt Engineering - Notebooks
- Prompt Engineering - Datasets
- Prompt Engineering - Additional Readings
Lecture
We have published a 1 hour lecture that provides a comprehensive overview of prompting techniques, applications, and tools.
Running the guide locally
To run the guide locally, for example to check the correct implementation of a new translation, you will need to:
- Install Node >=18.0.0
- Install
pnpmif not present in your system. Check here for detailed instructions. - Install the dependencies:
pnpm i next react react-dom nextra nextra-theme-docs - Boot the guide with
pnpm dev - Browse the guide at
http://localhost:3000/
Appearances
Some places where we have been featured:
- Wall Street Journal - ChatGPT Can Give Great Answers. But Only If You Know How to Ask the Right Question
- Forbes - Mom, Dad, I Want To Be A Prompt Engineer
- Markettechpost - Best Free Prompt Engineering Resources (2023)
If you are using the guide for your work or research, please cite us as follows:
@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}
}
License
Feel free to open a PR if you think something is missing here. Always welcome feedback and suggestions. Just open an issue!