Back

Prompt Engineering Courses · Lesson PE.1

What Is a Prompt?

CODE SCOPE PROMPT ENGINEERING SERIESLESSON PE.1 OF PE.1–PE.12

A prompt is the instruction you give an AI — and its quality decides the quality of the answer. What prompts are, and why small changes change everything.

Free PDF of this lesson — save it, print it, revise offline. The video is the same lesson on the Code Scope YouTube channel.

Introduction

Open any AI chat tool — ChatGPT, Gemini, Copilot — and you see an empty box. Whatever you type into that box is called a prompt. It is not a search query. A search engine finds pages that already exist. An AI tool writes something new from your instruction, so your instruction is the whole job: vague instruction, vague answer; clear instruction, useful answer.

Think of it like giving directions to a very fast, very literal helper. This helper knows a lot, but it cannot see your situation, your class, or your goal unless you tell it. It does exactly what the words say — not what you meant. Prompt engineering is simply the skill of writing instructions that get the result you actually wanted, on the first or second try instead of the tenth.

In this lesson you will learn what a prompt is made of, try one weak prompt against one strong prompt, and see why the difference is so big.

(Roman Urdu: Prompt woh hidayat hai jo aap AI ko dete hain — jaisi hidayat, waisa jawab. AI aap ka matlab nahi jaanta, sirf aap ke alfaaz parhta hai.)

Key points

  • A prompt is an instruction, not a question only. It can be a question ("Explain photosynthesis"), a command ("Write 10 MCQs"), a role ("Act as my teacher"), or all three together.
  • The AI answers from patterns, not from knowing you. It predicts good-sounding text based on your words. Change the words, and the answer changes — sometimes completely.
  • Every prompt has parts, even short ones: a task (what to do), context (background), format (what shape the answer should take), and sometimes examples or constraints (limits). You will learn each part in its own lesson.
  • Weak prompts are missing parts. "Write about Pakistan" has a topic but no task, no audience, no length, no purpose — so the AI guesses all four, and usually guesses wrong for you.
  • Strong prompts answer four questions before you send them: What exactly do I want? Who is it for? What shape should it be? What must it NOT do?
  • Prompting is a conversation, not one shot. The first answer is a draft. Replying with a correction ("shorter, simpler, with an example") is part of the skill — lesson PE.8 is all about it.
  • The same prompt can give different answers twice. AI tools are not calculators. If an answer matters — homework, code, health, money — check it against a trusted source, never copy blindly.
  • A prompt also sets what you do NOT want. Adding one "do not" line ("Do not use difficult words", "Do not write an essay, only points") removes the most common surprise in the answer.
  • Beginners get stuck on the blank box. If you do not know how to start, start with this sentence frame: "Explain [topic] for [person] in [format], under [limit]." Fill the four blanks and you already have a strong prompt.

Examples

Example 1 — One weak prompt, one strong prompt

Weak prompt:

Write about water.

What you will get: a long, general essay that could be for anyone — a schoolchild, a scientist, a farmer. It is not wrong, it is useless for your actual need, because the AI had to guess who you are and what you wanted.

Strong prompt:

Explain why clean drinking water matters, in simple English, for a class 9 student in Pakistan. Keep it under 150 words, use one daily-life example, and end with 3 short questions to test me.

What you will get: a short, simple explanation at the right level, with a local example and a built-in self-test. Same topic, completely different result — the only difference is the prompt.

Example 2 — The same task, three levels of prompt

Task: you want a study plan for your exams.

Level 1 (topic only):

Study plan.

Level 2 (task + context):

Make a 7-day study plan for my class 10 science exam.

Level 3 (task + context + format + constraint):

Make a 7-day study plan for my class 10 science exam. I can study 2 hours a day after school. Cover physics, chemistry and biology, hardest chapters first. Give it as a table: day, subject, topic, and time. Keep each day's work realistic, not overloaded.

Try all three in any AI chat tool and compare. Level 3 is the only one you can actually follow without rewriting it yourself.

