Artificial Intelligence Practice Test

โ–ถ

A prompt engineering guide should do one thing: make your next prompt better than your last one. Not by teaching magic words, but by giving you a repeatable structure you can apply to any task in ChatGPT, Gemini or Claude. This guide has 6 sections, 8 copy-paste blocks of prompts or commands, a 7-question Q&A, and takes about 18 minutes to read.

A prompt engineering guide should do one thing: make your next prompt better than your last one. Not by teaching magic words, but by giving you a repeatable structure you can apply to any task in ChatGPT, Gemini or Claude. This guide has 6 sections, 8 copy-paste blocks of prompts or commands, a 7-question Q&A, and takes about 18 minutes to read.

This guide is built around a five-part structure: Role, Context, Examples, Format, Iteration. Each part gets a before-and-after example so you can see exactly what changes. Then you get eight copy-paste templates, notes on how the three big assistants differ, the mistakes almost everyone makes, and a seven-day practice plan.

You do not need any technical background. If you can write a clear email to a colleague, you can write a strong prompt. The skills are the same: say who you are talking to, what you already know, what good looks like, and what you want back.

Prompting is also the foundation for everything more advanced, from agents to coding tools. The AI Mastery course starts here for exactly that reason, and this article is the free version of that first module.

This Guide at a Glance

๐Ÿงฉ
5 parts
Prompt structure
๐Ÿ“‹
8 templates
Copy-paste templates
๐Ÿค–
3 tools
Assistants covered
๐Ÿ“…
7 days
Practice plan

Here is the uncomfortable truth behind most disappointing AI answers: the model was fine, the prompt was thin. A vague request gets a generic reply from every model, including the best one you can pay for. A precise request gets a useful reply from almost any model released in the last two years.

Think of it this way. The model has read more than any person alive, but it knows nothing about your situation until you tell it. It does not know who the reader is, what you already tried, what tone your company uses, or whether you want three bullet points or three pages. Every gap you leave, it fills with the average of the internet.

That is why switching from one assistant to another rarely fixes bad output. Switching from a one-line prompt to a structured one almost always does. Spend your effort on the input, not on shopping for a new model.

Part 1: Role. Tell the model who it should be for this task. A role sets vocabulary, depth and priorities in a single sentence. It is not roleplay for fun; it is a filter on what kind of answer is appropriate.

Before: Explain compound interest. You get a textbook paragraph aimed at nobody in particular.

After: You are a personal finance coach who explains money concepts to first-year university students in plain language. Explain compound interest using one example with a savings account. Now the model picks a level, a tone and an example type without guessing.

Roles work best when they are specific about audience and standards. "Senior editor at a business magazine" beats "writer". "Python developer who values readability over cleverness" beats "programmer". Add a sentence on what the role cares about, and you get that priority reflected throughout the answer.

Part 2: Context. Context is everything the model cannot see: background, constraints, what you already tried, what the output is for. This is where most prompts are weakest, because it feels like extra typing. It is the highest-value typing you will do all day.

Before: Write a follow-up email to a client. The model invents a client, a product and a reason to follow up.

After: Context: I run a small web design studio. The client, Dana, received our proposal for a five-page site nine days ago and has not replied. We spoke once on a call and she mentioned a launch in November. Write a short follow-up email that references the November launch, offers a 15-minute call, and does not sound pushy.

Notice how much of that is plain fact, not clever wording. Names, dates, one constraint on tone, one thing you want the reader to do. A useful habit: before you press Enter, ask "what would a smart new colleague need to know to do this for me?" and paste that in.

The Five-Part Prompt Structure at a Glance

๐ŸŽญ Role

Who the model should be, for whom, and what it should care about. One or two sentences.

๐Ÿ—‚๏ธ Context

Background, constraints, what you tried, and what the output is for. The part people skip.

๐Ÿ“Ž Examples

One to three samples of the output you want. Shows tone and shape better than adjectives.

