In the last article of the "Prompt Master's Workshop" series, The Anatomy of a Masterful Prompt, we broke down the recipe for a solid query into its core components. We mastered the 4 key ingredients: Instruction, Context, Persona, and Format. That is our absolute foundation. But what if we want to teach the AI something truly subtle—like our unique writing style, a specific brand communication tone, or custom data formatting?
This is where my frustration used to begin. I remember spending long minutes trying to describe to the AI what I meant. "Write this in a witty but not crude way," "Use professional yet accessible language." The results were... mixed. I felt like I was wasting time explaining instead of getting results. Then, much like with my first "epiphany" that I wrote about in Become a Prompt Master in One Day, I realized I had to change my approach.
I stopped explaining and started showing.
Today, I'm going to share a technique with you that has saved me countless hours. It's a method that, instead of describing, gives the AI a ready-made template to follow. In the world of prompt engineering, this is called "N-shot prompting" It sounds technical, but the idea is brilliantly simple.
Imagine you're teaching someone to ride a bike. You could spend an hour describing the theory of balance, the motion of the pedals, and how the brakes work. But how much more effective would it be if you just got on the bike and showed them how it's done?
It's exactly the same with AI. Sometimes the most effective instruction is simply an example. The "N-shot prompting" technique involves including one or more examples in your query to teach the model exactly what kind of result you expect. The word "shot" in this context simply means "example" or "try." When we say "One-shot," we give one example. When we say "Few-shot," we give several. That's the whole secret behind the name!
We can break this technique down into three levels of advancement.
This is our starting point and the technique we perfected in the previous article. "Zero-shot" means we provide the AI with no examples. We rely solely on the power of a well-crafted prompt using Instruction, Context, Persona, and Format.
When do I use it? Almost all the time, for most standard tasks. If you want to write an email, summarize a text, or generate ideas, a solid prompt based on the 4 ingredients is perfectly sufficient.
Example (review of the anatomy):
INSTRUCTION: Write an Instagram post
CONTEXT: for our coffee shop 'Aroma Cafe,' announcing our new 'Guatemalan Hills' coffee.
PERSONA: Write in the tone of an enthusiastic barista.
FORMAT: The post should be about 300 characters long and include 3 hashtags.
This is Zero-shot prompting in action. It works great, but it has its limits when nuances come into play.
This is where the real magic begins. "One-shot" means you include one, perfect example of what you want to achieve in your prompt. It's like giving the AI a template and saying, "Do it exactly like this."
When do I use it? When I need a very specific response format or a unique style that's hard to describe in words.
Example: Sentiment Analysis Let's say we want the AI to classify customer reviews into just three categories: "Positive," "Negative," or "Neutral."
Prompt (Zero-shot):
Assess the sentiment of this review: "The coffee was delicious, but the service was very slow."
Result (unpredictable): "The review is mixed. The customer praises the coffee but complains about the service. It could be considered partially positive..." -> Too long, not what I asked for.
Prompt (One-shot):
Analyze the sentiment of the review and respond with only one word: "Positive", "Negative" or "Neutral".
Example:
Review: "Everything was great, I recommend it!"
Sentiment: Positive
Result (perfect)
Neutral
This is the most advanced level. "Few-shot" means you give the AI several examples so it can learn a more complex pattern or handle an ambiguous task. It's like a mini-training session within a single query.
When do I use it? When the task is really complicated and the nuances determine its success. It works great, for example, when teaching the AI a specific communication style or for complex data categorization where simple rules are not enough.
Example: Feedback Categorization Let's say we want to sort feedback about our website not just as "good" or "bad," but into more detailed categories: "Feature Suggestion," "Technical Issue," "Content Praise."
Prompt (Few-shot):
Classify the following user feedback into one of three categories: "Feature Suggestion", "Technical Issue" or "Content Praise".
Example 3:
Feedback: "I can't log in, the page keeps crashing."
Category: Technical Issue
Result (perfect)
Feature Suggestion
Knowledge is one thing, but real learning begins with action. Just like in the previous article, I've prepared materials to help you put theory into practice.
➡️ Download the free Workbook for this lesson! You'll find new, practical exercises that will help you practice One-shot and Few-shot prompting techniques. The workbook, of course, comes with an answer key with my example solutions. You can find them in a separate document, which I am providing HERE.
I want to be completely transparent with you. In the spirit of what I teach, this article was created in close collaboration with my creative partner, artificial intelligence. I worked with the Google Gemini 2.5 Pro model at every stage—from the initial idea and structure, through the writing process, to the final translation of the article from Polish to English. For me, this is the best proof that AI is not a threat, but a powerful tool that enhances human creativity. I provided the ideas, experience, and direction, and Gemini helped me shape them. I hope that the result of our collaboration is valuable to you.
My rule of thumb is simple:
Always start with a solid Zero-shot prompt, built on the 4 components of anatomy. In 80% of cases, this will be enough.
If you care about a specific format or style, add one example (One-shot).
If the task is complex and full of nuances, use a few examples (Few-shot) to give the AI a mini-training.
The "Show, Don't Tell" technique is one of the most powerful tools in my toolbox. It frees you from the frustration of endless clarification and allows you to achieve results that seemed impossible at the beginning of my journey.
Now it's your turn. Try taking one of your regular tasks and instead of describing to the AI what to do, just show it an example. I'm sure you'll be surprised by the results. In the next article of the "Prompt Master's Workshop" series, we will tackle another powerful technique—we will teach the AI how to think "step-by-step."
Let me know in the comments in what situations the "showing" technique could be most useful in your work!
What is the main difference between One-shot and Few-shot prompting?
Simply put: the number and purpose of the examples. In One-shot, you provide one perfect example to show the AI mainly the format or a very simple style of the response. It's like showing a document template. In Few-shot, you provide several different examples to teach the AI a more complex pattern that requires understanding nuances and context. It's like showing a few solved math problems so the student understands the method, not just the answer.
Can my examples be too long? Is there a limit?
Yes, that's a very important question. Every AI model has a "context window," which is a limit on the number of characters (or more accurately, tokens) it can process in a single query. If your examples are too long, they might "push out" your actual instruction or task from its memory. Try to make your examples as concise as possible while still preserving the essence of the pattern you want to teach the AI.
What should I do if the AI just starts copying my example instead of learning the pattern?
This is a classic problem! It happens when the example is too similar to the task you're assigning. There are two solutions. First, make sure your examples are varied and show different aspects of the problem (like in my feedback categorization example). Second, clearly separate the examples section from the task section using headings like "Examples:" and "Your task:". This helps the AI understand what is learning material and what is the actual command to execute.