BeginnerFree Resources Available

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.

βš™οΈ
Prompt Engineering
~2–4 weeks to learn

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

Success criteria: 1. Summary is 3 sentences or fewer. 2. States the product area and the customer's requested outcome. 3. Never includes personal data such as email addresses or order numbers. 4. Labels sentiment as positive, neutral or negative, matching a human rater at least 9 times in 10. 5. Flags tickets that need escalation using an explicit yes or no. Test tickets: a simple refund request; a message mixing a bug report with a billing question; a customer threatening to cancel after three failed fixes.

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

Summary: The customer cannot export invoices to PDF from the billing page since the latest update. They have tried two browsers and want a working export before their month-end close. They are frustrated but polite. Sentiment: negative Escalate: yes

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

integration

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.

Free Learning Resources

These resources cost nothing and cover everything you need to get started.

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

Learn Prompt Engineering→Prompt Engineering Training→Free Prompt Engineering Course→Learn AI for Free→AI Tutorials for Beginners→AI Learning Path→

Explore All AI Learning Guides

πŸ€–ChatGPT🧠Claude✨Google GeminiπŸ”Perplexity AI🎨MidjourneyπŸ–ΌοΈStable Diffusion🎭DALLΒ·E 3🦁Leonardo AIπŸ”₯Adobe Firefly🎬Runway⚑Pika AIπŸŽ™οΈHeyGen⌨️Cursor AIπŸ™GitHub CopilotπŸ„Windsurf (Codeium)πŸ”ŠElevenLabs🎡Suno AIπŸ“Notion AI✍️Jasper AI🎨Canva AI

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.

Don't stop here

What to read next

Hand-picked guides our readers explore right after this one.