Memuat
Memuat
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Claude from Zero to Expert Class #7: Giving Examples So Results Match Expectations”.
Other ways we can help with Claude.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

Midjourney Course: Create Stunning AI Images from Text
★ 4.9

DALL-E Course: Creating Professional AI Images from Text
★ 4.9

Stable Diffusion Course: AI Art from Beginner to Professional
★ 4.9
Have it built for you
No time to learn Claude? Our team can do the project for you.

AI Image Creation with Stable Diffusion — Unlimited Custom Visual Production
★ 4.9

AI Image & Video Creation with Leonardo AI — All-in-One Visuals for Business
★ 4.9

AI Image Creation with Midjourney — Cinematic AI Art for Business
★ 4.9
Get notified about new Claude classes
At most one email a week. Unfollow anytime with one click.
The full narration of this video. The current sentence is highlighted while the video plays; click any sentence to jump there.
Hi, and welcome back to the Prompt Basics session. In the previous episode we built prompts with a role, context, task, and format. Now we add one very powerful technique: giving examples. We'll learn to use one example, several examples, data format examples, and examples of what to avoid.
Imagine asking a tailor to make a shirt that's relaxed but neat. The result could be anything. But if you bring a sample photo, the result gets much closer to what you want. Claude works the same way. Words like casual, professional, or catchy mean different things to different people. One real example is often clearer than a paragraph of explanation. This technique is often called few-shot prompting. The name doesn't matter. What matters is that you always have your best writing samples ready to paste. From one example, Claude can pick up many things at once. First, tone: how you greet people, how friendly you are, and the words you usually use. Second, length: how many sentences, and whether they're short or long. Third, emoji and punctuation: how many emoji, and where they go, at the start or at the end. Fourth, structure: the order of the parts, for example a catchy opening, a short body, then a call to buy. Describing these four things in words takes a long paragraph. With an example, you just paste one piece of writing that has already worked well.
Let's practice. Nadia manages Sunset Coffee's Instagram account. The client really loves one old caption. Nadia pastes it with the label Example, then asks for a cold brew caption in the same style. Look at the result. The example's pattern is copied exactly: a relatable opening question, one emoji, the price with the word just, then a call to order via DM. But the content is new, written for the cold brew. Since it fits, Nadia asks for two more captions for the gift hamper in the same style. Claude gives two variations that stay consistent. The client's Instagram feed feels like it's written in one voice. The key is the label. With the word Example and a blank line to separate it, Claude knows what to copy and what the actual request is. For examples to work well, follow four small rules. First, write the request first: what to create and for which product. Second, add a clear label like Example or Style example. Third, separate the example with a blank line, so it doesn't mix with the instruction. In Claude's message box, press Shift and Enter to start a new line. Fourth, say what should be copied: the style and length, not the content. This stops Claude from copying the example sentence word for word. With these four rules, a single example is enough for most of your daily writing needs.
With just one example, Claude's results are sometimes too similar. For example, every caption opens with a question. The fix is to give two or three varied examples. The task here also makes it clear: copy the style, don't copy the sentences. The first example opens with a question about a tough Monday, then mentions the price with the word just. The second example doesn't use a question. It opens with a rainy afternoon mood and ends with the opening hours. The third example opens with payday and ends with the words limited stock. All three have different openings and endings, but they're all short, casual, and use one emoji. From this, Claude picks up the general pattern instead of copying one sentence. So when should you use one example, and when several? One example is good for copying a style quickly. Several examples are good when you need lots of variety that stays consistent. The risks are different too. One example can make the results too similar. Several examples make the prompt longer, but it's usually worth it. In practice, one example is enough for a customer reply. For five captions over a week, use two or three examples. One more thing: choose examples that are truly good. Claude copies whatever you give it, including typos and bad habits in the example.
Examples aren't only for writing style. They're also very useful for tidying up data. Dimas receives orders by chat in messy writing: one has a typo, another has no capital letters. He gives one example row in the format name, product, quantity, and total. As a result, all the orders become a consistent table. The misspelled liter of iced coffee is understood correctly, and Sari's order is split into two rows. One example row turns out to be enough to explain the column order, how to write product names, and the rupiah format. Imagine having to explain all of that in long sentences. Look at the totals. Claude uses Sunset Coffee's official prices, which Dimas mentioned in the example and the request. Still double-check the numbers before recording them, especially when there are discounts. Dimas then copies the table into the order spreadsheet and adds a date column. The first row is Rina's order, which served as the format example earlier. Budi's order comes in with the standard product name: cold brew, five hundred milliliters. Sari's two orders are recorded separately, so they're easy to count per product. Sari's second order also comes complete with the one-liter price. Finally, Andi's order: three cups of iced coffee. Every row follows the same format and is ready to add up. Tidying up orders, which used to take a while, is now just a matter of checking. We'll learn how to read and process data files in the Working with Files session.
The last technique: a negative example, meaning an example of what to avoid. Start with the task as usual. Add a good example, here the hamper caption the client liked recently, whose style we want to copy. Then add a bad example with a clear label, such as not like this. Include the reason: too pushy, all capital letters, and too many emoji. The reason matters. Without it, Claude only knows that sentence is bad. With it, Claude knows which qualities to avoid in every caption that follows. Now build your second go-to prompt, then check it against this list. First, the request comes first, then the examples. Second, the examples are labeled and separated by blank lines. Third, use two or three examples when you need lots of variety. Fourth, there's a sentence that makes it clear: copy the style, not the sentences. Fifth, if you use a negative example, include the reason. Save this prompt in your notes as Go-To Prompt number two, along with your best examples. Those examples are an asset, so update them every time a new piece of writing does well.
We've learned to give one example to copy a style, several examples for varied results, a format example to tidy up order data, and a negative example with its reason. In the next episode we learn iteration: how to ask for specific revisions until the result is exactly right. See you there!
Try these on your own after watching to lock in what you learned.
Type a question or keyword; we find the part of this episode that explains it and jump the video there.
Notes are saved with the current video time and are only visible to you.
Stuck on a step? Ask here; the instructor and other learners can answer.
No questions yet.

Cerdas Inovasi Digital Team
Software developers, BIM & 3D engineers, and AI practitioners
We build software, BIM models, games and AI automations for clients every day, and turn that hands-on work into step-by-step classes: every step is shown on screen and comes with a PDF guide you can keep.
See our clients →