AI summary · arXiv: 2401.14423v2 · cs.SE

Prompt Design and Engineering: Introduction and Advanced Methods

Xavier Amatriain
Original paper Submitted to arXiv on 24 Jan. 2024 License: CC BY 4.0

How to read this summary? Illustrated guide

The essentials

  • Prompt design and engineering has become an important discipline
  • Introduction to main concepts and design approaches for prompt engineering
  • Advanced techniques for designing LLM-based agents
  • List of existing tools for prompt engineering
  • Strategies to elicit desired responses from language models (forceful language, emphasizing instructions)
  • Language models can be prompted to self-correct by identifying incorrect information
  • Generating different opinions on a given topic using prompt engineering
  • Utilizing special tokens in prompts for more precise control over model's output
  • Example of a language model writing a college essay based on provided information
  • Ethical considerations regarding the use of generative AI tools

Key points written by AI: they may contain errors, check them against the paper.

AI-generated keywords: Prompt Design Engineering Language Models Prompt Engineering Techniques Generative AI

Read further

  • Comprehensive Summary
  • Layman's Summary
  • Blog article
  • Original abstract
Prompt design and engineering has become an important discipline in recent months. This paper provides an introduction to the main concepts and design approaches, as well as more advanced techniques for designing LLM-based agents. It also includes a list of existing tools for prompt engineering. In the context of prompt engineering, it is crucial to consider different strategies to elicit desired responses from language models. For example, using forceful language or emphasizing instructions with all caps and exclamation marks can help ensure that models follow specific instructions. Additionally, language models can be prompted to self-correct by identifying factually incorrect information in generated content. Another interesting application of prompt engineering is generating different opinions on a given topic. While language models may not have a strong sense of what is true or false, they can generate diverse perspectives that are useful for brainstorming and understanding different points of view. Special tokens can also be utilized in prompts to guide the model's behavior. By using tags like <begin> and <end>, it becomes possible to provide context or specify certain sections within the input text. This allows for more precise control over the output generated by the model. Furthermore, this paper highlights an example where a language model is asked to write a college essay based on provided information about the author's background and experiences. The output demonstrates how the model generates coherent paragraphs based on the given instructions. It is worth noting that while these generative AI tools offer various possibilities, their ethical use should always be considered. The paper acknowledges that students around the world are already utilizing these tools for unethical purposes, emphasizing the importance of addressing ethical concerns associated with generative AI. Overall, this paper serves as a comprehensive guide to prompt engineering techniques and their applications in shaping language model outputs. It provides insights into leveraging forceful language, self-correction mechanisms, generating diverse opinions, utilizing special tokens in prompts, and offers practical examples illustrating these concepts.

Was this synthesis useful?

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Tools for this paper

Explain it differently 3 free rewrites left today
Save to a collection Group papers in collections to compare them, chat with them and export them. Create a free account Log in

Advanced tools Premium

For researchers who follow a field closely: citation alerts, journal-club slides, version comparison and Zotero export. Discover Premium

Zotero
Citation alerts Citation alerts guide

Papers around this one

