Preprint
Large Language Models

A Survey of Prompt Engineering Methods in LLMs

Shubham Vatsal, Harsh Dubey
July 17, 2024arXiv.org117 citations

117

Citations

4

Influential Citations

arXiv.org

Venue

2024

Year

Abstract

Large language models (LLMs) have shown remarkable performance on many different Natural Language Processing (NLP) tasks. Prompt engineering plays a key role in adding more to the already existing abilities of LLMs to achieve significant performance gains on various NLP tasks. Prompt engineering requires composing natural language instructions called prompts to elicit knowledge from LLMs in a structured way. Unlike previous state-of-the-art (SoTA) models, prompt engineering does not require extensive parameter re-training or fine-tuning based on the given NLP task and thus solely operates on the embedded knowledge of LLMs. Additionally, LLM enthusiasts can intelligently extract LLMs' knowledge through a basic natural language conversational exchange or prompt engineering, allowing more and more people even without deep mathematical machine learning background to experiment with LLMs. With prompt engineering gaining popularity in the last two years, researchers have come up with numerous engineering techniques around designing prompts to improve accuracy of information extraction from the LLMs. In this paper, we summarize different prompting techniques and club them together based on different NLP tasks that they have been used for. We further granularly highlight the performance of these prompting strategies on various datasets belonging to that NLP task, talk about the corresponding LLMs used, present a taxonomy diagram and discuss the possible SoTA for specific datasets. In total, we read and present a survey of 44 research papers which talk about 39 different prompting methods on 29 different NLP tasks of which most of them have been published in the last two years.

Analysis

Why This Paper Matters

Prompt engineering has emerged as a critical technique for unlocking the full potential of large language models (LLMs) without the computational cost of fine-tuning. This survey by Vatsal and Dubey provides a timely and comprehensive map of the rapidly expanding landscape of prompting methods, covering 39 techniques across 29 NLP tasks. For AI practitioners at Neura Market, this paper is a valuable reference that consolidates scattered research into a structured taxonomy, enabling informed decisions about which prompting strategy to apply for a given task.

The paper's significance lies in its practical orientation: it not only catalogs methods but also reports performance on specific datasets and the LLMs used. This granularity helps practitioners quickly identify promising approaches for their own applications, from sentiment analysis to question answering. By highlighting state-of-the-art methods for particular tasks, the survey reduces the trial-and-error burden that often accompanies prompt engineering.

Technical Contributions

The paper's main technical contributions include:

  • Comprehensive Taxonomy: A hierarchical classification of 39 prompting methods grouped by NLP task (e.g., reasoning, classification, generation) and technique type (e.g., chain-of-thought, few-shot, instruction-based).
  • Performance Benchmarks: For each method, the authors list the datasets used, the LLM employed (e.g., GPT-3, PaLM, LLaMA), and the reported accuracy or F1 scores, enabling direct comparison.
  • State-of-the-Art Identification: The survey identifies which prompting method achieves the best performance on specific datasets, such as chain-of-thought for arithmetic reasoning tasks.
  • Method Categorization: The taxonomy diagram visually organizes methods by task and technique, making it easy to navigate the 44 surveyed papers.

Results

The survey reports that prompt engineering methods consistently improve LLM performance over zero-shot baselines. For example, chain-of-thought prompting boosts accuracy on GSM8K math problems from ~18% to ~58% with GPT-3. On sentiment analysis tasks, few-shot prompting with carefully designed exemplars achieves near state-of-the-art results without any fine-tuning. The paper also notes that instruction-tuned models (e.g., InstructGPT) benefit more from structured prompts than base LLMs, suggesting synergy between instruction tuning and prompt engineering.

Significance

This survey democratizes access to advanced LLM capabilities by showing that non-experts can achieve strong results through natural language prompts alone. For the AI field, it highlights a shift from model-centric to interaction-centric research, where the quality of the prompt matters as much as the model architecture. The taxonomy provides a foundation for future work, such as automated prompt optimization and task-specific prompt libraries. As LLMs become ubiquitous, this paper equips practitioners with a practical toolkit to extract maximum value from these models efficiently.