๐Ÿ“ Format

Length, structure, headings, table, JSON. Say it explicitly or you get the model's default.

๐Ÿ” Iteration

Treat the first answer as a draft. Ask for specific changes instead of starting over.

Part 3: Examples. An example is worth a paragraph of adjectives. If you write "make it punchy and professional", every model interprets that differently. If you paste one paragraph you like and say "match this tone", they all converge on it.

Before: Write product descriptions for our candles. Keep them short and warm. You get generic scent-and-cozy copy.

After: Write product descriptions for our candles. Match the tone and length of this example: "Cedar and Smoke. Lit at 6pm, gone by the second chapter. A dry, woody candle for people who read in the dark." Now write three more for: Sea Salt, Black Fig, Fresh Linen.

This is called few-shot prompting. One example ("one-shot") is usually enough for tone. Two or three help when the structure is unusual, such as a specific table layout or a classification with tricky edge cases. Include a hard case in your examples if you have one, because the model learns from the boundary, not the easy middle.

Part 4: Format. Say what the output should look like: length, sections, bullet or prose, a table, code only, JSON. Models are good at following format instructions and bad at reading your mind about them.

Before: Compare electric and hybrid cars for me. You get a long essay with a soft conclusion.

After: Compare electric and hybrid cars for a two-car family in a cold climate. Output a table with rows: upfront cost, running cost, winter range, charging at home, resale. Then one paragraph recommending which to buy first and why. Under 250 words total.

Length limits matter more than people expect. Without one, the model writes until it runs out of things to say. With one, it prioritises. If you want a decision, ask for a decision and a reason, not a balanced overview.

Part 5: Iteration. The first answer is a draft. The people who get the most from these tools rarely accept answer one; they ask for two or three targeted revisions in the same conversation. This is faster than rewriting the prompt from scratch, because the model already has all your context loaded.

Before: the answer is too formal, so you close the tab and try a different tool.

After: Good structure. Now: cut the opening paragraph, make the tone 20 percent more casual, and replace the third bullet with a concrete number from the context I gave you. Each instruction names a specific change, so the model changes only that.

Useful iteration moves: "shorter", "give me three alternative headlines", "what did you assume that I did not tell you?", "rewrite for a reader who has never heard of X", and "critique your own answer, then improve it". That last one is surprisingly effective on analysis and writing tasks.

The templates below follow the same five-part skeleton. Copy one, replace the bracketed parts, and delete anything that does not apply. They are deliberately plain; the structure does the work, not fancy phrasing.

Template 1: Email.

Role: You are a [job title] writing on behalf of [company or yourself].
Context: The reader is [name/role]. Background: [2 to 4 facts: what happened, when, what was agreed]. Goal of this email: [the one action you want them to take].
Constraints: tone [friendly / formal / direct], length under [N] words, do not mention [X].
Format: subject line, then the email body, then one sentence I can use as a follow-up if they do not reply in a week.
Draft it, then list any assumption you had to make.

Swap in the facts and keep the constraints.

Template 2: Summary.

Role: You are a research assistant who summarises for a busy [decision-maker type].
Context: Here is the source text: [paste text]. I need this summary to decide [what decision it informs].
Format: 1) a two-sentence bottom line, 2) five bullets with the key facts, each with a number or name where the source has one, 3) three open questions the source does not answer.
Do not add information that is not in the source. If something is unclear, say "unclear".

The last line stops invented details.

Template 3: Analysis.

Role: You are a [strategy consultant / financial analyst / product manager] known for direct, evidence-based recommendations.
Context: [Describe the situation, the options being considered, and the constraints: budget, time, people.] Data: [paste numbers or facts].
Task: Evaluate the options against these criteria: [criterion 1], [criterion 2], [criterion 3].
Format: a comparison table (options as rows, criteria as columns, one sentence per cell), then a recommendation with the single biggest risk and how to reduce it.
Before answering, list what you would need to know to be more confident.

