What is prompt engineering? Learn it with prompts you can copy
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.
Product update email
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.
Answer only from my text
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.
Learn the pattern from two examples
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.
Comparison table with a self-check
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:
- Define done first. Anthropic's overview starts from success criteria you can test.
- 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.
- Long material first, question last. That is Google's Gemini 3 advice.
- Label the parts with markers or XML-style tags. Anthropic and Google both recommend it.
- Say what to do, and allow "I don't know". Anthropic's blog suggests permission to admit when the data falls short.
- Test on several real inputs. Change one thing at a time. Google calls prompt design iterative.
- 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:
- 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.
- 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.
- 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.
- 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
- Prompt engineering – OpenAI
- Prompt design strategies – Google (Gemini API docs)
- Prompt engineering overview – Anthropic
- Prompting best practices – Anthropic
- Best practices for prompt engineering for 2026 – Anthropic
- Prompt engineering interactive tutorial – Anthropic (GitHub)
- OpenAI Academy – OpenAI
- ChatGPT Prompt Engineering for Developers – DeepLearning.AI