Prompt engineering is an increasingly important skill set needed to converse effectively with large language models (LLMs), such as ChatGPT. Prompts are instructions given to an LLM to enforce rules, automate processes, and ensure specific qualities (and quantities) of generated output. Prompts are also a form of programming that can customize the outputs and interactions with an LLM. This paper describes a catalog of prompt engineering techniques presented in pattern form that have been applied to solve common problems when conversing with LLMs. Prompt patterns are a knowledge transfer method analogous to software patterns since they provide reusable solutions to common problems faced in a particular context, i.e., output generation and interaction when working with LLMs. This paper provides the following contributions to research on prompt engineering that apply LLMs to automate software development tasks. First, it provides a framework for documenting patterns for structuring prompts to solve a range of problems so that they can be adapted to different domains. Second, it presents a catalog of patterns that have been applied successfully to improve the outputs of LLM conversations. Third, it explains how prompts can be built from multiple patterns and illustrates prompt patterns that benefit from combination with other prompt patterns.
Generative Language Models Potential for Requirement Engineering Applications: Insights into Current Strengths and Limitations
Rhineland-Palatinate Technical University of Kaiserslautern-Landau(莱茵兰-普法尔茨州凯撒斯劳滕-兰道技术大学);German Research Center for Artificial Intelligence GmbH(德国人工智能研究中心有限公司)
The potential of large language models for improving probability learning: A study on ChatGPT3.5 and first-year computer engineering students
Rey Juan Carlos University(胡安·卡洛斯国王大学);European Commission, Joint Research Centre(欧盟委员会联合研究中心);CETINIA: Research Centre for Intelligent Information Technologies(CETINIA智能信息技术研究中心)
Performance of ChatGPT on the US Fundamentals of Engineering Exam: Comprehensive Assessment of Proficiency and Potential Implications for Professional Environmental Engineering Practice
IIHR – Hydroscience & Engineering, University of Iowa(爱荷华大学IIHR水文科学与工程研究所);Civil and Environmental Engineering, University of Iowa(爱荷华大学土木与环境工程学院);Electrical and Computer Engineering, University of Iowa(爱荷华大学电气与计算机工程学院)
本文评估基于 GPT-4 的 ChatGPT 在美国 FE 环境考试中的表现,发现非侵入式提示词修改可显著提升准确率,并探讨其教育应用、局限及考试诚信意义。
An Empirical Exploration of ChatGPT's Ability to Support Problem Formulation Tasks for Mission Engineering and a Documentation of its Performance Variability
University of Southern California(南加州大学);Stevens Institute of Technology(史蒂文斯理工学院);Virginia Tech(弗吉尼亚理工大学)
本文通过 NASA 太空任务设计挑战实证评估 ChatGPT-3.5 在任务工程问题表述中识别利益相关者的能力,发现其对人本利益相关者识别较好但对环境因素识别差、抽象层次保持不足且并行输出变异性大,表明其可靠性有限。
Can ChatGPT Overcome Behavioral Biases in the Financial Sector? Classify-and-Rethink: Multi-Step Zero-Shot Reasoning in the Gold Investment
Hong Kong University of Science and Technology(香港科技大学);Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);E Fund Management Co., Ltd(易方达基金管理有限公司)
Convergences and Divergences between Automatic Assessment and Human Evaluation: Insights from Comparing ChatGPT-Generated Translation and Neural Machine Translation
School of Foreign Languages, Shanghai Jiao Tong University(上海交通大学外国语学院);Department of Computer Science and Engineering, Shanghai Jiao Tong University(上海交通大学计算机科学与工程系);Institute of Corpus Studies and Applications, Shanghai International Studies University(上海外国语大学语料库研究与应用研究所)
From Code to Compliance: Assessing ChatGPT's Utility in Designing an Accessible Webpage -- A Case Study
Department of Computer Science, Norwegian University of Science and Technology(计算机科学系,挪威科学技术大学);Department of Design, Norwegian University of Science and Technology(设计系,挪威科学技术大学)
Evaluation of ChatGPT Family of Models for Biomedical Reasoning and Classification
Mass General Brigham, Harvard Medical School(麻省总医院布莱根,哈佛医学院);Brigham and Women’s Hospital/Dana-Farber Cancer Institute(布莱根妇女医院/丹娜-法伯癌症研究所);Technische Universität Darmstadt(达姆施塔特工业大学);Maastricht University(马斯特里赫特大学)
Can ChatGPT Detect DeepFakes? A Study of Using Multimodal Large Language Models for Media Forensics
University at Buffalo, State University of New York(纽约州立大学布法罗分校);Williamsville East High School(威廉斯维尔东高中);The Chinese University of Hong Kong, Shenzhen(香港中文大学(深圳));University at Albany, State University of New York(纽约州立大学奥尔巴尼分校)
本文研究多模态 LLM 能否用于 DeepFake 检测,通过定性与定量实验及提示工程证明其可识别 AI 生成图像,并分析局限与改进方向。
From Knowledge Generation to Knowledge Verification: Examining the BioMedical Generative Capabilities of ChatGPT
MGEN -- College of Engineering, Northeastern University Miami(东北大学迈阿密分校MGEN工程学院);University of Vermont(佛蒙特大学);AGH, University of Krakow(克拉科夫AGH大学);Howard University(霍华德大学)
Jailbreaking ChatGPT via Prompt Engineering: An Empirical Study
Nanyang Technological University(南洋理工大学);University of New South Wales(新南威尔士大学);Virginia Tech(弗吉尼亚理工大学);Huazhong University of Science and Technology(华中科技大学)