Criteria first, verdict second, always.

Template 4: Code.

Role: You are a senior [language] developer who writes readable, well-tested code.
Context: Project uses [framework / version / style guide]. Existing code: [paste relevant function or file]. The problem: [describe bug or feature, including the exact error message if any].
Constraints: do not change the public function signatures, no new dependencies, keep comments short.
Format: the complete updated code in one block, then a short list of what changed and why, then two edge cases I should test.

Paste the real error message, always.

If you write code regularly, the same structure powers terminal agents. The Claude Code tutorial for beginners shows how a project instructions file is really a permanent prompt with role, context and format baked in.

Before You Send Any Template

Every bracket has been replaced with your real detail or deleted
The reader or audience is named, not implied
At least one constraint is stated (length, tone, or what to avoid)
The output format is explicit: list, table, prose, code, or JSON
Nothing confidential or personal is pasted in
You know what you will ask for in the second turn if the draft is close but not right

Template 5: Marketing.

Role: You are a direct-response copywriter for [industry] who writes clear, specific copy without hype.
Context: Product: [what it is, who it is for, the problem it solves]. Audience: [who they are, what they tried before, what they doubt]. Proof I can use: [facts, features, real testimonials]. Channel: [landing page / Instagram caption / Google ad / email].
Voice example: [paste one paragraph of copy you like].
Format: three variations, each labelled with its angle (time saved, fear of mistake, social proof). Under [N] words each. No invented statistics or claims.

Three angles beat three near-identical drafts.

Template 6: Research plan.

Role: You are a research lead helping a [student / founder / analyst] plan a study.
Context: Question I want to answer: [one sentence]. What I already know: [bullets]. Time available: [days or weeks]. Sources I can access: [web, library, interviews, internal data].
Task: Build a research plan.
Format: 1) reframe my question into two or three precise sub-questions, 2) for each, the best source types and one starting search query, 3) a day-by-day schedule, 4) criteria for calling the research done.
Flag any sub-question where sources are likely weak or biased.

Pair this with a research tool afterwards.

For the reading stage, the NotebookLM tutorial shows how to ground answers in your own sources so the plan turns into cited notes rather than confident guesses.

Template 7: Data extraction with JSON output.

Role: You are a careful data extraction engine.
Context: Below is unstructured text (an invoice, a job posting, a product page, or similar). I need the fields extracted into JSON so another program can read them.
Text: [paste text]
Schema: {"company": string, "date": "YYYY-MM-DD" or null, "total_amount": number or null, "currency": string or null, "line_items": [{"description": string, "quantity": number, "unit_price": number}]}
Rules: output only valid JSON, no explanation, no markdown fences. Use null for any field not present in the text. Never guess a value.

Null for missing, never a guess.

Test this template on three messy inputs before you trust it in a workflow. If the model keeps adding commentary, add "Your entire reply must be parseable by JSON.parse" as the final line. This is the same skill that agents and automations rely on, which the guide to building your first AI agent covers in depth.

Template 8: Image or video prompt.

Subject: [who or what, with 2 or 3 concrete details: age, clothing, material, colour]
Action: [what is happening, one clear verb]
Setting: [location, time of day, weather, era]
Style: [photograph / 3D render / watercolour / film still], [lens or camera hint, e.g. 35mm, shallow depth of field], [lighting: golden hour, soft studio, neon]
Composition: [close-up / wide shot / overhead], subject positioned [left / centre]
Mood: [two adjectives]
For video, add: Camera movement: [slow push-in / static / handheld follow]. Duration: [seconds]. Sound: [ambient / dialogue line / none].
Avoid: [text on screen, extra people, logos]

One subject, one action, one style.

Image and video models respond to concrete nouns and lighting words far more than to abstract quality words like "beautiful" or "high quality". Describe what a camera would see. For multi-shot video tools, write each shot as its own block using the same fields, and keep the subject description identical across shots so the character stays consistent.