See them on a map

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close
    A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPT
    Jules White, Quchen Fu, Sam Hays et al. · 2023 · Software Engineering · AI summary available
    Abstract

    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 …

  2. Close
    Which Prompting Technique Should I Use? An Empirical Investigation of Prompting Techniques for Software Engineering Tasks
    E. G. Santana Jr, Gabriel Benjamin, Melissa Araujo et al. · 2025 · Software Engineering · Not summarized yet
    Abstract

    A growing variety of prompt engineering techniques has been proposed for Large Language Models (LLMs), yet systematic evaluation of each technique on individual software engineering (SE) tasks remains underexplored. In this study, we present a systematic evaluation of 14 established prompt techniques across 10 SE tasks using four LLM models. As identified in the prior literature, the selected prompting techniques span six core dimensions (Zero-Shot, Few-Shot, Thought Generation, Ensembling, Self-Criticism, and Decomposition). They are evaluated on tasks such as code generation, bug fixing, and code-oriented question answering, to name a few. Our results show which prompting techniques are mo…

  3. Close
    ChatGPT Prompt Patterns for Improving Code Quality, Refactoring, Requirements Elicitation, and Software Design
    Jules White, Sam Hays, Quchen Fu et al. · 2023 · Software Engineering · AI summary available
    Abstract

    This paper presents prompt design techniques for software engineering, in the form of patterns, to solve common problems when using large language models (LLMs), such as ChatGPT to automate common software engineering activities, such as ensuring code is decoupled from third-party libraries and simulating a web application API before it is implemented. This paper provides two contributions to research on using LLMs for software engineering. First, it provides a catalog of patterns for software engineering that classifies patterns according to the types of problems they solve. Second, it explores several prompt patterns that have been applied to improve requirements elicitation, rapid prototy…

  4. Close
    Requirements Engineering using Generative AI: Prompts and Prompting Patterns
    Krishna Ronanki, Beatriz Cabrero-Daniel, Jennifer Horkoff et al. · 2023 · Software Engineering · AI summary available
    Abstract

    [Context]: Companies are increasingly recognizing the importance of automating Requirements Engineering (RE) tasks due to their resource-intensive nature. The advent of GenAI has made these tasks more amenable to automation, thanks to its ability to understand and interpret context effectively. [Problem]: However, in the context of GenAI, prompt engineering is a critical factor for success. Despite this, we currently lack tools and methods to systematically assess and determine the most effective prompt patterns to employ for a particular RE task. [Method]: Two tasks related to requirements, specifically requirement classification and tracing, were automated using the GPT-3.5 turbo API. The …

  5. Close
    Prompt Sapper: LLM-Empowered Software Engineering Infrastructure for AI-Native Services
    Zhenchang Xing, Qing Huang, Yu Cheng et al. · 2023 · Software Engineering · AI summary available
    Abstract

    Foundation models, such as GPT-4, DALL-E have brought unprecedented AI "operating system" effect and new forms of human-AI interaction, sparking a wave of innovation in AI-native services, where natural language prompts serve as executable "code" directly (prompt as executable code), eliminating the need for programming language as an intermediary and opening up the door to personal AI. Prompt Sapper has emerged in response, committed to support the development of AI-native services by AI chain engineering. It creates a large language model (LLM) empowered software engineering infrastructure for authoring AI chains through human-AI collaborative intelligence, unleashing the AI innovation pot…

  6. Close
    Prompt Sapper: A LLM-Empowered Production Tool for Building AI Chains
    Yu Cheng, Jieshan Chen, Qing Huang et al. · 2023 · Software Engineering · AI summary available
    Abstract

    The emergence of foundation models, such as large language models (LLMs) GPT-4 and text-to-image models DALL-E, has opened up numerous possibilities across various domains. People can now use natural language (i.e. prompts) to communicate with AI to perform tasks. While people can use foundation models through chatbots (e.g., ChatGPT), chat, regardless of the capabilities of the underlying models, is not a production tool for building reusable AI services. APIs like LangChain allow for LLM-based application development but require substantial programming knowledge, thus posing a barrier. To mitigate this, we propose the concept of AI chain and introduce the best principles and practices that…

  7. Related
    Reliability of Large Language Models for Design Synthesis: An Empirical Study of Variance, Prompt Sensitivity, and Method Scaffolding
    Rabia Iftikhar, Andreas Rausch · 2026 · International Conference on Software Architecture 2026 · AI summary available
    Abstract

    Large Language Models (LLMs) are increasingly applied to automate software engineering tasks, including the generation of UML class diagrams from natural language descriptions. While prior work demonstrates that LLMs can produce syntactically valid diagrams, syntactic correctness alone does not guarantee meaningful design. This study investigates whether LLMs can move beyond diagram translation to perform design synthesis, and how reliably they maintain design-oriented reasoning under variation. We introduce a preference-based few-shot prompting approach that biases LLM outputs toward designs satisfying object-oriented principles and pattern-consistent structures. Two design-intent benchmark…

  8. Related
    Communicative Agents for Software Development
    Chen Qian, Xin Cong, Wei Liu et al. · 2023 · Software Engineering · AI summary available
    Abstract

    Software engineering is a domain characterized by intricate decision-making processes, often relying on nuanced intuition and consultation. Recent advancements in deep learning have started to revolutionize software engineering practices through elaborate designs implemented at various stages of software development. In this paper, we present an innovative paradigm that leverages large language models (LLMs) throughout the entire software development process, streamlining and unifying key processes through natural language communication, thereby eliminating the need for specialized models at each phase. At the core of this paradigm lies ChatDev, a virtual chat-powered software development co…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

For now only among the papers summarized on this site: search again to add the prior work, the follow-ups and Semantic Scholar’s recommendations.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.