Analogical Prompting

Keywords: analogical prompting,reasoning

Analogical Prompting is the reasoning strategy that guides language models to solve problems by first recalling or generating analogous problems with known solutions, then transferring the solution approach from the analogy to the target problem — leveraging structural similarity across domains to solve novel challenges — the cognitively-inspired technique that unlocks reasoning by pattern transfer, particularly effective for problems where direct examples are unavailable but structurally similar precedents exist in the model's training knowledge.

What Is Analogical Prompting?

- Definition: A prompting technique that instructs the model to identify or generate problems analogous to the target problem, solve the analogous problem, and then apply the same reasoning strategy to the original problem — exploiting structural isomorphism between different problem domains.
- Self-Generated Analogies: The model generates its own analogous examples from its training knowledge — no external example database needed, making it a zero-resource reasoning enhancement.
- Structural Transfer: The key insight is that problems with different surface features (physics vs. finance, biology vs. engineering) may share identical mathematical or logical structure — analogical prompting exploits this structural similarity.
- Cognitive Science Inspiration: Human analogical reasoning (Gentner's structure-mapping theory) is one of the most powerful cognitive tools — analogical prompting brings this capability to LLMs.

Why Analogical Prompting Matters

- Solves Novel Problems: When the target problem has no direct precedent in few-shot examples, analogies provide a bridge from known to unknown — enabling reasoning by transfer.
- No Example Curation Required: Unlike standard few-shot prompting which requires manually curated examples, analogical prompting asks the model to self-generate relevant examples from its parametric knowledge.
- Cross-Domain Reasoning: Problems in one domain can be solved by recognizing their structural similarity to solved problems in another domain — expanding the effective reasoning repertoire.
- Improves Math and Science: Particularly effective for mathematical reasoning and scientific problem-solving where structural patterns recur across different surface presentations.
- Composable With CoT: Analogical prompting naturally combines with Chain-of-Thought — the model generates an analogy, solves it step-by-step, then applies the same steps to the target.

Analogical Prompting Implementation

Self-Generated Analogy:
- Prompt: "Before solving this problem, think of a similar problem you know how to solve. Describe that analogous problem, solve it, then use the same approach to solve the original problem."
- The model autonomously identifies a relevant analogy, demonstrates the solution method, and transfers it.

Provided Analogy:
- Prompt includes an explicitly stated analogous problem with solution as context.
- "This problem is similar to [analogy]. In the analogous case, the solution works by [method]. Apply the same approach here."
- More controlled but requires the prompter to identify appropriate analogies.

Multi-Analogy Ensemble:
- Model generates multiple different analogies for the same target problem.
- Each analogy suggests a different solution approach.
- Final answer synthesizes insights from multiple analogical perspectives.

Analogical Prompting Performance

| Task Domain | CoT Accuracy | Analogical Prompting | Improvement |
|-------------|-------------|---------------------|-------------|
| GSM8K (Math) | 78.2% | 83.7% | +5.5% |
| MATH (Competition) | 42.1% | 48.9% | +6.8% |
| Science QA | 71.3% | 77.6% | +6.3% |
| Creative Problem Solving | 54.8% | 63.2% | +8.4% |

When Analogical Prompting Works Best

| Scenario | Effectiveness | Rationale |
|----------|--------------|-----------|
| Novel problem, no direct examples | Very high | Analogy provides the missing context |
| Cross-domain transfer needed | High | Structural similarity bridges domains |
| Standard problem with examples | Moderate | Direct examples may be sufficient |
| Purely factual recall | Low | No reasoning structure to transfer |

Analogical Prompting is the reasoning amplifier that gives language models access to their full knowledge base through structural pattern matching — enabling solutions to novel problems by recognizing that the answer already exists in a different form within the model's parametric memory, mirroring one of humanity's most powerful cognitive strategies.

Want to learn more?

Search 13,225+ semiconductor and AI topics or chat with our AI assistant.

Search Topics Chat with CFSGPT