Skip to content
PrepMint

Prompt Engineering

Prompt Engineering Fundamentals

Core principles, cross-tool

50 questions
Easy· 20Medium· 20Hard· 10

Last reviewed

Recommended

Prompt Engineering Fundamentals — Timed Test 3 (10 questions)

TimedEasy10 questions · 10 min
Start test

No account needed. Answers and explanations arrive when you submit.

What this topic tests

The mix every Prompt Engineering Fundamentals set is built to, and the questions published against it so far. Nothing here is hidden before you start.

Prompt Engineering Fundamentals — target difficulty mix and published question count per level
LevelTarget sharePublished
Easy40%20
Medium40%20
Hard20%10
Total50

Prompt Engineering Fundamentals — the theory

What Prompt Engineering Is

Prompt engineering is the practice of writing instructions that get a model to produce what you actually wanted, consistently rather than occasionally. OpenAI defines it as writing effective instructions for a model such that it consistently generates content that meets your requirements; Google describes the same activity as creating natural language requests that elicit accurate, high quality responses. There is no secret syntax and there are no magic words. It is ordinary writing, aimed at a reader who knows a great deal in general and nothing at all about your situation.

The most useful thing to understand early is that it is iterative. Google states plainly that prompt design can sometimes require a few iterations before you consistently get the response you're looking for, and describes the whole activity as test-driven. Because a model's output is not deterministic, the same prompt can give different answers on different days. Your first prompt is a draft, and treating it as one is what separates people who get good results from people who conclude the tool does not work.

Why It Matters

Every mainstream AI assistant takes the same input: plain language, the one part of the system you fully control. These techniques transfer between tools, because all three major vendors document the same core advice in their own words.

The Parts of a Prompt

Google Cloud's documentation breaks a prompt into components, which turns "write a better prompt" into a checklist. The first two are essential; the rest are optional:

  • Objective — what you want achieved, including the overarching goal and not only the immediate request.
  • Instructions — the step-by-step directions for the task.
  • Context — anything the model must refer to and could not otherwise know.
  • Persona — who or what the model is acting as.
  • Constraints — what the model must and must not do.
  • Response format — the structure you want back: JSON, a table, a bulleted list, 200 words.
  • Few-shot examples — sample inputs paired with the output you want for them.
  • Recap — a short restatement of the constraints and format at the end of a long prompt.

You will not need all eight every time. Knowing which one you left out is the point.

The Habits That Do Most of the Work

Be clear and specific. Google calls this an effective and efficient way to customize model behavior. Anthropic offers a test worth stealing: show your prompt to a colleague with minimal context and ask them to follow it — if they would be confused, the model will be too.

Give it the material. Include the information the model needs instead of assuming it has it. Attaching the actual document beats describing it, every time.

Say what the output should look like, rather than leaving the model to guess the structure.

Make constraints measurable. "Write a brief summary" is a subjective qualifier; "write a summary of three sentences or less" is a constraint. Google's checklist names this exact substitution.

Say what to do, not what to avoid. Anthropic's guidance is to replace "do not use markdown" with "your response should be composed of smoothly flowing prose paragraphs". Positive framing describes a target; a prohibition only rules out one of many wrong answers.

Separate the instructions from the material with delimiters — Markdown headings or XML-style tags. Google adds the rule that matters most in practice: pick one format and use it consistently within a single prompt.

Ask for one thing at a time. If a prompt asks a model to summarise, extract entities, translate and draft an email in one pass, Google's guidance is that it is trying to accomplish too much and should be split. For multi-step work, chain the prompts so the output of one becomes the input of the next.

A Worked Example

Start with a prompt that reliably disappoints:

Summarise this and make it good.

Walk the checklist. There is no objective beyond "summarise", no context, no audience, no measurable constraint, no format, and "good" has no definition. Rewritten:

You are briefing a manager who has not read the attached report and has two minutes. Using only the attached text, write a summary of five bullet points or fewer. Each bullet should be one sentence. Lead with the decision being asked for. If the report does not state a decision, say so rather than inferring one.

Nothing clever happened. A persona set the register, the context was bounded, "good" became five bullets of one sentence each, an ordering rule replaced a hope, and the last sentence told the model what to do when its assumption fails — the step almost everyone skips.

The Order Things Go In

When your prompt contains a long document, order matters. Anthropic's guidance is specific:

  1. Put the long document or data at the top, above your query, instructions and examples.
  2. Wrap each document so it is clearly separated from your instructions.
  3. Put the actual question at the end. Anthropic reports that queries at the end can improve response quality by up to 30 percent in tests, especially with complex, multidocument inputs.
  4. Ask the model to quote the relevant parts first, then answer from those quotes.

Google makes the general version of the point: the order of content in a prompt can affect the response, so reordering is worth trying when one underperforms.