Model-Specific Notes: ChatGPT, Gemini and Claude

๐Ÿ“‹ ChatGPT

ChatGPT offers a model picker and thinking modes, so part of prompting is choosing the right mode: a quick model for drafts and rewrites, a thinking mode for multi-step analysis, maths and code. If an answer feels shallow, switch mode before rewriting the prompt.

Use Projects to keep files and standing instructions together for recurring work, and Custom GPTs when you want to package a template so teammates can reuse it without seeing the prompt. Memory can carry preferences between chats; review what it has stored if answers start assuming things you did not say this time. Deep Research and Agent mode take a longer brief, so the Context and Format parts matter even more there.

OpenAI publishes its own prompt engineering guidance in the platform docs; it is short and worth one read: OpenAI prompt engineering guide.

๐Ÿ“‹ Gemini

The Gemini app has Flash and Pro tiers; Pro is the one to use for long documents and careful reasoning, Flash for speed. Gemini handles very long context well, so pasting a whole report or transcript and asking precise questions about it is a strength worth leaning on.

Gems are Gemini's saved custom assistants: put your Role, Context and Format in a Gem once and reuse it. Canvas gives you a side-by-side editing space for iterating on documents and code. Inside Workspace, the same prompting rules apply in Gmail, Docs and Sheets, but keep prompts shorter because the surrounding document already supplies context.

For developers, Google AI Studio and the Gemini API expose system instructions and structured output settings, and the Gemini prompting strategies docs cover the details. The Gemini CLI tutorial shows the same ideas in the terminal.

๐Ÿ“‹ Claude

Claude responds well to clearly separated sections. Many people label the parts of a prompt with simple tags or headings (for example, a Context block and a Task block) so the model can tell instructions from pasted material. Putting long documents first and the question last also tends to help.

Projects hold files and standing instructions; Styles let you save a tone preference so you stop repeating it. Artifacts open documents, code and small apps in a side panel that you can iterate on turn by turn, which suits the Iteration part of the structure. Claude models come in the Opus, Sonnet and Haiku tiers; check the current model page before assuming which is best for your task.

Anthropic's prompt engineering overview is the official reference. If you use Claude Code, the CLAUDE.md file in your project is a standing prompt: the What is Claude Code explainer covers how it is loaded.

The same handful of mistakes account for most weak output. Fixing them costs you a sentence each.

Asking a question instead of giving a task. "What do you think about our pricing?" invites an opinion essay. "Review this pricing table and list the three changes most likely to increase sign-ups, with a reason each" gets you something you can act on.

No audience. Every piece of writing has a reader. If you do not name one, the model writes for a generic adult and the result feels flat. Even "for my manager, who has ten minutes" changes the answer.

Ten instructions in one sentence. Long run-on prompts bury constraints. Use short lines or a numbered list. Put the most important constraint last, where it is least likely to be forgotten.

Trusting facts without checking. Models produce confident, fluent text whether or not it is true. Ask for sources, check numbers, and treat anything specific (dates, prices, quotes, citations) as unverified until you confirm it.

Restarting instead of iterating. Closing the chat after a mediocre first answer throws away all the context you loaded. Ask for the specific change you want. If the model keeps missing the point, ask it to restate your request in its own words; the gap will show you what to clarify.

Skipping examples on subjective tasks. Tone, style and "feel" are impossible to describe reliably in adjectives. Paste a sample. Two minutes of finding one saves ten minutes of revisions.

