What is prompt engineering? Learn it with prompts you can copy

Updated on October 5, 2026

What is prompt engineering? It is writing instructions for an AI model so it keeps giving you the result you want. The core moves are a clear task, context, examples, a set format and a check at the end.

Below: a weak prompt and the same request done well, the techniques that matter, a short best-practices list for 2026, a free way to learn prompt engineering, and what to look for in a prompt engineering course.

A weak prompt and the same request done well

Most people type something like Write a product update email. The model must guess the product, the reader, the news, the tone and the length. Here is the same request with the guesses removed.

Any AI chat

Product update email

Write a product update email for [PRODUCT NAME] customers. Audience: [WHO THEY ARE AND WHAT THEY USE THE PRODUCT FOR]. What changed: [2-3 CHANGES IN PLAIN WORDS]. Why it matters to them: [ONE SENTENCE]. Tone: friendly and direct, no hype words. Length: under 150 words. Format: a subject line of six words or fewer, then the email body, ending with one call to action: [WHAT THE READER SHOULD DO NEXT].

What it does: makes the decisions the model would otherwise guess. Change: every bracket, and the tone line if your brand sounds different. Breaks when: the limits clash, such as 150 words for ten changes. Keep to the two or three that matter.

Instructions and context: what the model cannot guess

Anthropic's guide offers a test: give your prompt to a colleague who knows nothing about the task. If they would be confused, so will the model. Name the task, the audience and the limits, then add context: the document, the numbers or the reason behind a rule.

A reason helps. Rather than just banning ellipses, say the reply is read aloud by a speech engine that cannot pronounce them. For long material, Google's Gemini 3 guidance says to put the documents first and your question at the very end.

Any AI chat

Answer only from my text

Read the text between the markers, then answer the question under it. === TEXT START === [PASTE YOUR DOCUMENT OR NOTES] === TEXT END === Question: [YOUR QUESTION] Rules: - Use only the text above. Add no facts from elsewhere. - If the text does not contain the answer, say "Not in the text" and name what is missing. - After each claim, quote the sentence it comes from.

What it does: ties the answer to your text and lets the model say when the text is silent. Change: the rules, such as a word limit. Breaks when: the text is long or messy. Check the quoted sentences against your source.

Examples: show the pattern instead of describing it

OpenAI says a handful of input and output examples can steer a model toward a new task without fine-tuning. Google says prompts without examples are likely to be less effective.

Any AI chat

Learn the pattern from two examples

Rewrite each customer message as a short support ticket title. Follow the pattern in the examples. Message: "Hi, I tried to log in on my phone three times and it keeps saying my code expired." Title: Login fails on mobile: verification code expires Message: "The invoice I downloaded yesterday has the wrong company name on it." Title: Invoice shows wrong company name Message: "[PASTE THE NEW MESSAGE]" Title:

What it does: teaches the exact shape: short, problem first. Change: use your own pairs and add a third that differs from the first two. Anthropic suggests three to five varied examples. Breaks when: the examples look alike, so the output copies them. Google warns that too many can make the model overfit to them.

Output format and a check at the end

Say what the answer should look like. Google's guide gives a table, a bulleted list or a paragraph as examples. Anthropic's blog advises saying what to do rather than what to avoid, so write "plain paragraphs", not "no bullet points". Then ask for a check, as Anthropic's best-practices page suggests: "Before you finish, verify your answer against" your criteria.

Any AI chat

Comparison table with a self-check

Compare [OPTION A] and [OPTION B] for [WHO IS CHOOSING AND WHAT THEY NEED]. Format: a table with one row per criterion and the columns Criterion, [OPTION A], [OPTION B]. Under the table, a two-sentence recommendation. Before you finish, check your answer against this list and fix anything that fails: 1. Every row compares both options. 2. Nothing in the table is a guess. Mark anything unsure as "unverified". 3. The recommendation follows from the table.