Common Misconceptions

  • "Shorter prompts are better prompts." Length is not the variable; completeness is.
  • "There are magic words." Google's checklist says to remove language that tries to influence performance through emotional appeals, flattery or artificial pressure, and states that model performance will no longer improve and in many cases will get worse.
  • "Examples are always required." Examples show a format rather than describe it, but Google warns that too many can make a model overfit, and Anthropic warns that examples which are too alike teach unintended patterns.
  • "Asking for step-by-step reasoning always improves the answer." It often helps, but it costs length and latency, and Anthropic notes that a general instruction often beats a hand-written step-by-step plan.
  • "A prompt that works today will work everywhere." OpenAI is explicit that different model types need to be prompted differently, and that even different snapshots within one family can produce different results.
  • "If the output is wrong, the prompt needs more words." Often it needs fewer and better ones. Google's checklist puts typos, undefined jargon, contradictions and redundant restatement at the top of the list.
  • "Prompting can fix anything." Anthropic notes that not every failure is best solved by prompt engineering — some are better solved by changing the model.

Verify What Matters

A confident tone is not evidence of correctness. Where a claim is recent, obscure or consequential, either give the model the source material or use a tool that grounds it in one — Google's guidance is that search grounding should be enabled whenever a model may need to know obscure or recent facts. Asking a model to check its answer against stated criteria catches real errors cheaply, and is not a substitute for checking what matters. And text you paste into a prompt is instructions as far as the model is concerned: Google's checklist flags untrusted user input inserted into a prompt as a major security risk.

What the Questions Cover

This topic's bank is built to the blueprint shown on this page: 40 percent easy, 40 percent medium and 20 percent hard. Easy items check that you hold a concept correctly. Medium items put you in a situation and ask what to do. Hard items give you two defensible options and a constraint. Roughly a third of the bank is scenario-based.

Where to Go Next

Advanced Prompting Techniques goes deeper on chain-of-thought, few-shot patterns and structured outputs, and Prompt Engineering for Code covers what changes when the output is a program. For the same craft inside one product, see Claude Prompting Best Practices, ChatGPT Basics or Gemini Basics. Claude AI Basics covers using an assistant at all, and AI Agents Basics covers what changes when one is given tools.

Sources

All read 2026-08-09. Anthropic — Prompting best practices · Google — Prompt design strategies and Overview of prompting strategies · OpenAI — Prompt engineering

Sample questions

Three questions from this topic, with the answer and the reasoning shown.

Q1EasyA model stops mid-sentence well before it has finished answering. Which setting is the first thing to check?
  • The temperature, since low values make the model stop early
  • The maximum number of tokens the response is allowed to generateCorrect
  • The size of the prompt, because a long prompt shortens the reply proportionally
  • The number of examples included, since each one consumes part of the answer

Explanation

The principle — an answer cut off mid-sentence is usually a budget being hit, not the model losing its way.

Why the key is correct — Google describes the maximum output tokens setting as specifying the maximum number of tokens that can be generated in the response, and gives the rough conversion: a token is about four characters, and 100 tokens is roughly 60 to 80 words. That makes the ceiling easy to sanity-check against the length you actually need.

Why the others are wrong — temperature changes which words are chosen rather than how many are allowed. Prompt length does not shorten the reply one for one. And examples consume prompt space rather than the response allowance.

Remember this — estimate the words you need, convert roughly, and check the ceiling before rewriting the prompt.

Sources — Google's Prompt design strategies.

Open this question on its own page

Q2EasyAnthropic advises making the examples in a prompt diverse. What problem is that advice guarding against?
  • The prompt growing long enough to crowd out the actual question at the end
  • Inconsistent formatting between the examples producing an output shape you cannot predict
  • The model refusing the task because no single example matches the request exactly
  • The model picking up a pattern you never intended to teach itCorrect

Explanation

The principle — A model generalises from whatever your examples have in common. If they share something accidental, it learns that too.

Why the key is correct — Anthropic's guidance is to make examples diverse enough that the model does not pick up unintended patterns, and to cover edge cases. Three examples that all happen to be one sentence long teach "answer in one sentence" whether you meant it or not.

Why the others are wrong — Varied examples cost no more room than repetitive ones. Inconsistent formatting is a real but separate fault — you want varied content and identical structure. And a model will attempt a task with no matching example at all.

Remember this — Vary the content of your examples. Keep their shape identical.

Sources — Anthropic, Prompting best practices.

Open this question on its own page

Q3EasyAnthropic notes that not every failing result is best solved by prompt engineering. What example does it give of a fix that lies outside the prompt?
  • Raising the temperature so the model explores more possible responses
  • Selecting a different model, which can improve latency and cost more easilyCorrect
  • Splitting the task into a chain of smaller prompts run in sequence
  • Rewriting the prompt in a different language, which changes how it is interpreted

