- ADIVAS
- Sample lesson
Public sample lesson
Writing a prompt that gets a usable answer
From Generative AI with Python, week 1.
The idea
A model answers what you ask, using the words you gave it. A vague prompt gets a vague, generic answer. A good prompt states who the answer is for, what task to do, what facts to use, how long and in what format, and what to avoid. You then read the result, change one thing and try again. This is iteration, not magic, and it saves time only when you also check the result.
Steps
- State the role and audience, for example a teacher writing for Class 8 students.
- Describe the task in one clear sentence.
- Paste the facts the answer must use, so the model does not invent them.
- Set the format and length, such as five bullet points under 80 words.
- Add limits, such as use simple words and do not add facts that are not given.
- Run it, mark what is wrong, change one item and run again.
In the real world
A shop owner in Madurai wants a WhatsApp message announcing a Pongal discount. A weak prompt gives a generic poster text; a prompt with the real discount, dates, shop name and a 40-word limit gives text that needs only a quick check.
Worked example
Improve this prompt: 'Write about water.' The task is a 100-word science note for Class 6 students on why we should save water.
Role and audience: You are a science teacher writing for Class 6. Task: write a note on why we should save water. Facts: Use only these points - only a small share of Earth's water is fresh and usable; wasted tap water adds up; fix leaks. Format: 100 words, simple sentences, one closing action line. Constraint: do not add numbers that I have not given. The answer is now specific, short and checkable.
Common mistakes
- Asking for facts without giving a source and then trusting the reply.
- Changing five things at once so you cannot tell what improved the answer.
- Accepting the first answer without reading it.
Your turn
- Rewrite 'make a poster text' for a real school event with date, place and audience.
- Take one of your prompts and add a format and a limit; compare the two outputs and note differences.
- Ask the assistant what extra information it needs for a task, answer it, and compare the result.