Welcome to Unit 2. In Unit 1 you built a mental model of what GenAI is and where it fails. Now you start using it effectively.
This module teaches the single most important practical skill in this course: how to write a prompt that actually gets what you want. Most people who are disappointed with AI outputs are not using a bad tool — they are writing bad prompts. The model is only as good as the instructions you give it.
By the end of this module you will be able to break any task down into a structured prompt that produces consistent, high-quality output from any tool.
Before learning what makes a good prompt, look at what makes a bad one.
Write a 400-word overview of supervised machine learning. Cover: what it is, how training works, and 2 real-world applications relevant to Indian industry (e.g. banking fraud detection, crop yield prediction).
Use simple language. No jargon without explanation. End with 3 bullet points summarising the key ideas.
The bad prompt is not wrong — it is just empty. The model has no idea who you are, what level of detail you need, what format you want, or what context matters. So it produces a generic, mediocre response.
The good prompt gives the model everything it needs to produce exactly what you want on the first try.
Every effective prompt is built from some combination of these six components. You do not need all six every time — but knowing each one lets you diagnose why a prompt is failing and fix it.
Here is the same task — asking for help preparing for a job interview — written as a weak prompt, then rebuilt using all six components.
What is wrong with this? The model does not know your background, the role you are applying for, what stage of interview preparation you are at, how much time you have, or what format of help you want. The output will be a generic list that could apply to anyone applying anywhere.
I have a TCS NQT technical interview in 5 days. [CONTEXT] I am a final-year CSE student. I am comfortable with Python and data structures but weak on DBMS and OS concepts.
Create a 5-day preparation plan. [TASK]
Format it as a day-by-day table: Day | Topics | Resources (free only) | Practice tasks. [FORMAT]
Keep each day’s plan achievable in 3 hours. [CONSTRAINT] Do not include topics like networking or compiler design — those are not in TCS NQT scope. [CONSTRAINT]
The second prompt will produce a personalised, structured, immediately usable preparation plan — not a generic bullet list. The difference in output quality will be dramatic, and it took about 60 seconds longer to write.
| Mistake | What happens | Fix |
|---|---|---|
| No task verb | "Machine learning in healthcare" — the model does not know if you want a summary, a tutorial, a list of companies, or an essay | Always start with an action verb: explain, write, list, compare, debug, summarise, translate |
| No audience specified | The model defaults to a generic educated adult — too advanced for beginners, too basic for experts | Add "for a [role/level]" — "for a 2nd-year BTech student" or "for a non-technical manager" |
| No format requested | The model picks a format — often long flowing paragraphs when you wanted bullet points, or vice versa | Add explicit format: "respond in a table", "use bullet points", "write in plain paragraphs under 200 words" |
| Asking multiple questions at once | "Explain ML, list Python libraries, and tell me how to get a job in AI" — the model rushes all three and does none well | One task per prompt. Break multi-part work into sequential prompts in the same conversation |
| No context about purpose | "Write an email about the project delay" — the model invents details: who delayed what, for whom, at what severity level | Paste in the relevant context: "The email is to my project manager at Wipro. The delay is 3 days due to a dependency on the API team." |
| Accepting the first output | First outputs are often good but not great. Most people stop here and miss 30–40% quality improvement | Follow up with refinement prompts: "Make it more concise", "Add a specific Indian banking example", "Rewrite the introduction — it is too formal" |
Different tools respond slightly differently to the same prompt structure. Here is what to know:
Writing a good prompt is rarely a one-shot activity — it is an iterative loop. Here is the workflow that experienced prompt engineers use:
Most prompts need 2–3 iterations to reach high quality. This is not a failure — it is the normal workflow. Each iteration teaches you something about what the model needs from you, and over time your first-draft prompts improve because you have internalised what “missing components” look like.
Until writing structured prompts feels natural, use this template for any task:
I need you to [TASK — action verb + what].
Context: [WHO YOU ARE + WHAT THIS IS FOR].
Format: [HOW YOU WANT THE OUTPUT].
Constraints: [WHAT TO AVOID OR LIMIT].
[Optional: Here is an example of the style/format I want: …]
You will not need this template forever — after 20–30 prompts, structuring this way becomes instinctive. But use it consciously for the next week and your output quality will improve immediately.
This is the core skill-building exercise for Unit 2. Each rewrite should take 5–10 minutes.
explain data structureswrite a LinkedIn post about my projecthow do I get a job in AIThere are no perfect answers — the goal is to practise conscious prompt construction. You will use these same techniques throughout Units 2, 3, and 4.
| Claim | Source |
|---|---|
| Six prompt components framework | Lakera Prompt Engineering Guide 2026; promptbuilder.cc 2026 |
| "Prompt engineering is writing clearer specs" (2026 framing) | promptbuilder.cc Prompt Engineering Best Practices 2026 |
| ChatGPT crisp numeric constraints; Claude over-explains without constraints; Gemini prefers shorter direct prompts | Lakera Prompt Engineering Guide 2026; Thomas Wiegold blog February 2026 |
| Few-shot remains one of highest-ROI techniques; try zero-shot before few-shot | Thomas Wiegold Prompt Engineering Best Practices 2026 |
| Google recommends placing specific questions after context; few-shot preferred over zero-shot for Gemini | Google Gemini prompt engineering whitepaper, cited in Thomas Wiegold 2026 |