The Prompt Report: A Systematic Survey of Prompting Techniques

Sander Schulhoff, Michael Ilie, Nishant Balepur, Konstantine Kahadze, Amanda Liu, Chenglei Si, Yinheng Li, Aayush Gupta, HyoJung Han, Sevien Schulhoff, Pranav Sandeep Dulepet, Saurav Vidyadhara, Dayeon Ki, Sweta Agrawal, Chau Pham, Gerson C. Kroiz, Feileen Li, Hudson Tao, Ashay Srivastava, Hevander Da Costa, Saloni Gupta, Megan L. Rogers, Inna Goncearenco, Giuseppe Sarli, Igor Galynker, Denis Peskoff, Marine Carpuat, Jules White, Shyamal Anadkat, Alexander Miserlis Hoyle, Philip Resnik · DOI

TL;DR

This paper presents the most comprehensive survey to date of prompt engineering techniques for Generative AI. It addresses the field's fragmented terminology and lack of structured understanding by providing a taxonomy of 58 text-based techniques, 40 multimodal techniques, and a detailed vocabulary. This work aims to serve as a foundational resource for researchers and practitioners navigating the rapidly evolving landscape of prompt engineering.

What Problem Does This Paper Address?

The rapid rise of Generative AI (GenAI) has led to widespread adoption, with users interacting with these powerful models primarily through "prompts." However, the field of prompt engineering, which focuses on crafting effective prompts, is still nascent. This has resulted in a confusing landscape of conflicting terminology, a lack of standardized definitions, and a fragmented understanding of what makes a prompt effective. Researchers and practitioners struggle to navigate this space, making it difficult to share knowledge, reproduce results, and build upon existing work. This paper aims to bring order to this chaos by providing a structured, comprehensive overview of the field.

Methods

The authors conducted a machine-assisted systematic literature review, adhering to the PRISMA process, to identify and categorize prompting techniques. This involved:

  • Data Collection: Querying academic databases (arXiv, Semantic Scholar, ACL) using 44 keywords related to prompting and prompt engineering.
  • Filtering: Employing a multi-stage filtering process that included human annotation and GPT-4-based classification to identify relevant papers.
  • Taxonomy Development: Assembling a taxonomy of 58 text-based prompting techniques, organized into six major categories, and 40 techniques for other modalities (multilingual and multimodal).
  • Vocabulary Curation: Defining a robust vocabulary of 33 terms central to prompt engineering.
  • Meta-Analysis: Conducting a meta-analysis of the literature on natural language prefix-prompting.
  • Case Studies: Presenting two case studies to illustrate prompt engineering in practice: one benchmarking various techniques on the MMLU dataset, and another detailing the manual prompt engineering process for detecting suicidal crisis indicators.

Datasets

The primary dataset used for this survey consists of 1,565 research papers collected from arXiv, Semantic Scholar, and ACL. These papers were filtered to focus on hard prefix prompts and prompt engineering techniques.

For evaluation purposes, the authors utilized the MMLU (Massive Multitask Language Understanding) benchmark, specifically a representative subset of 2,800 questions.

Key Insights and Ideas

  • The "Emergent" Nature of Prompting: Many prompting techniques are not truly "emergent" but rather "discovered" through experimentation, analogies to human reasoning, or serendipity. This highlights the empirical and often intuitive nature of prompt engineering.
  • The Importance of Structured Terminology: The paper strongly emphasizes the need for a standardized vocabulary and taxonomy to facilitate clear communication and reproducible research in prompt engineering.
  • Prompt Engineering as an Art and Science: The case study on detecting suicidal crisis indicators reveals that prompt engineering is a complex process that requires both technical skill and deep domain expertise. It's not just about finding the right words, but understanding the nuances of the problem and the LLM's behavior.
  • The Sensitivity of LLMs to Prompt Variations: Even minor changes in prompts (e.g., extra spaces, capitalization) can significantly impact LLM performance, underscoring the delicate nature of prompt design.
  • The Trade-off Between Automation and Human Expertise: While automated methods show promise, the most successful approach often involves a combination of human prompt engineering and automated tools.

Key Results

  • The paper establishes a taxonomy of 58 text-based prompting techniques and 40 techniques for other modalities.
  • A vocabulary of 33 terms related to prompt engineering is presented.
  • A meta-analysis of prefix-prompting literature is provided.
  • In the benchmarking case study using GPT-3.5-turbo on MMLU, Few-Shot CoT with Self-Consistency generally performed best, achieving an accuracy of 0.692.
  • The prompt engineering case study for detecting suicidal crisis indicators demonstrated that a human prompt engineer, through an iterative process, achieved an F1 score of 0.53, highlighting the effectiveness of manual prompt engineering. Automated methods like DSPy also showed promise, achieving 0.548 F1.

Limitations and Future Work

  • Incomplete Taxonomy: The authors acknowledge that despite their comprehensive efforts, the taxonomy is an initial attempt and is likely to have gaps and redundancies. The field is rapidly evolving, and new techniques will continue to emerge.
  • Variable Evaluation Standards: The field of prompt engineering is new, and evaluation methods are not yet standardized. This makes it challenging to definitively claim the superiority of any given technique.
  • Model Sensitivity: LLM outputs are sensitive to input changes, meaning techniques may not transfer reliably across different models, problems, or datasets.
  • Future Work: The authors encourage the reader to approach claims with skepticism and recognize the limitations of current techniques. They advocate for situating new methods within their taxonomy and conducting ecologically valid case studies. They also suggest that future work should focus on developing more robust examinations of prompt engineering.

Summary updated

BibTeX
@misc{schulhoff2024prompt,
  author = {Sander Schulhoff and Michael Ilie and Nishant Balepur and Konstantine Kahadze and Amanda Liu and Chenglei Si and Yinheng Li and Aayush Gupta and HyoJung Han and Sevien Schulhoff and Pranav Sandeep Dulepet and Saurav Vidyadhara and Dayeon Ki and Sweta Agrawal and Chau Pham and Gerson C. Kroiz and Feileen Li and Hudson Tao and Ashay Srivastava and Hevander Da Costa and Saloni Gupta and Megan L. Rogers and Inna Goncearenco and Giuseppe Sarli and Igor Galynker and Denis Peskoff and Marine Carpuat and Jules White and Shyamal Anadkat and Alexander Miserlis Hoyle and Philip Resnik},
  title = {{The Prompt Report: A Systematic Survey of Prompting Techniques}},
  year = {2024},
  eprint = {2406.06608},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.06608},
}
Figure