Memuat
Memuat
Watch every step above performed live, with English narration.
0 plays
Class book
Page 1 / 5
Cover: Agentic AI Without Coding Class #6: Anatomy of a Good Prompt: Role, Context, Task, Format, and Examples
Click a page or use ◀ ▶ to turn · swipe on mobile · to enlarge
Want to go deeper?
Join one of our courses or ask us directly on WhatsApp.
Picked from the software, topic, and level of “Agentic AI Without Coding Class #6: Anatomy of a Good Prompt: Role, Context, Task, Format, and Examples”.
Other ways we can help with Agentic AI.
Learn with a mentor
Scheduled AI & Machine Learning courses with live guidance and a certificate.

MATLAB Agentic AI Course: Building Autonomous AI Agents with MATLAB & Simulink

Midjourney Course: Create Stunning AI Images from Text
★ 4.9

DALL-E Course: Creating Professional AI Images from Text
★ 4.9
Have it built for you
No time to learn Agentic AI? Our team can do the project for you.

MATLAB & Simulink Development — Agentic AI for Simulation Automation and Data Analysis

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
Get notified about new Agentic AI 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.
Welcome to Session 2 of Agentic AI Without Coding. In Session 1 you put together a list of five tasks to automate. Almost all of those tasks start with the same thing: a clear instruction for the AI. In this episode we take apart the anatomy of a good prompt: role, context, task, format, and examples. We compare a careless prompt with a structured one side by side, and see the difference in the results.
Let's start with the term. A prompt is the command or instruction we write for the AI. Think of a prompt as a work brief, like when you give a task to a new employee. A new employee who only gets a one-sentence instruction will have to guess a lot. AI is the same. The more complete the brief, the less the AI guesses, and the more consistent the results. So before blaming the AI for an answer that isn't quite right, check the brief we gave it first. In this episode we learn to write a brief that's complete but still short. Look at this example. Laras, the owner of Sunset Coffee in Bandung, types a very short prompt: write a coffee caption. No product name, no price, no goal. The answer is neat, but extremely generic. There's no Sunset Coffee name, no product, no price, and the hashtags are the same ones millions of posts use. This caption could be used by any coffee shop in the world. Then Laras repeats exactly the same prompt in a new conversation. The result is completely different. The style is more poetic, there are no hashtags, and it still doesn't mention any product. This is the problem we want to solve in this session: results that keep changing. The cause isn't a bad AI app. A prompt that short forces the AI to fill in all the information we didn't give it, and its guesses are different every time. Let's list what the AI had to guess. First, who the writing is for. A caption for students is different from a caption for stay-at-home parents. Second, which product and what price. The AI doesn't know Sunset Coffee sells palm sugar iced coffee for eighteen thousand rupiah unless we tell it. Third, the writing style. Casual and friendly, like a friend, or formal and poetic? Without direction, the AI picks the most common style. Fourth, the length and form. One sentence, three paragraphs, or several options at once? And fifth, the call to action at the end. Should readers order on WhatsApp, visit the shop, or click a link? These five guesses are what make the result miss the mark. The good news is, we can answer all of them in the prompt.
A good prompt can be broken into five parts. The first part is the role: who the AI is in this task. For example a copywriter, a shop admin, or a meeting note-taker. The second part, context: a picture of the business, who the reader is, and the current situation. This is the part people forget most often, yet it removes the most guessing. The third part, the task: exactly what needs to be done. Use a clear verb, such as write, summarize, compare, or rewrite. The fourth part, format: what shape the result takes and how long it is. A list, a table, a short paragraph, or a certain number of characters. And the fifth part, examples: one result you like as a style reference. Not every prompt needs all five parts, but the task and format are almost always required. The order doesn't have to be exactly like this either. What matters is that it's complete. Many people put the examples at the very end, so the AI reads all the rules before seeing the style example. To make it easy to remember, each part answers one question. Role answers: who are you playing? For Sunset Coffee, the answer is a social media copywriter for a local coffee shop. Context answers: what does the AI need to know? For example the business name Sunset Coffee, its location in Bandung, and that its customers are students and young workers. Task answers: exactly what should it do? Here, write three captions for a buy two get one free promo. Format answers: what shape is the result? For example three hundred characters at most, ending with a call to order on WhatsApp, and three hashtags. And examples answers: what kind of result do you like? Just paste one old caption that got the most likes from followers. Now let's assemble these five answers into one complete prompt.
Here's the same prompt after it's been neatly structured. The first block, role. We ask the AI to be a social media copywriter for a warm local coffee shop that's popular with young people in Bandung. The second block, context. Sunset Coffee sells through Instagram and WhatsApp, its customers are students and young workers, and the product is a two hundred fifty milliliter palm sugar iced coffee for eighteen thousand rupiah. The third block, the task. Write three Instagram caption options for a buy two get one free promo, valid Friday to Sunday. Notice that the task is specific: the number, the product, and the period are all clear. The fourth block, format. Each caption is three hundred characters at most, with one or two emoji, ending with a call to order on WhatsApp, then three hashtags. And the fifth block, examples. We paste one old caption whose style we like: short sentences, casual, and mentioning the price straight away. Notice too that this prompt isn't long. It's just five short blocks, fewer than a hundred words. A good prompt is complete, not long-winded. The colored labels on the left are only there to make it easier for us to read. When you type it to the AI, you can write the headings as plain words, like Role, colon, then the content. The AI understands both. Now we send that prompt to ChatGPT. The content is the same as the five blocks, just written more compactly with the headings Role, Context, Task, Format, and Example. Compare the results. All three captions mention the right product and the buy two get one free promo. They're all short, casual, and end with a call to order on WhatsApp. The second caption even works out on its own that two times eighteen thousand is thirty-six thousand rupiah for three cups. You still have to check numbers like this, and this time the math is correct. The hashtags also mention the shop name and the city. From one structured prompt, the results can be picked and posted right away without much editing. Let's line up before and after. Product and price: the careless prompt mentions nothing, while the structured prompt names them exactly. Writing style: the first sounds generic and sometimes poetic, the second is casual and follows the brand example. Length and form: the first is random, the second is always three options with a controlled length. Call to action: the first has no clear call to action, the second always points readers to order on WhatsApp. And most importantly, when repeated. The careless prompt produces something completely different. The structured prompt only changes a few words, but the style stays the same. That's what consistent means.
The examples part is often the most powerful. Let's look at Mr. Hendra, a teacher at Cerdas Tutoring. Mr. Hendra asks Claude for feedback on an essay by a student named Rafi, with a role, context, task, and format, but no example. The result is correct, but stiff and long, like an official report. The word short in the format turned out to mean something different to the AI. And an eighth grader may not understand a phrase like coherence between paragraphs. Mr. Hendra then pastes one piece of feedback in the teacher's own style: greet the student by name, praise one thing, then give one concrete suggestion. Mr. Hendra asks the AI to rewrite it with the same style, length, and structure as the example. The result changes immediately. Short, warm, with one compliment and one clear suggestion, exactly Mr. Hendra's pattern. One example works better than ten adjectives like short, casual, or friendly. This technique of giving an example works for any kind of work: captions, customer replies, emails, or practice questions. AI is very good at copying patterns, so give it the right pattern. So when are examples needed most? For captions and sales content, definitely. A brand style is hard to describe with adjectives, but easy to copy from an example. For customer replies, examples are needed too, so the tone and length of replies match, no matter which admin is on duty. For summaries and tables, examples are optional. A clear format, like the table's column names, is usually enough. And for brainstorming ideas, examples aren't needed at all. An example that's too specific makes the AI's ideas narrow and samey. Let the AI roam free, then you do the choosing. Here are four tips for giving examples. First, one to three examples is enough. Too many examples make the prompt heavy, and the results come out stiff, like photocopies. Second, choose your best real examples. For instance, the caption that got the most likes, or a customer reply that someone praised. Third, label it as a style example. Write a sentence like: copy the style and length, not the content. Without that label, the AI sometimes copies the example sentences word for word. Fourth, mask personal data. If your example comes from a customer chat, replace the name, phone number, and address before pasting it into a public AI.
Besides the five main parts, there are three extra ingredients that make results safer. The example comes from Dewi, operations manager at Maju Bersama Co. The role block: an administrative assistant who writes polite, concise business emails. The context block: Maju Bersama Co. is an office stationery distributor, and the writer is Dewi, the operations manager. The task block: tell the customer that the delivery is delayed by two days because stock arrived late at the warehouse. Now, here's the first ingredient: data. The facts that must be used: fifty reams of A4 paper, an original schedule of Monday, and a new schedule of Wednesday. With a data block, the AI doesn't need to make up numbers. The second ingredient: the goal. Not just informing the customer, but making sure they keep trusting us and don't cancel the order. This goal shapes the tone of the writing. The third ingredient: limits. One hundred twenty words at most, don't promise a discount, and don't blame anyone else. Limits stop the AI from taking too much initiative, like offering a discount you never approved. We paste the result as a draft in Gmail. The inbox shows the original context: news from the warehouse that stock is delayed, and the customer's order for fifty reams. Open the draft. All the data is used correctly: fifty reams, and Monday becomes Wednesday. The tone is polite, there's an apology, and there's a promise to give an update when the goods ship. Notice what's missing: no promised discount, and no sentence blaming the supplier. It's also under one hundred twenty words. The limits did their job. Still, remember that this is a draft. Dewi reads it again, makes sure the customer's name and the dates are right, and only then presses send. AI writes, a human decides. The same prompt can be reused for similar cases too. Just change the order data. This is the seed of the template we build in the next episode. So when do you use these extra ingredients? Use a data block whenever numbers, names, dates, or prices must be exact. Don't leave the AI to remember your prices. Use a goal block when the tone of the writing decides the outcome. For example, persuading past customers to buy again, calming an angry customer, or convincing a potential client. And use a limits block when there's something risky, such as promises, discounts, health claims, or sensitive topics. These limits become very important later, when AI starts working on its own as an agent.
Before pressing Enter, make a habit of checking your prompt with this checklist. First, role: is it clear who the AI is playing? Second, context: are the business, the reader, and the situation stated? Third, task: does it use a specific verb and say how many you want, such as three captions or five points? Fourth, format: are the shape of the result and its length limit clear? Fifth, examples: if you have a result you like, paste it in as a reference. Sixth, data: the facts, numbers, and names that must be used are written down, so the AI doesn't make them up. Seventh, limits: the things the AI must not do, such as promising discounts. And eighth, safety: make sure there's no customer personal data, like phone numbers or full addresses, in the prompt you send to a public AI. There are also three mistakes that happen most often. First, a long, rambling prompt full of business background, but the task is still vague. Long isn't the same as clear. Always make sure there's one firm task sentence. Second, asking for ten different things in one prompt: a caption, a product description, a complaint reply, and promo ideas all at once. Everything comes out shallow. It's better to split it into a few focused prompts. Third, pasting customers' personal data into a public AI. Just write a first name or initials, and leave out phone numbers and full addresses. We go deeper into privacy in Session 9. Now it's your turn. First, choose one task from the list of five you put together in Session 1. Second, write a prompt for that task with five parts: role, context, task, format, and examples. Add data and limits if needed. Third, run that prompt twice in new conversations, then compare. If the results are still very different, find which part isn't clear enough and fix it. Fourth, save your best prompt. In Episode 7, we turn that prompt into a template you can reuse again and again. One last tip: give every prompt you save a clear name, such as Promo caption or Delayed delivery email. Later, when you have more of them, you won't struggle to find them.
Let's recap. A good prompt is a complete work brief: role, context, task, format, and examples, plus data, goals, and limits when needed. With this structure, the AI stops guessing and the results are consistent. In the next episode we turn your best prompt into a template with variables, so you write it once and reuse it every day. See you in Episode 7.
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 →