What it does: fixes the layout and has the model review its draft against a list. Change: the checklist items, and keep them testable. Breaks when: the model never had the fact. A check catches slips, not gaps, so verify what matters. Anthropic notes that Claude Opus 5 verifies on its own, so there the line can add length and delay.

Prompt engineering best practices for 2026 as a checklist

The official guides share one core. As a list to keep beside you:

  1. Define done first. Anthropic's overview starts from success criteria you can test.
  2. Match the model. OpenAI likens a reasoning model to a senior co-worker who needs a goal, and a GPT model to a junior one who needs explicit instructions.
  3. Long material first, question last. That is Google's Gemini 3 advice.
  4. Label the parts with markers or XML-style tags. Anthropic and Google both recommend it.
  5. Say what to do, and allow "I don't know". Anthropic's blog suggests permission to admit when the data falls short.
  6. Test on several real inputs. Change one thing at a time. Google calls prompt design iterative.
  7. Re-test when the model changes. OpenAI advises pinning production apps to a model snapshot and building evals.

How to learn prompt engineering for free

A path from reading to practice:

  1. Read the guides. OpenAI's prompt engineering guide, Google's prompt design strategies, and Anthropic's overview and best-practices page. Each targets its own models. All cover clear instructions, context, examples and format.
  2. Do the exercises. Anthropic's interactive tutorial has nine chapters, from basic prompt structure to complex prompts, plus a Google Sheets version for people who do not code. It was written for Claude 3 models, and Anthropic says to follow its best-practices page where they differ.
  3. Add a course. The "Apply AI at Work" series at OpenAI Academy covers prompting and review habits. The page states no cost, so check it. Developers can take ChatGPT Prompt Engineering for Developers: nine video lessons, about 1 hour 40 minutes, basic Python. Its page says access is free for a limited time.
  4. Practice on your own work. Take a task you repeat weekly, run one prompt on three to five real inputs and fix what fails.

What a prompt engineering course adds, and what to check

The techniques above are in the free guides. A paid course can add someone who reads your prompts and says what is wrong, a fixed pace and a certificate. Whether that is worth money depends on which of those you need. Before you buy a prompt engineering course, check:

  • It names its models and shows a recent date. Advice differs by model: Google has separate guidance for Gemini 3, and Anthropic's own tutorial points to a newer page.
  • You write prompts on your own tasks and get feedback.
  • It teaches testing: success criteria, several inputs, compared versions.
  • You read the price and terms on the course page today.

Aiming to work as an AI prompt engineer? Keep before-and-after prompts with the tests you ran. That small portfolio gives an employer something to read.

Questions

What is prompt engineering in AI?

It is writing and testing the instructions a model works from, so its output consistently meets your requirements. OpenAI describes it that way, and Google uses "prompt design" and "prompt engineering" for the same iterative process.

What does an AI prompt engineer do?

Writes, tests and maintains prompts for a product or workflow: defines what good output is, tries prompts on real inputs and re-checks them when the model changes. OpenAI and Anthropic both treat tests and evaluations as part of the job.

Do I need to code to learn prompt engineering?

No. In a chat tool you write plain language. Some courses target developers: the DeepLearning.AI short course lists basic Python as a prerequisite, while Anthropic offers a Google Sheets version of its tutorial.

Is a prompt engineering course worth paying for?

The core techniques are in the free official guides, so pay only for what they lack: feedback on your own prompts, a schedule or a certificate. Check the date, the models covered and the price first.

How long should a prompt be?

As long as it takes to remove the guesses, and no longer. Anthropic's blog says the best prompt reaches your goal reliably with the least structure needed.

Sources

  1. Prompt engineering – OpenAI
  2. Prompt design strategies – Google (Gemini API docs)
  3. Prompt engineering overview – Anthropic
  4. Prompting best practices – Anthropic
  5. Best practices for prompt engineering for 2026 – Anthropic
  6. Prompt engineering interactive tutorial – Anthropic (GitHub)
  7. OpenAI Academy – OpenAI
  8. ChatGPT Prompt Engineering for Developers – DeepLearning.AI

MORE GUIDES