A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications

Pranab Sahoo, Ayush Kumar Singh, Sriparna Saha, Vinija Jain, Samrat Mondal, Aman Chadha · DOI

Abstract

As Large Language Models (LLMs) become increasingly sophisticated, the ability to effectively steer their behavior without resource-intensive fine-tuning has become a critical research frontier. This paper provides a systematic survey of prompt engineering, categorizing over 41 distinct techniques into a unified taxonomy. By analyzing functional domains ranging from logical reasoning to hallucination reduction, we demonstrate how strategic prompt design serves as a non-invasive, computationally efficient alternative to model retraining, unlocking state-of-the-art performance across diverse benchmarks.

Introduction: The Prompting Paradigm Shift

While LLMs and Vision-Language Models (VLMs) possess immense latent knowledge, eliciting precise behaviors for specific tasks remains a significant challenge. Traditional adaptation methods, such as fine-tuning, are often prohibitively expensive and require massive labeled datasets. Prompt engineering has emerged as a "paradigm shift," allowing users to steer models using natural language or vector representations.

The basic workflow of prompt engineering, showing how instructions, context, and user input are processed by a pre-trained LLM to generate a response.

However, the rapid expansion of the field has led to a fragmented landscape where researchers often reinvent existing methods. This survey addresses this gap by providing a rigorous organization of techniques, helping practitioners identify which strategies—such as those for hallucination prevention or code generation—are best suited for their specific needs.

A Taxonomy of Prompt Engineering Techniques

The authors categorize prompt engineering into 12 functional domains, moving beyond simple instruction writing to explain how prompts interact with the underlying transformer architecture.

A comprehensive taxonomy of prompt engineering techniques categorized by functional domains such as reasoning, hallucination reduction, and user interaction.

Key methodological categories include:

  • Reasoning and Logic: Evolution from linear Chain-of-Thought (CoT) to non-linear structures like Tree-of-Thoughts (ToT) and Graph-of-Thoughts (GoT), which enable models to explore multiple reasoning paths or backtrack.
  • Hallucination Reduction: Methods like Retrieval Augmented Generation (RAG) and Chain-of-Verification (CoVe), where models fact-check claims against external data or internal logic.
  • Automatic Optimization: Tools like Automatic Prompt Engineer (APE) and OPRO that utilize LLMs to iteratively refine prompts for other models.
  • Efficiency-Oriented Prompting: Techniques like Chain of Draft (CoD) that maintain reasoning quality while drastically reducing output tokens and latency.

Key Insights and Innovations

Several unconventional findings highlight the depth of the field:

  • The "Emotion" Factor: The EmotionPrompt technique shows that appending emotional stimuli (e.g., "This is very important for my career") can boost instruction induction by 8% and certain Big-Bench tasks by up to 115%.
  • Non-Linearity: Human thought is rarely linear. Graph-of-Thoughts outperforms linear prompting by allowing models to aggregate ideas from different reasoning "branches."
  • Code as a Reasoning Language: Chain-of-Code (CoC) and Program-of-Thoughts (PoT) suggest that prompting models to "think in code" is often more effective for logic and mathematics than natural language.
  • Self-Correction: Self-Refine demonstrates that LLMs can act as their own critics, improving performance in sentiment analysis and code optimization through iterative self-critique.

Performance and Results

The survey references a vast array of benchmarks (GSM8K, HumanEval, MMLU) to validate these techniques:

  • Reasoning: CoT on PaLM 540B achieved 90.2% accuracy on math and commonsense benchmarks. In the complex "Game of 24," ToT reached a 74% success rate, compared to just 4% for standard CoT.
  • Efficiency: CoD achieved an 80% reduction in output tokens and a 76.2% reduction in latency without sacrificing accuracy.
  • Knowledge Retrieval: RAG techniques reached 56.8% on TriviaQA, significantly outperforming standard sequence-to-sequence models.

Limitations and Future Directions

Despite these gains, prompt engineering faces several hurdles:

  1. Prompt Sensitivity: Minor wording changes can lead to "brittle" performance.
  2. Context Constraints: Advanced techniques like RAG or few-shot prompting can quickly exhaust token limits.
  3. Interpretability: The mechanistic reasons why certain cues (like emotional stimuli) improve performance remain poorly understood.

Future research is likely to focus on meta-learning, where models learn to prompt themselves, and hybrid architectures that dynamically select prompting styles based on user intent.

Summary updated

BibTeX
@misc{sahoo2024systematic,
  author = {Pranab Sahoo and Ayush Kumar Singh and Sriparna Saha and Vinija Jain and Samrat Mondal and Aman Chadha},
  title = {{A Systematic Survey of Prompt Engineering in Large Language Models: Techniques and Applications}},
  year = {2024},
  eprint = {2402.07927},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.07927},
}
Figure