Introduction
You don’t need to be a data
scientist or a machine learning
engineer – everyone can write
a prompt.
引言
在考虑大型语言模型的输入输出时,文本提示(有时辅以图像提示等其他模态)是模型用于预测特定输出的输入。您无需成为数据科学家或机器学习工程师 —— 人人都可以编写提示。然而,设计最有效的提示可能相当复杂。提示的诸多方面都会影响其效果:所使用的模型、模型的训练数据、模型配置、措辞选择、风格与语气、结构以及上下文都至关重要。因此,提示工程是一个迭代过程。不恰当的提示可能导致模棱两可、不准确的响应,并阻碍模型提供有意义的输出。
全站分卷索引 · 34 卷
- 1Introduction
- 2Prompt engineering
- 3LLM output configuration
- 4Sampling controls
- 5Top-K and top-P
- 6Putting it all together
- 7Prompting techniques
- 8One-shot & few-shot
- 9System, contextual and role prompting
- 10System prompting
- 11Role prompting
- 12Contextual prompting
- 13Step-back prompting
- 14Chain of Thought (CoT)
- 15Self-consistency
- 16Tree of Thoughts (ToT)
- 17ReAct (reason & act)
- 18Automatic Prompt Engineering
- 19Code prompting
- 20Prompts for explaining code
- 21Prompts for translating code
- 22Prompts for debugging and reviewing code
- 23What about multimodal prompting?
- 24Design with simplicity
- 25Be specific about the output
- 26Control the max token length
- 27Experiment with input formats and writing styles
- 28Adapt to model updates
- 29JSON Repair
- 30Working with Schemas
- 31Experiment together with other prompt engineers
- 32CoT Best practices
- 33Summary
- 34Endnotes