Zero-Code AI App BuilderZero-Code AI App Builder
Prompting & Planning

Examples

Show the AI what good looks like

Describing a style in words is hard. Showing it is easy. Adding examples to your prompt is one of the quickest ways to get the exact format you want.

Why examples work

Imagine teaching someone to fold a paper airplane. You could explain each fold. Or you could fold one in front of them. Most people learn faster from the second way.

AI works the same. When you show one or two samples, it copies the pattern: the length, the tone, and the layout.

  • Zero-shot — you give no examples, only instructions.
  • One-shot — you give one example.
  • Few-shot — you give two to five examples.

"Shot" just means "example" here. The names sound technical, but the idea is simple.

Zero-shot: instructions only

Zero-shot is what you've done so far. It works well for common tasks where any reasonable answer is fine.

Prompt
Write a short motivational message for someone who just finished a 7-day habit streak.

The answer will be fine, but you can't predict the style. It might be long, use emojis, or sound too formal.

Few-shot: show the pattern

When you want a specific style, show it. Here we give two examples, then ask for a new one.

Prompt
Write streak messages for my habit tracker app. Match the style of these examples.

Example 1:
Streak: 3 days
Message: Three in a row. You're building something real.

Example 2:
Streak: 10 days
Message: Ten days strong. This is who you are now.

Now write one for:
Streak: 7 days
Message:

Let's break this down:

  • Both examples are short, calm, and start with the number. The AI notices this.
  • The labels Streak: and Message: show the exact layout to follow.
  • Ending with an empty Message: tells the AI exactly where to fill in.
FeatureZero-shotFew-shot
Effort to writeLowMedium
Control over styleLowHigh
Consistent formatSometimesAlmost always
Best forCommon, simple tasksA specific tone or layout
When to use each approach.

Show the format you want

Examples are great for data too. If you're building an app, you often need many items in the same shape. Show one item, and the AI will match it.

Prompt
I'm adding sample products to my online store. Create 4 more products
in exactly this format:

Name: Linen Table Runner
Price: $34
Category: Kitchen
Description: Soft natural linen, handmade in small batches.

Use handmade home goods only. Keep each description under 12 words.

You can also show a "bad" example to steer the AI away from something:

Prompt
Write a product title for a ceramic mug.
Good: "Speckled Ceramic Mug, 12 oz"
Bad: "AMAZING Best Mug Ever!!! Perfect Gift"
Follow the good style.
Use examples that differ from each other a little (different lengths, different topics). If all your examples are about coffee, the AI may write about coffee every time.

Using real material as examples

You don't have to write examples yourself. You can paste something you already like.

Prompt
Here is a README from a project I like:
[paste it here]

Write a README for my habit tracker app using the same sections and tone.
Only paste content you are allowed to share. Remove names, emails, and private data from real examples first.

Common mistakes

  • Giving examples that don't match each other, so the AI can't find a pattern.
  • Giving too many examples. Two or three is usually enough.
  • Forgetting to say "match this style". Make it clear the examples are a pattern, not content to copy.
  • Expecting the AI to copy your example word for word. It copies the pattern, not the exact text.

Practice

Try these exercises to lock in what you just learned.

Quiz
Not started
What is a few-shot prompt?
Quiz
Not started
You need 20 product descriptions that all follow the same exact layout. What helps most?

What's next?

You now know how to get the answer you want. Next, let's learn how to stop the AI from doing things you don't want, with guardrails.