← 返回目录

Introduction

第 1 / 34 卷日期:

You don’t need to be a data

scientist or a machine learning

engineer – everyone can write

a prompt.

引言

在考虑大型语言模型的输入输出时,文本提示(有时辅以图像提示等其他模态)是模型用于预测特定输出的输入。您无需成为数据科学家或机器学习工程师 —— 人人都可以编写提示。然而,设计最有效的提示可能相当复杂。提示的诸多方面都会影响其效果:所使用的模型、模型的训练数据、模型配置、措辞选择、风格与语气、结构以及上下文都至关重要。因此,提示工程是一个迭代过程。不恰当的提示可能导致模棱两可、不准确的响应,并阻碍模型提供有意义的输出。

全站分卷索引 · 34 卷
  1. 1Introduction
  2. 2Prompt engineering
  3. 3LLM output configuration
  4. 4Sampling controls
  5. 5Top-K and top-P
  6. 6Putting it all together
  7. 7Prompting techniques
  8. 8One-shot & few-shot
  9. 9System, contextual and role prompting
  10. 10System prompting
  11. 11Role prompting
  12. 12Contextual prompting
  13. 13Step-back prompting
  14. 14Chain of Thought (CoT)
  15. 15Self-consistency
  16. 16Tree of Thoughts (ToT)
  17. 17ReAct (reason & act)
  18. 18Automatic Prompt Engineering
  19. 19Code prompting
  20. 20Prompts for explaining code
  21. 21Prompts for translating code
  22. 22Prompts for debugging and reviewing code
  23. 23What about multimodal prompting?
  24. 24Design with simplicity
  25. 25Be specific about the output
  26. 26Control the max token length
  27. 27Experiment with input formats and writing styles
  28. 28Adapt to model updates
  29. 29JSON Repair
  30. 30Working with Schemas
  31. 31Experiment together with other prompt engineers
  32. 32CoT Best practices
  33. 33Summary
  34. 34Endnotes