Prompt Engineering Tutorial: Step-by-Step for Beginners
This hands-on tutorial takes you through Prompt Engineering from your first session to confident everyday use. Each step builds on the last, no assumptions about prior experience.
Learn AI properly, free or with a certificate
LearnWithZavi is our own site. The Udemy link is an affiliate link; we may earn a commission at no extra cost to you.
Worked prompts with sample output
Each sample output shows the shape of a useful answer. Your results will differ, so check facts, names and numbers before you rely on them.
Write success criteria before the prompt
Prompt
I want a prompt that summarises customer support tickets for a weekly report. Before writing the prompt, list 5 measurable success criteria and 3 test tickets (one easy, one ambiguous, one angry customer) I should check every version against.
Sample output
Run every new version of the prompt against the same three tickets. That is a tiny evaluation set, and it is the habit that separates prompt engineering from guessing.
Separate instructions from data with tags
Prompt
<instructions> Summarise the ticket in 3 sentences or fewer. State the product area and the outcome the customer wants. Remove personal data. Then output sentiment (positive, neutral, negative) and escalate (yes or no). </instructions> <ticket> [paste ticket text] </ticket>
Sample output
The tags stop the model treating text inside the ticket, such as "ignore previous instructions", as part of your instructions.
Add examples when the format matters
Prompt
Classify each feature request into one of: integration, reporting, permissions, other. Follow the format of the examples exactly. Request: "Can we sync with Salesforce?" -> integration Request: "Let managers see only their team." -> permissions Request: "Export the dashboard as CSV." -> reporting Request: "Add a Slack alert when a deal closes." ->
Sample output
Three short examples fixed both the label set and the output format. Without them, models often answer in a full sentence.
Sources
Best Free Tools to Start With
All tools below have free tiers you can use right now, no credit card needed.
ChatGPT
The world's most popular AI chatbot
Claude
Safe, thoughtful AI with a context window of up to 1M tokens
DeepL
Most accurate AI translation tool
Perplexity AI
AI-powered answer engine with citations
Gemini
Google's AI with real-time web access
Grammarly
AI writing assistant for grammar and tone
Notion AI
AI built into your Notion workspace
Doximity AI
AI for medical professionals
QuillBot
AI paraphrasing and grammar tool
Free Learning Resources
These resources cost nothing and cover everything you need to get started.
Free AI chat, best starting point for text tasks
Free AI fundamentals course from Google
Free 1-hour AI skill courses from the experts
Free AI assistant with generous free tier
Free AI certification paths from Microsoft
Free prompting guide from Anthropic
Frequently asked questions
What should I do before writing a prompt?
Anthropic recommends having clear success criteria, a way to test against them, and a first draft prompt before you start prompt engineering. Without a test, you cannot tell whether a change made the prompt better or just different.
Which prompt engineering techniques matter most?
Clarity, examples and structure. Anthropic's overview lists clarity, examples, XML structuring, role prompting, thinking and prompt chaining. OpenAI's guide covers message roles, few-shot examples, Markdown and XML delimiters, and giving context. They overlap heavily.
Do reasoning models need different prompts?
Yes. OpenAI notes that reasoning models generally give better results with only high-level guidance, while other GPT models benefit from very precise instructions. State the goal and constraints for a reasoning model rather than scripting every step.
What is few-shot prompting?
Including a handful of input and output examples in the prompt so the model copies the task and format. OpenAI describes it as a way to steer a model toward a new task without fine-tuning. It is most useful when the output format is specific.
How do I keep a prompt working in production?
Build a small evaluation set and rerun it whenever you change the prompt or the model, and pin your application to a specific model snapshot, as OpenAI recommends, so a provider update does not silently change behaviour.
Related Learning Guides
Explore All AI Learning Guides
Learn AI properly, free or with a certificate
LearnWithZavi is our own site. The Udemy link is an affiliate link; we may earn a commission at no extra cost to you.
Also from the GPTPrompts team
More free AI resources from our sister sites
- Our free AI coursesLearnWithZavi: Learn AI for free, at your own paceShort, practical AI courses with no paywall and no signup, from your first prompt to using AI at work.Start learning free
- Our AI deals siteAIDeals: Black Friday AI dealsDiscounts, promo codes and free tiers on AI tools, each checked against the vendor's own pricing page and dated. Plus cost calculators and plan comparisons.See Black Friday deals
- Our AI agents directoryBestAIAgents: Compare AI agents side by sideAn independent directory of AI agents with pricing, limitations and a verification date on every listing. Rankings are not paid.Browse AI agents
- Our AI jobs boardAIGlobalWork: Find paid AI training jobsOpen AI tutor, rater and expert-review roles from Mercor, Alignerr, Scale AI, xAI and more, with the pay each platform lists.Browse AI jobs