Prompting Techniques by Task Type

A survey of 39 prompting techniques across 29 NLP tasks reveals distinct patterns in what works where. No single technique dominates; optimal selection depends on task characteristics.

Mathematical Problem Solving

Best approaches: Program-of-Thoughts (PoT), Program-Aided Language Models (PAL), Chain-of-Code

Why: These tasks require precise computation where LLMs make arithmetic errors. Delegating calculation to external interpreters eliminates this failure mode while leveraging the model’s strength at problem decomposition.

Performance: PoT shows ~12% average improvement over Chain-of-Thought; PAL achieves >90% on some reasoning benchmarks.

Reasoning Tasks (Logical, Commonsense, Multi-hop)

Best approaches: Chain-of-Thought, Self-Consistency, Tree-of-Thoughts

Why: Reasoning benefits from explicit intermediate steps. Self-Consistency adds robustness by sampling multiple paths. Tree-of-Thoughts enables exploration with backtracking for complex problems.

Performance: CoT improves mathematical reasoning by up to 39%, commonsense by 26%. Tree-of-Thoughts shows 65% better success rates than CoT on mathematical tasks.

Knowledge-Intensive Tasks (QA, Fact Verification)

Best approaches: Chain-of-Verification, Implicit RAG, Chain-of-Knowledge

Why: Factual accuracy requires verification mechanisms. These methods either check claims against external knowledge or have the model verify its own assertions through independent questioning.

Performance: CoVe improves F1 by up to 23% on closed-book QA.

Classification and NLU Tasks (NER, Relation Extraction, Inference)

Best approaches: Metacognitive Prompting

Why: These tasks benefit from nuanced interpretation and self-reflection rather than step-by-step reasoning or computation. The five-stage metacognitive process (comprehend → judge → evaluate → decide → assess confidence) consistently outperforms alternatives.

Performance: Up to 26.9% improvement on domain-specific classification tasks.

Table-Based Reasoning

Best approaches: Chain-of-Table, specialized structured prompts

Why: Tabular data has inherent structure that general reasoning methods don’t exploit effectively. Techniques designed for table manipulation consistently outperform general methods.

When Each Applies

Task TypePrimary MethodWhy It Works
Math/numericalPoT, PALOffloads error-prone computation
Multi-step reasoningCoT, ToTSurfaces intermediate steps
Factual accuracyCoVeSelf-verification catches errors
Classification/NLUMetacognitiveSelf-reflection improves judgment
Structured dataDomain-specificExploits inherent structure

The pattern: match the prompting technique to the primary challenge of the task, computation, reasoning, verification, interpretation, or structure.

Related: 05-molecule—chain-of-thought-prompting, 05-molecule—tool-delegation-pattern, 05-molecule—metacognitive-prompting, 05-molecule—chain-of-verification