prompt-eng

Analogical Prompting

Analogical prompting asks the model to first generate its own relevant examples — analogous problems and their worked solutions — and then use them to solve the target problem. Introduced by Google DeepMind researchers (Yasunaga et al., 2023), it's inspired by how people recall similar past problems before tackling a new one. In effect it's self-generated few-shot: instead of you hand-crafting demonstrations, the model produces tailored ones on the fly, which sidesteps the labor of curating examples and lets them adapt to each specific query. Reported results showed it beating plain chain-of-thought and even some fixed few-shot setups on reasoning and math tasks. For SaaS builders, the appeal is maintenance-free in-context learning: you get the accuracy boost of examples without building and versioning an example library per task. The caveats: the self-generated examples can be wrong or off-target, dragging the answer with them, and generating them adds tokens and latency — so it fits reasoning-heavy features on capable models more than simple, latency-sensitive calls.

Related terms

More Prompt Engineering terms