What is zero-shot prompting?
Zero-shot prompting means asking an AI to do something without giving it any examples. You just describe the task and let the model figure it out on its own. The “zero” refers to the number of examples provided: zero.
Historically, this was the hard part. Earlier machine learning models needed to be trained on examples of a task before they could do it at all. Few-shot prompting was itself considered a breakthrough when GPT-3 arrived in 2020, because the idea that a model could pick up a task from just a handful of examples in the prompt was new and impressive. Reliable zero-shot performance across a wide range of tasks only became practical with more recent, larger models. It’s one of the clearest signs of how much the field has advanced.
Today, zero-shot is the most common way people use AI. When you ask Claude to “summarize this article” or “translate this to French” or “write a function that sorts a list,” you’re zero-shotting. You’re relying on the model’s existing knowledge and capabilities to understand what you want without any hand-holding.
The contrast is few-shot prompting, where you include a few examples in your prompt to show the model the pattern you want. If you need a very specific output format, or you’re working on a niche task the model might not handle well by default, a few examples can dramatically improve the results. The model picks up on the pattern and follows it.
Zero-shot works well for common, well-defined tasks. Few-shot is better when the task is unusual, when format matters a lot, or when you’re getting inconsistent results and need to steer the model more precisely.
Most of the time, zero-shot is good enough. Modern models are capable enough that they handle most requests correctly without hand-holding. But knowing that you can always add examples to improve results is a useful technique to have in your back pocket.
The place I think about this most is Claude Code. I regularly have to re-prompt it to get a feature built the way I want. But whenever I do, I try to update CLAUDE.md or the linter so that the same re-prompt isn’t needed next time. It’s a reminder that models can’t always nail exactly what you had in mind from a single prompt, and that the fix is often to give the model better context upfront rather than correcting it after the fact.