Example 3 — A prompt is not magic words

There are no secret magic words that unlock a "smart mode". Words like "please", "as an AI", or "think carefully" do not matter nearly as much as specifics: the audience, the length, the format, the example, the limit. If a prompt feels weak, do not add fancy words — add missing information.

Example 4 — Before and after: a homework question

Before (topic only):

Photosynthesis

After (task + audience + format + limit):

Explain photosynthesis in simple English for a class 9 student. Use one daily-life example from a plant at home. Keep it under 120 words, then give 2 short questions to test me.

Before gives a random essay. After gives a short explanation you can actually revise from. The topic never changed — only the instruction did.

Example 5 — Before and after: asking for a list

Before:

Give me ideas.

After:

Give me 5 cheap business ideas for a student in Pakistan who has Rs 5000 to start. One line each: the idea, what it costs, and who would buy it. No online-only ideas.

"Ideas" could mean anything. The after version names the person, the budget, the shape (one line each, three parts), and a limit. That is why its list is usable and the first list is not.

Example 6 — Before and after: a message you will actually send

Before:

Write a message.

After:

Write a friendly WhatsApp message in Roman Urdu for my customers: our shop has a 10% discount this weekend only, 10am to 9pm. Under 40 words. End with: reply YES to order.

The first prompt cannot produce a sendable message because it does not know to whom, about what, or in which language. The second can — it is a complete job, not a topic.

Real-world case — Where this is actually used

A class 10 student in Sahiwal uses one strong prompt every evening instead of re-reading the chapter: "Explain today's topic in simple words, give one example, then ask me 3 questions one at a time." The questions, not the explanation, are what make the marks improve — because the prompt turns the AI from a textbook into a tutor. Teachers use the same skill the other way round: one prompt that makes a full set of MCQs, a worksheet, and an answer key from a single chapter heading.

Quick recap

  • A prompt is the instruction you type into an AI tool. It is not a search query.
  • The AI follows your words literally — it cannot guess your situation.
  • A strong prompt covers task, context, format and constraints.
  • Prompting is a conversation: first answer, then correction, then final answer.
  • Always check important answers against a trusted source.

Common mistakes

  1. Typing a topic instead of an instruction — "Photosynthesis" gives you a random essay. Fix: start with a verb and a purpose: "Explain photosynthesis in simple words for a class 9 student, with one example."
  2. Expecting the AI to read your mind — it cannot know your class, your deadline or your level. Fix: put that context in the prompt itself.
  3. Copying the first answer without reading it — AI answers can sound confident and still be wrong. Fix: read, check the key facts, and ask a follow-up if anything looks off.
  1. Writing the prompt in your head, not on the screen — you know the class, the length and the purpose, but the AI only sees the typed words. Fix: type every fact the answer depends on, even if it feels obvious to you.
  2. Judging prompting from one bad try — one vague prompt, one bad answer, and many beginners decide "AI does not work". Fix: try the same task once more with task + audience + format filled in, then judge.

Practice

  1. Take the weak prompt "Write about water" and rewrite it for three different people: a class 5 student, a shopkeeper, and a university student. Notice how each prompt changes.
  2. Pick a topic from your own studies. Write a level-1 prompt and a level-3 prompt for it, send both to an AI tool, and write down — in one line each — why the level-3 answer is more useful.
  1. Pick a prompt you sent this week that gave a weak answer. Rewrite it using the four blanks — topic, person, format, limit — and send the new version. Write down what changed in the answer.
  2. Ask the same question twice: once as a topic only, once as a full prompt. Show both answers to a friend and ask which one they would rather revise from — and why.
  3. Write a prompt for a real job you have this week (a message, a homework answer, a study plan). Before sending, check it answers the four questions: What? For whom? What shape? What must it NOT do?

Practice quiz

Tap an answer to check it — a right answer turns green, a wrong one turns red and shows the right answer. Nothing is scored or saved; this is just for practice.

1. What is a prompt?

2. Why does a vague prompt give a useless answer?

3. A strong prompt covers which four things?