docs: make Chinese README the default
This commit is contained in:
@@ -1,92 +1,99 @@
|
||||
# Prompt Engineering Guide
|
||||
<!-- WEHUB_ZH_README -->
|
||||
> [!NOTE]
|
||||
> 本文档由 WeHub 基于上游 README 翻译整理,属于社区翻译,非官方中文文档。
|
||||
> [English](./README.en.md) · [原始项目](https://github.com/dair-ai/Prompt-Engineering-Guide) · [上游 README](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/HEAD/README.md)
|
||||
> 原作者、版权与许可证归属以原始项目及本仓库 LICENSE 文件为准。
|
||||
|
||||
# 提示工程(Prompt Engineering)指南
|
||||
|
||||
<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>
|
||||
赞助方 <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.
|
||||
提示工程(Prompt Engineering)是一门相对较新的学科,旨在开发和优化提示词(prompt),以便在各种应用和研究主题中高效使用语言模型(Language Models, LMs)。掌握提示工程技能有助于更好地理解大语言模型(Large Language Models, LLMs)的能力与局限。研究人员运用提示工程来提升 LLM 在问答、算术推理等众多常见与复杂任务上的表现;开发者则借助提示工程设计与 LLM 及其他工具交互的稳健、高效的提示技术。
|
||||
|
||||
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.
|
||||
受 LLM 开发热潮的推动,我们创建了这份全新的提示工程指南,汇集与 LLM 提示工程相关的最新论文、学习指南、讲座、参考资料和工具。
|
||||
|
||||
🌐 [Prompt Engineering Guide (Web Version)](https://www.promptingguide.ai/)
|
||||
🌐 [提示工程指南(Web 版)](https://www.promptingguide.ai/)
|
||||
|
||||
🎉 We are excited to launch our new prompt engineering, RAG, and AI Agents courses under the DAIR.AI Academy. [Join Now](https://academy.dair.ai/pricing)!
|
||||
🎉 我们很高兴在 DAIR.AI Academy 推出全新的提示工程、RAG 与 AI Agents 课程。[立即加入](https://academy.dair.ai/pricing)!
|
||||
|
||||
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.
|
||||
这些课程旨在与本指南相辅相成,通过更具实践性的方式帮助你学习提示工程、上下文工程(Context Engineering)与 AI Agents。
|
||||
|
||||
Use code PROMPTING20 to get an extra 20% off.
|
||||
使用优惠码 PROMPTING20 可额外享受 8 折优惠。
|
||||
|
||||
Happy Prompting!
|
||||
祝你提示愉快!
|
||||
|
||||
---
|
||||
## Announcements / Updates
|
||||
## 公告 / 更新
|
||||
|
||||
- 🎓 We now offer self-paced prompt engineering courses under our DAIR.AI Academy. [Join Now](https://academy.dair.ai/pricing)!
|
||||
- 🎓 New course on Prompt Engineering for LLMs announced! [Enroll here](https://academy.dair.ai/courses/introduction-prompt-engineering)!
|
||||
- 💼 We now offer several [services](https://www.promptingguide.ai/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](https://www.promptingguide.ai/)
|
||||
- 🔥 We reached #1 on Hacker News on 21 Feb 2023
|
||||
- 🎉 The First Prompt Engineering Lecture went live [here](https://youtu.be/dOxUroR57xs)
|
||||
- 🎓 我们现已在 DAIR.AI Academy 提供自定进度的提示工程课程。[立即加入](https://academy.dair.ai/pricing)!
|
||||
- 🎓 全新「面向 LLM 的提示工程」课程已发布!
|
||||
- 💼 我们现提供多种[服务](https://www.promptingguide.ai/services),包括企业培训、咨询与演讲。
|
||||
- 🌐 我们现已支持 13 种语言!欢迎更多翻译贡献。
|
||||
- 👩🎓 我们于 2024 年 1 月学员总数突破 300 万!
|
||||
- 🎉 我们已推出指南的全新 Web 版本,[点此访问](https://www.promptingguide.ai/)
|
||||
- 🔥 我们于 2023 年 2 月 21 日登上 Hacker News 榜首
|
||||
- 🎉 首期提示工程讲座已上线,[点此观看](https://youtu.be/dOxUroR57xs)
|
||||
|
||||
[Join our Discord](https://discord.gg/YbMT8k6GfX)
|
||||
[加入我们的 Discord](https://discord.gg/YbMT8k6GfX)
|
||||
|
||||
[Follow us on Twitter](https://twitter.com/dair_ai)
|
||||
[在 Twitter 上关注我们](https://twitter.com/dair_ai)
|
||||
|
||||
[Subscribe to our YouTube](https://www.youtube.com/channel/UCyna_OxOWL7IEuOwb7WhmxQ)
|
||||
[订阅我们的 YouTube](https://www.youtube.com/channel/UCyna_OxOWL7IEuOwb7WhmxQ)
|
||||
|
||||
[Subscribe to our Newsletter](https://nlpnews.substack.com/)
|
||||
[订阅我们的 Newsletter](https://nlpnews.substack.com/)
|
||||
|
||||
---
|
||||
|
||||
## Guides
|
||||
You can also find the most up-to-date guides on our new website [https://www.promptingguide.ai/](https://www.promptingguide.ai/).
|
||||
## 指南
|
||||
|
||||
- [Prompt Engineering - Introduction](https://www.promptingguide.ai/introduction)
|
||||
- [Prompt Engineering - LLM Settings](https://www.promptingguide.ai/introduction/settings)
|
||||
- [Prompt Engineering - Basics of Prompting](https://www.promptingguide.ai/introduction/basics)
|
||||
- [Prompt Engineering - Prompt Elements](https://www.promptingguide.ai/introduction/elements)
|
||||
- [Prompt Engineering - General Tips for Designing Prompts](https://www.promptingguide.ai/introduction/tips)
|
||||
- [Prompt Engineering - Examples of Prompts](https://www.promptingguide.ai/introduction/examples)
|
||||
- [Prompt Engineering - Techniques](https://www.promptingguide.ai/techniques)
|
||||
- [Prompt Engineering - Zero-Shot Prompting](https://www.promptingguide.ai/techniques/zeroshot)
|
||||
- [Prompt Engineering - Few-Shot Prompting](https://www.promptingguide.ai/techniques/fewshot)
|
||||
- [Prompt Engineering - Chain-of-Thought Prompting](https://www.promptingguide.ai/techniques/cot)
|
||||
- [Prompt Engineering - Self-Consistency](https://www.promptingguide.ai/techniques/consistency)
|
||||
- [Prompt Engineering - Generate Knowledge Prompting](https://www.promptingguide.ai/techniques/knowledge)
|
||||
- [Prompt Engineering - Prompt Chaining](https://www.promptingguide.ai/techniques/prompt_chaining)
|
||||
- [Prompt Engineering - Tree of Thoughts (ToT)](https://www.promptingguide.ai/techniques/tot)
|
||||
- [Prompt Engineering - Retrieval Augmented Generation](https://www.promptingguide.ai/techniques/rag)
|
||||
- [Prompt Engineering - Automatic Reasoning and Tool-use (ART)](https://www.promptingguide.ai/techniques/art)
|
||||
- [Prompt Engineering - Automatic Prompt Engineer](https://www.promptingguide.ai/techniques/ape)
|
||||
你也可以在我们的新网站 [https://www.promptingguide.ai/](https://www.promptingguide.ai/). 上找到最新指南。
|
||||
|
||||
- [Prompt Engineering - 简介](https://www.promptingguide.ai/introduction)
|
||||
- [Prompt Engineering - LLM 设置](https://www.promptingguide.ai/introduction/settings)
|
||||
- [Prompt Engineering - 提示基础](https://www.promptingguide.ai/introduction/basics)
|
||||
- [Prompt Engineering - 提示要素](https://www.promptingguide.ai/introduction/elements)
|
||||
- [Prompt Engineering - 设计提示的通用技巧](https://www.promptingguide.ai/introduction/tips)
|
||||
- [Prompt Engineering - 提示示例](https://www.promptingguide.ai/introduction/examples)
|
||||
- [Prompt Engineering - 技巧](https://www.promptingguide.ai/techniques)
|
||||
- [Prompt Engineering - 零样本提示(Zero-Shot Prompting)](https://www.promptingguide.ai/techniques/zeroshot)
|
||||
- [Prompt Engineering - 少样本提示(Few-Shot Prompting)](https://www.promptingguide.ai/techniques/fewshot)
|
||||
- [Prompt Engineering - 思维链提示(Chain-of-Thought Prompting)](https://www.promptingguide.ai/techniques/cot)
|
||||
- [Prompt Engineering - 自洽性(Self-Consistency)](https://www.promptingguide.ai/techniques/consistency)
|
||||
- [Prompt Engineering - 生成知识提示(Generate Knowledge Prompting)](https://www.promptingguide.ai/techniques/knowledge)
|
||||
- [Prompt Engineering - 提示链(Prompt Chaining)](https://www.promptingguide.ai/techniques/prompt_chaining)
|
||||
- [Prompt Engineering - 思维树(Tree of Thoughts, ToT)](https://www.promptingguide.ai/techniques/tot)
|
||||
- [Prompt Engineering - 检索增强生成(Retrieval Augmented Generation)](https://www.promptingguide.ai/techniques/rag)
|
||||
- [Prompt Engineering - 自动推理与工具使用(Automatic Reasoning and Tool-use, ART)](https://www.promptingguide.ai/techniques/art)
|
||||
- [Prompt Engineering - 自动提示工程师(Automatic Prompt Engineer)](https://www.promptingguide.ai/techniques/ape)
|
||||
- [Prompt Engineering - Active-Prompt](https://www.promptingguide.ai/techniques/activeprompt)
|
||||
- [Prompt Engineering - Directional Stimulus Prompting](https://www.promptingguide.ai/techniques/dsp)
|
||||
- [Prompt Engineering - Program-Aided Language Models](https://www.promptingguide.ai/techniques/pal)
|
||||
- [Prompt Engineering - ReAct Prompting](https://www.promptingguide.ai/techniques/react)
|
||||
- [Prompt Engineering - Multimodal CoT Prompting](https://www.promptingguide.ai/techniques/multimodalcot)
|
||||
- [Prompt Engineering - Graph Prompting](https://www.promptingguide.ai/techniques/graph)
|
||||
- [Prompt Engineering - Applications](https://www.promptingguide.ai/applications)
|
||||
- [Prompt Engineering - Function Calling](https://www.promptingguide.ai/applications/function_calling)
|
||||
- [Prompt Engineering - Generating Data](https://www.promptingguide.ai/applications/generating)
|
||||
- [Prompt Engineering - Generating Synthetic Dataset for RAG](https://www.promptingguide.ai/applications/synthetic_rag)
|
||||
- [Prompt Engineering - 定向刺激提示(Directional Stimulus Prompting)](https://www.promptingguide.ai/techniques/dsp)
|
||||
- [Prompt Engineering - 程序辅助语言模型(Program-Aided Language Models)](https://www.promptingguide.ai/techniques/pal)
|
||||
- [Prompt Engineering - ReAct 提示(ReAct Prompting)](https://www.promptingguide.ai/techniques/react)
|
||||
- [Prompt Engineering - 多模态思维链提示(Multimodal CoT Prompting)](https://www.promptingguide.ai/techniques/multimodalcot)
|
||||
- [Prompt Engineering - 图提示(Graph Prompting)](https://www.promptingguide.ai/techniques/graph)
|
||||
- [Prompt Engineering - 应用](https://www.promptingguide.ai/applications)
|
||||
- [Prompt Engineering - 函数调用(Function Calling)](https://www.promptingguide.ai/applications/function_calling)
|
||||
- [Prompt Engineering - 生成数据](https://www.promptingguide.ai/applications/generating)
|
||||
- [Prompt Engineering - 为 RAG 生成合成数据集](https://www.promptingguide.ai/applications/synthetic_rag)
|
||||
- [Prompt Engineering - Takling Generated Datasets Diversity](https://www.promptingguide.ai/applications/generating_textbooks)
|
||||
- [Prompt Engineering - Generating Code](https://www.promptingguide.ai/applications/coding)
|
||||
- [Prompt Engineering - Graduate Job Classification Case Study](https://www.promptingguide.ai/applications/workplace_casestudy)
|
||||
- [Prompt Engineering - 生成代码](https://www.promptingguide.ai/applications/coding)
|
||||
- [Prompt Engineering - 应届毕业生职位分类案例研究](https://www.promptingguide.ai/applications/workplace_casestudy)
|
||||
- [Prompt Engineering - Prompt Hub](https://www.promptingguide.ai/prompts)
|
||||
- [Prompt Engineering - Classification](https://www.promptingguide.ai/prompts/classification)
|
||||
- [Prompt Engineering - Coding](https://www.promptingguide.ai/prompts/coding)
|
||||
- [Prompt Engineering - Creativity](https://www.promptingguide.ai/prompts/creativity)
|
||||
- [Prompt Engineering - Evaluation](https://www.promptingguide.ai/prompts/evaluation)
|
||||
- [Prompt Engineering - Information Extraction](https://www.promptingguide.ai/prompts/information-extraction)
|
||||
- [Prompt Engineering - Image Generation](https://www.promptingguide.ai/prompts/image-generation)
|
||||
- [Prompt Engineering - Mathematics](https://www.promptingguide.ai/prompts/mathematics)
|
||||
- [Prompt Engineering - Question Answering](https://www.promptingguide.ai/prompts/question-answering)
|
||||
- [Prompt Engineering - Reasoning](https://www.promptingguide.ai/prompts/reasoning)
|
||||
- [Prompt Engineering - Text Summarization](https://www.promptingguide.ai/prompts/text-summarization)
|
||||
- [Prompt Engineering - Truthfulness](https://www.promptingguide.ai/prompts/truthfulness)
|
||||
- [Prompt Engineering - Adversarial Prompting](https://www.promptingguide.ai/prompts/adversarial-prompting)
|
||||
- [Prompt Engineering - Models](https://www.promptingguide.ai/models)
|
||||
- [Prompt Engineering - 分类](https://www.promptingguide.ai/prompts/classification)
|
||||
- [Prompt Engineering - 编程](https://www.promptingguide.ai/prompts/coding)
|
||||
- [Prompt Engineering - 创意](https://www.promptingguide.ai/prompts/creativity)
|
||||
- [Prompt Engineering - 评估](https://www.promptingguide.ai/prompts/evaluation)
|
||||
- [Prompt Engineering - 信息抽取](https://www.promptingguide.ai/prompts/information-extraction)
|
||||
- [Prompt Engineering - 图像生成](https://www.promptingguide.ai/prompts/image-generation)
|
||||
- [Prompt Engineering - 数学](https://www.promptingguide.ai/prompts/mathematics)
|
||||
- [Prompt Engineering - 问答](https://www.promptingguide.ai/prompts/question-answering)
|
||||
- [Prompt Engineering - 推理](https://www.promptingguide.ai/prompts/reasoning)
|
||||
- [Prompt Engineering - 文本摘要](https://www.promptingguide.ai/prompts/text-summarization)
|
||||
- [Prompt Engineering - 真实性](https://www.promptingguide.ai/prompts/truthfulness)
|
||||
- [Prompt Engineering - 对抗性提示(Adversarial Prompting)](https://www.promptingguide.ai/prompts/adversarial-prompting)
|
||||
- [Prompt Engineering - 模型](https://www.promptingguide.ai/models)
|
||||
- [Prompt Engineering - ChatGPT](https://www.promptingguide.ai/models/chatgpt)
|
||||
- [Prompt Engineering - Code Llama](https://www.promptingguide.ai/models/code-llama)
|
||||
- [Prompt Engineering - Flan](https://www.promptingguide.ai/models/flan)
|
||||
@@ -97,51 +104,51 @@ You can also find the most up-to-date guides on our new website [https://www.pro
|
||||
- [Prompt Engineering - Mixtral](https://www.promptingguide.ai/models/mixtral)
|
||||
- [Prompt Engineering - OLMo](https://www.promptingguide.ai/models/olmo)
|
||||
- [Prompt Engineering - Phi-2](https://www.promptingguide.ai/models/phi-2)
|
||||
- [Prompt Engineering - Model Collection](https://www.promptingguide.ai/models/collection)
|
||||
- [Prompt Engineering - Risks and Misuses](https://www.promptingguide.ai/risks)
|
||||
- [Prompt Engineering - Adversarial Prompting](https://www.promptingguide.ai/risks/adversarial)
|
||||
- [Prompt Engineering - Factuality](https://www.promptingguide.ai/risks/factuality)
|
||||
- [Prompt Engineering - Biases](https://www.promptingguide.ai/risks/biases)
|
||||
- [Prompt Engineering - Papers](https://www.promptingguide.ai/papers)
|
||||
- [Prompt Engineering - Overviews](https://www.promptingguide.ai/papers#overviews)
|
||||
- [Prompt Engineering - Approaches](https://www.promptingguide.ai/papers#approaches)
|
||||
- [Prompt Engineering - Applications](https://www.promptingguide.ai/papers#applications)
|
||||
- [Prompt Engineering - Collections](https://www.promptingguide.ai/papers#collections)
|
||||
- [Prompt Engineering - Tools](https://www.promptingguide.ai/tools)
|
||||
- [Prompt Engineering - 模型合集](https://www.promptingguide.ai/models/collection)
|
||||
- [Prompt Engineering - 风险与滥用](https://www.promptingguide.ai/risks)
|
||||
- [Prompt Engineering - 对抗性提示(Adversarial Prompting)](https://www.promptingguide.ai/risks/adversarial)
|
||||
- [Prompt Engineering - 事实性](https://www.promptingguide.ai/risks/factuality)
|
||||
- [Prompt Engineering - 偏见](https://www.promptingguide.ai/risks/biases)
|
||||
- [Prompt Engineering - 论文](https://www.promptingguide.ai/papers)
|
||||
- [Prompt Engineering - 综述](https://www.promptingguide.ai/papers#overviews)
|
||||
- [Prompt Engineering - 方法](https://www.promptingguide.ai/papers#approaches)
|
||||
- [Prompt Engineering - 应用](https://www.promptingguide.ai/papers#applications)
|
||||
- [Prompt Engineering - 合集](https://www.promptingguide.ai/papers#collections)
|
||||
- [Prompt Engineering - 工具](https://www.promptingguide.ai/tools)
|
||||
- [Prompt Engineering - Notebooks](https://www.promptingguide.ai/notebooks)
|
||||
- [Prompt Engineering - Datasets](https://www.promptingguide.ai/datasets)
|
||||
- [Prompt Engineering - Additional Readings](https://www.promptingguide.ai/readings)
|
||||
|
||||
- [Prompt Engineering - 数据集](https://www.promptingguide.ai/datasets)
|
||||
- [Prompt Engineering - 延伸阅读](https://www.promptingguide.ai/readings)
|
||||
|
||||
---
|
||||
## Lecture
|
||||
## 讲座
|
||||
|
||||
We have published a 1 hour lecture that provides a comprehensive overview of prompting techniques, applications, and tools.
|
||||
- [Video Lecture](https://youtu.be/dOxUroR57xs)
|
||||
- [Notebook with code](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-lecture.ipynb)
|
||||
- [Slides](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/lecture/Prompt-Engineering-Lecture-Elvis.pdf)
|
||||
我们发布了一门时长 1 小时的讲座,全面介绍了提示词(prompting)技术、应用场景与工具。
|
||||
- [视频讲座](https://youtu.be/dOxUroR57xs)
|
||||
- [带代码的 Notebook](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/notebooks/pe-lecture.ipynb)
|
||||
- [幻灯片](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/lecture/Prompt-Engineering-Lecture-Elvis.pdf)
|
||||
|
||||
---
|
||||
## Running the guide locally
|
||||
## 在本地运行本指南
|
||||
|
||||
To run the guide locally, for example to check the correct implementation of a new translation, you will need to:
|
||||
若要在本地运行本指南(例如检查新翻译是否正确实现),你需要:
|
||||
|
||||
1. Install Node >=18.0.0
|
||||
1. Install `pnpm` if not present in your system. Check [here](https://pnpm.io/installation) for detailed instructions.
|
||||
1. Install the dependencies: `pnpm i next react react-dom nextra nextra-theme-docs`
|
||||
1. Boot the guide with `pnpm dev`
|
||||
2. Browse the guide at `http://localhost:3000/`
|
||||
1. 安装 Node >=18.0.0
|
||||
1. 若系统中尚未安装 `pnpm`,请先安装。详细说明请参见[此处](https://pnpm.io/installation)
|
||||
1. 安装依赖:`pnpm i next react react-dom nextra nextra-theme-docs`
|
||||
1. 使用 `pnpm dev` 启动指南
|
||||
2. 在 `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](https://www.wsj.com/articles/chatgpt-ask-the-right-question-12d0f035)
|
||||
- Forbes - [Mom, Dad, I Want To Be A Prompt Engineer](https://www.forbes.com/sites/craigsmith/2023/04/05/mom-dad-i-want-to-be-a-prompt-engineer/?sh=7f1213159c8e)
|
||||
- Markettechpost - [Best Free Prompt Engineering Resources (2023)](https://www.marktechpost.com/2023/04/04/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,
|
||||
@@ -153,9 +160,9 @@ year = {2022}
|
||||
}
|
||||
```
|
||||
|
||||
## License
|
||||
## 许可证
|
||||
|
||||
[MIT License](https://github.com/dair-ai/Prompt-Engineering-Guide/blob/main/LICENSE.md)
|
||||
|
||||
|
||||
Feel free to open a PR if you think something is missing here. Always welcome feedback and suggestions. Just open an issue!
|
||||
如果你觉得此处有遗漏,欢迎提交 PR。我们始终欢迎反馈与建议,也可直接开启 issue!
|
||||
|
||||
Reference in New Issue
Block a user