A comprehensive taxonomy of prompt engineering techniques for large language models

Yao-Yang Liu, Zhen Zheng, Feng Zhang, Jin-Cheng Feng, Yi-Yang Fu, Jidong Zhai, Bingsheng He, Xiao Zhang

Introduction

While Large Language Models (LLMs) like GPT-4 exhibit remarkable capabilities, eliciting reliable and accurate outputs remains a significant challenge. LLMs are notoriously sensitive to prompt phrasing; unstructured or vague inputs often result in hallucinations, logical inconsistencies, or high variance in responses. Consequently, prompt engineering has emerged as a vital research area. However, the field has remained fragmented, with existing literature often focusing on narrow scenarios like reasoning or retrieval in isolation. This paper addresses this gap by proposing a universal, foundational framework that systematizes prompt engineering into a structured methodology, moving it from an ad-hoc "dark art" to a principled engineering discipline.

A Unified Taxonomy of Methodologies

The core contribution of this work is a novel taxonomy that maps prompt engineering techniques to the functional divisions of autonomous AI agents. The authors categorize the field into four functional pillars: Profile & Instruction, Knowledge, Reasoning & Planning, and Reliability.

The proposed taxonomy of prompt engineering methodologies and their corresponding applications.

1. Profile and Instruction

This pillar forms the foundation of any prompt. It involves establishing the LLM's persona (e.g., "You are an expert financial analyst") and clearly defining the task through three key aspects: intent, demand, and domain.

Breakdown of a task instruction prompt into intent, demand, and domain to provide clarity.
  • Intent: Illustrates the primary requirements and provides initial clarity.
  • Demand: Supplements subsidiary information for a more detailed goal description.
  • Domain: Indicates the expected source of task-related knowledge.

2. Knowledge Augmentation

To reduce hallucinations, prompts can be augmented with external information via Retrieval-Augmented Generation (RAG). The paper distinguishes between basic RAG and advanced techniques, which include pre-retrieval query rewriting, post-retrieval document filtering, and sophisticated memory management.

3. Reasoning and Planning

These techniques enable LLMs to tackle complex problems by "thinking" through them. This includes target decomposition (e.g., Chain-of-Thought), the integration of external tools (like code interpreters), and the implementation of feedback loops such as self-reflection.

4. Reliability

Reliability methods ensure consistent and safe outputs. Techniques include prompt ensembling—using multiple prompt variations and aggregating answers to reduce variance—and detoxification methods to mitigate value bias.

Key Insights

  • Prompting as Agent Design: The taxonomy aligns with autonomous agent architectures (Profile, Memory, Planning, Action). Effective prompt engineering is essentially a form of lightweight agent design.
  • Instructions vs. Examples: While few-shot examples are effective for formatting, explicit task instructions are superior for enforcing strict logical constraints.
  • Code for Logic: For complex reasoning, offloading logic to generated code (e.g., Program-of-Thoughts) is often more robust than relying on the model's natural language reasoning.
  • Ensembling for Stability: Similar to traditional machine learning, applying ensemble methods to prompts (Bagging/Boosting) significantly reduces hallucinations.

Performance Results

The efficacy of these structured techniques is supported by significant performance gains reported across the literature:

  • Self-Refine: Techniques where the model critiques its own output showed absolute improvements of 5% to 40% over baselines.
  • System2Attention (S2A): Prompting models to filter retrieved documents before answering improved factuality on TriviaQA from 62.8% to 80.3%.
  • Document Structure Adjusting: Intentionally structuring irrelevant documents during RAG reconstruction improved accuracy by over 30% in specific studies.

Future Directions

The authors identify several critical areas for future research, including the development of defensive prompt engineering to counter jailbreak attacks and the integration of reasoning directly into the retrieval process ("Thinking-Powered RAG"). Furthermore, moving toward automatic prompt optimization and enabling slower, deliberate "System 2" thinking will be essential for the next generation of LLM applications.

Summary updated

BibTeX
@article{liu2026comprehensive,
  author = {Yao-Yang Liu and Zhen Zheng and Feng Zhang and Jin-Cheng Feng and Yi-Yang Fu and Jidong Zhai and Bingsheng He and Xiao Zhang and Xiaoyong Du},
  title = {{A comprehensive taxonomy of prompt engineering techniques for large language models}},
  journal = {Frontiers of Computer Science},
  year = {2026},
  doi = {10.1007/s11704-025-50058-z},
}
Figure