Gen AI for Beginners

Module 3 of 10

Module 3: Prompt Engineering Basics

5 min read904 words
What you'll learn
Understand what makes a prompt effectiveBreak a great prompt into its partsTurn a weak prompt into a strong oneUse a repeatable loop to improve any prompt

"The model is only as clear as your request. A vague prompt gets a vague answer; a well-shaped prompt gets a genuinely useful one."

Learning Objectives

By the end of this module, you will be able to:

  • Understand what makes a prompt effective
  • Break a great prompt into its parts
  • Turn a weak prompt into a strong one
  • Use a repeatable loop to improve any prompt

1. What Is a Prompt?

A prompt is simply the instruction you give an AI. "Prompt engineering" is the skill of writing that instruction so the AI gives you what you actually want. Good news: it's less about tricks and more about clear communication — the same skill you'd use to brief a helpful new intern.

That intern comparison is worth holding onto. Say "write something about our product" and you'll get something generic. Say "write a three-sentence product description for busy parents, warm and reassuring, noting it's dishwasher-safe" and you'll get something you can almost use as-is. Same model; your instructions did all the work. The model can't read your mind — anything you leave unsaid, it fills in with an average of everything it's ever read, which is rarely what you specifically wanted.

2. The Anatomy of a Great Prompt

Strong prompts usually contain four ingredients. You don't always need all four, but the more of them you add, the better the result.

The four parts of a strong prompt: instruction, context, example, and constraints
The four parts of a strong prompt: instruction, context, example, and constraints
  • Instruction — what you want done ("Explain…", "Write…", "Summarize…").
  • Context — who it's for and any background ("for a beginner", "for my manager").
  • Example — show the style or format you want ("like a restaurant menu analogy").
  • Constraints — limits and rules ("under 80 words", "no jargon", "as a bullet list").

Key idea: Think of a prompt as a mini-brief, not a magic spell. Tell the model what, for whom, in what style, and within what limits — and it can hit the target far more often.

3. Bad Prompt vs. Improved Prompt

The fastest way to learn is to see the difference:

❌ Vague prompt✅ Improved prompt
"Write about dogs.""Write a friendly 100-word intro for a blog about first-time dog owners. Warm tone, one helpful tip, end with a question."
"Fix my email.""Make this email more polite and concise, keep it under 5 sentences, and keep a friendly tone: [paste email]."
"Give me a workout.""Create a 20-minute beginner home workout, no equipment, with warm-up and cooldown, as a simple checklist."

Notice the pattern: the improved prompts add audience, format, length, and tone. Same AI — dramatically better output. None of it is clever or technical — it's just the details you'd naturally mention when handing a task to someone else. That's the whole secret: prompt engineering is mostly saying out loud what you'd normally leave in your head.

Try this: Take any vague request you'd normally type, then rewrite it adding three things: who it's for, how long it should be, and what format you want. Run both versions and compare. The upgrade is usually obvious.

4. A Few Reliable Techniques

  • Be specific. "3 healthy lunch ideas under 500 calories" beats "healthy food."
  • Give an example (this is called few-shot prompting). Showing one sample of the style you want steers the model powerfully.
  • Ask for steps. "Explain step by step" often produces clearer, more accurate reasoning.
  • Set the format. Ask for a table, bullet list, or specific length.
  • Assign a role. "You are a patient tutor" nudges tone and depth.

Real-world use case: Ask "give me party ideas" and you'll get a bland list. Now try: "You are an experienced kids' party planner. Suggest a 2-hour plan for eight 7-year-olds in a small apartment, budget under $100, as a timeline with one rainy-day backup game." That single upgraded prompt does more thinking for you than a dozen vague ones.

5. The Improvement Loop

Prompt engineering is a loop, not a one-shot. The pros rarely nail it first try:

  1. Write your best prompt.
  2. Look at where the answer falls short.
  3. Fix that one thing (add a constraint, an example, more context).
  4. Run it again. Repeat.

Think of it like seasoning soup: you taste, add a pinch more salt, and taste again rather than throwing the pot out. Each prompt is a little experiment, and changing one thing at a time is how you learn which change actually helped — so you can repeat your success next time.

Common mistake: Rewriting the whole prompt from scratch when one detail is off. Instead, change a single variable — the tone, the length, one missing piece of context — and see what improves. You'll learn faster and keep what already worked.

Key Takeaway: A prompt is a clear brief, built from instruction, context, examples, and constraints. Vague prompts get vague answers; adding audience, format, length, and tone transforms the result. Improve prompts in a loop — change one thing at a time — and you'll steer any model with confidence.

Further Learning