Skip to main content
← Back to techniques

Analogical Prompting

Reasoning

Level 2 · Advanced reasoning

Ask the model to recall similar problems it has solved before, then apply the same approach to the new one.

Analogical prompting asks the model to first recall one or two similar problems and how they were typically solved, before tackling the actual problem — surfacing a useful problem-solving pattern the model already has access to but wouldn't otherwise apply. Unlike few-shot, the user doesn't supply the examples — the model generates its own relevant analogy.

When to use it

Use it for problems that resemble a known category or pattern — the model likely has relevant experience with similar cases, and surfacing it first often improves the final answer.

When to avoid it

Avoid it for genuinely novel problems with no useful analogy, or for very simple tasks where recalling a similar case adds length without adding value.

Advantages

  • Surfaces relevant knowledge without the user having to supply examples (unlike few-shot)
  • Works well for problems that fit a recognizable pattern
  • Can reveal a genuinely useful approach the model wouldn't have used directly

Disadvantages

  • The recalled analogy can be superficial or misleading if the problem only resembles it on the surface
  • Adds an extra reasoning step compared to answering directly

Examples

How should I structure a rate limiter for a public API with wildly uneven traffic?

First, recall 1-2 similar problems you're aware of and briefly describe how they were typically solved. Then apply the most relevant approach to this specific problem.

Pairs well with

Try it

Fill in the placeholders below and see the compiled prompt update live.

What you want to achieve.

24
Words
165
Characters
0/1
Placeholders filled
1 min
Reading time
Quality score6
  • Completeness0
  • Clarity0
  • Context0
  • Specificity0
  • Constraints0
  • Format0
  • Output0
  • Constraints note0
  • Success criteria0
  • Scope focus100
  • Verification step0
  • Negative example0
  • Confidence0
  • Placeholder syntax100
  • Markdown structure0
Suggestions
  • Fill in the remaining placeholders.
  • Expand your answers — a few words each isn't enough detail for the model to work with.
  • Add background context so the model understands the situation.
{{OBJECTIVE}} First, recall 1-2 similar problems and briefly describe how they were typically solved. Then apply the most relevant approach to this specific problem.
AI Assistant

Jump to a page…

Navigation