This paper delves into the pivotal role of prompt engineering in unleashing the capabilities of Large Language Models (LLMs). Prompt engineering is the process of structuring input text for LLMs and is a technique integral to optimizing the efficacy of LLMs. This survey elucidates foundational principles of prompt engineering, such as role-prompting, one-shot, and few-shot prompting, as well as more advanced methodologies such as the chain-of-thought and tree-of-thoughts prompting. The paper sheds light on how external assistance in the form of plugins can assist in this task, and reduce machine hallucination by retrieving external knowledge. We subsequently delineate prospective directions in prompt engineering research, emphasizing the need for a deeper understanding of structures and the role of agents in Artificial Intelligence-Generated Content (AIGC) tools. We discuss how to assess the efficacy of prompt methods from different perspectives and using different methods. Finally, we gather information about the application of prompt engineering in such fields as education and programming, showing its transformative potential. This comprehensive survey aims to serve as a friendly guide for anyone venturing through the big world of LLMs and prompt engineering.
翻译:本文深入探讨了提示工程在释放大型语言模型(LLMs)能力方面的关键作用。提示工程是为LLMs构建输入文本的过程,是优化LLMs效能不可或缺的技术。本综述阐明了提示工程的基本原理,例如角色提示、单样本提示和少样本提示,以及更高级的方法,如思维链提示和思维树提示。本文揭示了插件形式的外部辅助如何协助此任务,并通过检索外部知识来减少机器幻觉。随后,我们勾勒了提示工程研究的未来方向,强调需要更深入地理解结构以及智能体在人工智能生成内容(AIGC)工具中的作用。我们讨论了如何从不同角度、使用不同方法评估提示方法的效能。最后,我们汇集了提示工程在教育、编程等领域的应用信息,展示了其变革潜力。这项全面综述旨在为任何探索LLMs和提示工程广阔世界的人提供一份友好的指南。