How to Write Better AI Prompts: A Visual Beginner’s Guide

AI BASICS TO ADVANCED · LESSON 06
A better brief.
A better starting point.
A visual guide to asking AI for what you actually need.

Raju wants an attractive description for his ginger tea. He types, “Write something good.” But good for whom? A menu, a poster, or a social post? Today, we turn vague requests into clear instructions, one small improvement at a time.

01. What is an AI prompt?

A prompt is the input you give an AI model: instructions, questions, examples, or supporting information. A useful prompt makes the intended task clear. You do not need impressive vocabulary or a secret phrase; you need a brief that communicates your goal.

START WITH THE READER’S NEED
01
Goal
What do you want done?
02
Input
What information will help?
03
Result
What should the answer look like?
Prompting guides the response. It does not guarantee correctness.

02. Show the difference: vague vs. specific

“Write about tea” could lead to a history essay or a recipe. “Write a friendly menu description under 30 words for ginger tea, using only these ingredients…” narrows the task. Both are prompts, but the second gives the model clearer criteria.

LESS GUESSWORK
01
Vague request
Write something about tea
02
Clear request
Menu description; supplied facts; under 30 words
Specificity helps when it serves the task. Extra irrelevant instructions can make a prompt harder to follo

03. Name the task with a clear verb

Start with an action: summarize, compare, explain, extract, rewrite, or draft. If several outcomes are needed, state them explicitly or divide the work into stages. Raju needs a menu description, so “Draft a menu description” is a useful starting point.

CHOOSE AN ACTION
01
Explain
Teach a concept
02
Extract
Pull fields from supplied text
03
Draft
Create a first version
Choose the verb that matches your purpose rather than asking the model to “do something useful.”

04. Provide relevant facts

Raju supplies the actual ingredients: black tea, milk, fresh ginger, and sugar. He does not need to include unrelated order history. Relevant context reduces the need to guess, but the model can still add unsupported details unless the output is checked.

FACTS BEFORE FLOURISH
01
Include
Confirmed ingredients
02
Omit
Unrelated shop history
03
Protect
Private customer information
Only provide information you are permitted to share with the service.

05. Specify the audience and output

A description for a menu should differ from an explanation for a chemistry class. Specify audience, tone, and format when they matter. For Raju: first-time customers, friendly English, one sentence. A role such as “menu editor” may help frame the task but does not grant expertise or verification.

DEFINE THE RESULT
01
Audience
First-time customers
02
Tone
Friendly and simple
03
Format
One sentence, under 30 words
For strict machine-readable output, use supported structured-output features and validate the result; a prompt alone is not a guarantee.

06. Add boundaries and missing-data behavior

Tell the model what to do when needed information is missing. Raju can say, “Use only the facts below. Do not invent prices or awards. If a required detail is missing, ask me.” Avoid contradictory requests such as “one sentence” and “five detailed paragraphs.”

MAKE THE BOUNDARIES CLEAR
01
Allowed evidence
The supplied ingredient list
02
Missing information
Ask or mark as unknown
03
Output limits
One sentence; no invented claims
These instructions reduce ambiguity, but you still need to check the response.
Raju’s complete prompt
Draft a menu description for first-time customers.

Facts: Ginger tea made with black tea, milk, fresh ginger, and sugar.

Use friendly, simple English. Return one sentence under 30 words. Use only these facts. Do not add prices, awards, or health claims.
Illustrative result

Enjoy a warming cup of black tea with milk, fresh ginger, and sugar—a comforting choice for your tea break.

A teaching example, not a recorded benchmark result. Actual outputs can vary.

07. Use examples when format is hard to describe

An example can demonstrate the desired mapping or style. For a menu extractor, show “Ginger tea ₹20” becoming “Ginger tea | 20 | INR.” Several input-output demonstrations are often called few-shot prompting. Keep the examples consistent with the instructions and include relevant edge cases.