Explanation

The principle — Prompting is one lever among several. Knowing which failures it cannot reach stops you from tuning wording against a problem that lives elsewhere.

Why the key is correct — Anthropic's overview states that not every success criterion or failing evaluation is best solved by prompt engineering, and gives the example that latency and cost can sometimes be improved more easily by selecting a different model. That is a change to the system rather than to the text.

Why the others are wrong — Rephrasing and chaining are both prompting techniques. And temperature changes how varied the output is, not how good it is.

Remember this — Ask whether better wording could possibly fix this. Sometimes the honest answer is no.

Sources — Anthropic, Prompt engineering overview.

Open this question on its own page

Practise all 50 questions

Every published question in Prompt Engineering Fundamentals, with its answer and explanation.

Frequently asked

What people ask about prompt engineering fundamentals.

What is prompt engineering, in plain terms?
It is the practice of writing instructions that get an AI model to produce what you actually wanted, reliably rather than by luck. OpenAI describes it as writing effective instructions such that a model consistently generates content meeting your requirements; Google describes the same work as creating natural language requests that elicit accurate, high quality responses. There is no special syntax to learn. The skill is ordinary clear writing aimed at a reader who knows a lot in general and nothing about your situation, plus the willingness to revise — Google notes that prompt design can require a few iterations before you consistently get the response you are looking for.
Why did I get a vague answer when my question seemed clear?
Usually one of four things. The objective was implicit rather than stated; the model was missing context it had no way to infer; the prompt asked for several distinct things at once; or the output format was left to the model to guess. Google's guidance is to include the information the model needs instead of assuming it has it, to specify the format explicitly rather than leaving it to guess, and to split a prompt that asks for several distinct cognitive actions in a single pass into separate prompts. Diagnosing which one happened is faster than rewriting at random.
Do I need to include examples in my prompts?
Often, but not always. A prompt with no examples is called zero-shot and one with a few is called few-shot, and Google notes that few-shot prompts are used to regulate the formatting, phrasing, scoping or general patterning of a response — showing a format is what examples do better than any description. The caveats are real though: Google warns that too many examples can cause a model to overfit to them, and Anthropic advises making examples diverse enough that the model does not pick up unintended patterns. Use examples when the output shape matters and is easier to show than to describe.
Does being polite, or urgent, or threatening change the answer?
Not usefully, and it can hurt. Google's prompt-health checklist says to remove language outside the core task that attempts to influence performance through emotional appeals, flattery or artificial pressure, and states that while some first-generation models showed improvement with instructions like that, model performance will no longer improve and in many cases will get worse. Google's guidance for its newest models is to be precise and direct and to avoid unnecessary or overly persuasive language. Politeness costs nothing socially; it is just not a technique.
Should I ask the model to think step by step?
It depends on the problem and the model, which is why this is worth understanding rather than applying as a rule. Google's component list includes telling a model to explain its reasoning, noting it can sometimes improve reasoning. But it makes responses longer and slower, Anthropic observes that a general instruction such as asking a model to think thoroughly often produces better reasoning than a hand-written step-by-step plan, and on models that already reason internally the added instruction can get in the way. Use it for genuinely multi-step problems; skip it for straightforward ones.
Will a prompt that works in one tool work in another?
The principles transfer; the exact wording does not reliably. OpenAI is explicit that while some techniques work with every model, different model types need to be prompted differently for best results, and that even different snapshots of models within the same family can produce different results. Treat a prompt as written against a particular model rather than in the abstract: when you switch tools or a tool updates, re-check the prompts you depend on. That is also why Google frames prompt engineering as a test-driven and iterative process rather than a one-time authoring task.

More Prompt Engineering topics

All of Prompt Engineering

Related guides

  • How it works · 11 min read

    Why the model can't count the letters in a word

    Strawberry has two r's, your 100-word answer runs to 137, and the limerick does not rhyme. Those are not three mistakes. Text becomes tokens before the model sees it, and everything below the token — letters, characters, sounds — was discarded at the door.

  • How it works · 11 min read

    Where you edit your prompt decides what it costs

    The session was fast for twenty turns, then you added one line to the top of a file and the next answer crawled. A prompt cache is keyed on an exact prefix, so cost and latency depend on where you changed something, not how much. The ordering rule that falls out of it.

  • How it works · 9 min read

    Where an instruction belongs: prompt, system prompt, or project instructions

    Every assistant offers the same five containers for an instruction, and the same sentence is a permanent rule in one and a single-turn suggestion in another. The placement rule across vendors: what survives a new conversation, what survives a context trim, what gets re-billed every turn, and what outranks what.