A seven-day practice plan. Skill comes from reps, not from reading. Spend fifteen minutes a day on this and by the end of the week the structure will be automatic.

  1. Day 1, Role. Take three prompts you sent last week. Rewrite each with a one-sentence role that names the audience. Compare the answers side by side.
  2. Day 2, Context. Pick one real task. Write out everything a new colleague would need to know, then prompt with it. Note which detail changed the output most.
  3. Day 3, Examples. Find one paragraph whose tone you like. Use it as a one-shot example for a new piece of writing.
  4. Day 4, Format. Ask for the same analysis three ways: table, five bullets, one paragraph. Decide which you would actually use.
  5. Day 5, Iteration. Take any answer and improve it in three targeted turns without rewriting the prompt.
  6. Day 6, Templates. Adapt two of the eight templates above to your own work and save them somewhere you will find them.
  7. Day 7, Review. Reuse your saved templates on fresh tasks. Note what still needs manual fixing and add that instruction to the template.

If you want the guided version of this week, with quizzes and worked examples for each tool, the AI Mastery course prompt module walks through it lesson by lesson. For a comparison of other options, see best AI courses.

Quick Fixes for the Most Common Prompt Mistakes

๐ŸŽฏ Vague ask

Turn the question into a task with a verb: list, compare, draft, rewrite, extract.

๐Ÿ‘ค No reader

Add one clause naming who will read it and how much time they have.

๐Ÿ“ No length

State a word or bullet limit. The model prioritises when it has to.

๐Ÿ” Unchecked facts

Ask for sources and verify every number, date and quote before you use it.

Structured Prompts vs One-Line Prompts

Pros

  • Answers are usable on the first or second turn instead of the fifth
  • Works the same across ChatGPT, Gemini and Claude, so you are not locked to one tool
  • Templates can be saved, shared and reused by a whole team
  • Format instructions make outputs easy to paste into documents, sheets or code
  • Fewer invented details, because the context leaves less to guess
  • Iteration is faster because the model already has the full picture

Cons

  • Takes one to three minutes to write instead of ten seconds
  • Overkill for quick factual lookups or casual questions
  • Too much context can bury the actual task; keep it relevant
  • Templates go stale if you never update them after real use
  • Rigid formats can suppress a better structure the model would have chosen
  • Requires you to know what you want, which is sometimes the hard part

Prompt Engineering Questions and Answers

What is prompt engineering in simple terms?

Prompt engineering is writing instructions to an AI model clearly enough that it produces what you actually want. In practice it means stating a role, giving context, showing an example, specifying the format, and refining the answer over a few turns.

Do I need to learn coding for prompt engineering?

No. Everything in this guide works in a normal chat window. Coding only becomes relevant if you want to call models from your own software, and even then the prompt-writing skills are identical.

Does the same prompt work in ChatGPT, Gemini and Claude?

Mostly yes. The five-part structure transfers directly. Differences are in the features around the prompt: which mode or tier you pick, where saved instructions live (Projects, Gems, Styles), and how each tool handles long documents.

How long should a prompt be?

As long as the context needs and no longer. A good task prompt is often five to fifteen lines: one for role, a few for context, an example if tone matters, and one for format. Quick lookups can stay to a single line.

What is few-shot prompting?

Including one or more examples of the output you want inside the prompt. One example (one-shot) usually fixes tone; two or three (few-shot) help with unusual structures or classification tasks with tricky edge cases.

Why does the model make things up, and how do I stop it?

Models generate fluent text from patterns, not from checking facts, so confident errors are normal. Reduce them by supplying the source material, asking the model to say unclear or null when information is missing, and verifying specific claims yourself.

Should I save prompts as templates?

Yes. Save the ones you use weekly in a notes app, a Project, a Gem or a Custom GPT. Update each template whenever you find yourself making the same manual fix to its output.
Go deeper: the full AI Mastery course

This guide gives you the prompt structure. The AI Mastery course applies it across the whole modern toolkit: 60 lessons in 12 modules covering Gemini, Claude Code, Codex, building agents, Seedance video generation and building websites, from beginner to advanced. Every module has quizzes, you get lifetime access, and you can preview two lessons free before deciding.

โ–ถ Start Quiz