SHOW THE PATTERN
01
Example input
Ginger tea ₹20
02
Example output
Ginger tea | 20 | INR
03
New input
Masala tea ₹25
Expected matching format: Masala tea | 25 | INR. Examples guide behavior without retraining the model.

08. Separate instructions from source material

Use clear headings such as TASK, SOURCE, and OUTPUT FORMAT. This helps distinguish what to do from the material to process. For example, a customer review is evidence to summarize, not a trusted instruction to change the assistant’s rules.

MAKE THE SECTIONS VISIBLE
01
TASK
Summarize the review
02
SOURCE
The review text
03
OUTPUT
Two factual bullet points
Headings and delimiters aid clarity; they are not a complete defense against prompt injection. Applications need additional controls.

09. Review the result before publishing

Suppose the draft calls Raju’s tea “award-winning.” That claim is absent from his facts. Remove it or verify it independently. Ask for a focused revision, but also inspect the new version: having the model check itself is not independent proof.

THE REVIEW CHECKPOINT
01
Facts
Are claims supported?
02
Instructions
Did it follow the brief?
03
Usefulness
Does it help the intended reader?
A fluent or confident answer can still be incorrect.

10. Revise one specific problem at a time

Instead of “Make it better,” name what needs improvement: “Remove the award claim. Keep the ingredients unchanged. Use fewer than 25 words.” For repeatable applications, test the prompt on several representative cases, including missing information and unusual inputs.

IMPROVE USING EVIDENCE
01
Observe
Identify the actual failure
02
Revise
Change the relevant instruction
03
Retest
Use normal and edge cases
Prompt performance can change across models and versions. One successful response does not establish reliability.

11. Use the same approach for Java learning

A developer might ask: “Explain Java Stream map versus flatMap to a beginner. Give one short Java 8 example for each, with comments and expected output. End with two differences.” This is more specific than “Explain streams.” Any generated code still needs review and execution.

A DEVELOPER’S BRIEF
01
Task
Explain map vs. flatMap
02
Constraints
Beginner; Java 8; short examples
03
Validation
Check code and expected output
Never paste credentials or confidential production data into a prompt without appropriate authorization.

12. A reusable checklist—not a magic formula

Use the pieces that your task needs. A simple request may need only a sentence. A complex task may benefit from context, output requirements, and examples. Aim for clear, relevant instructions instead of maximum length.

BUILD YOUR BRIEF
01
Task + context
What to do; relevant facts
02
Audience + format
Who it is for; shape of result
03
Limits + examples
Boundaries; demonstrations when useful
This checklist is a teaching aid, not a universal requirement for every model or task.

Copy this prompt template

Task: [What should the AI do?] Context: [Relevant facts or source material] Audience: [Who will use the result?] Output: [Format, tone, and length] Constraints: [What must be preserved or avoided?] If information is missing: [Ask, flag it, or say unknown] Example, if useful: [A representative input and desired output]

Your practice task

Improve this prompt: “Write a post for my shop.” Choose the platform, provide confirmed shop details, define the audience, and specify a length. Then check whether the generated draft adds any unsupported claims.

See one possible improved prompt

Write an Instagram caption under 40 words for a tea shop. Confirmed facts: ginger tea and masala tea are available. Audience: nearby office workers. Tone: warm and simple. Do not add prices, discounts, opening hours, or health claims. Return only the caption.

REMEMBER THIS

A useful prompt tells the model what to do, gives it relevant information, and describes a usable result. You still check the answer.

Next lesson

Temperature and Top-p Explained Simply: how generation settings affect variation, and why more randomness does not mean more accuracy.

Join the conversation: Share the vague prompt you improved and the one change that helped most.


Comments

Popular posts from this blog

Beyond Standard RAG: The Architecture of Agentic Retrieval and Self-Correction Loops

The Architecture of Vision-Language Models: How Multimodal AI Sees and Understands the World

Java Collection Framework: A Practical Guide with Examples