Skip to main content

Prompt engineering guide

How to get better results from AI tools

Prompt engineering is the skill of writing inputs that get great outputs from AI tools. Used by professionals across every tech role.

What prompt engineering is (and is not)

Prompt engineering is the practice of writing clear, structured inputs (prompts) to get useful outputs from AI language models. It is not magic — it is good communication. The same principles that make written communication clear (context, specificity, structure) apply to AI prompts.

The key insight

Garbage in, garbage out. The quality of your prompt is the single biggest determinant of the quality of the output.

The anatomy of a good prompt

Every strong prompt has up to five components. You do not always need all five, but the more complex the task, the more you will use.

Role

Tell the AI who to be.

You are a senior product manager with experience in B2B SaaS.

Context

Give background.

I am writing a PRD for a new dashboard feature targeting SMB finance teams.

Task

State exactly what you want.

Write a user story in the format: As a [user], I want [action] so that [benefit].

Format

Specify the output.

Use bullet points. Keep it under 200 words. Use plain language.

Constraints

Say what to avoid.

Do not include technical implementation details. Do not use jargon.

Technique: few-shot prompting

Give the AI examples of what you want before asking for the real thing. AI models adapt to patterns — examples calibrate the output toward your standard.

Example prompt

“Here is a user story I wrote that I like: [example]. Now write three more in the same style for these features: [features]”

Use this technique any time you have a strong example of what you want. One good example beats three paragraphs of instructions.

Technique: chain of thought

Add “Think step by step” to complex reasoning tasks. This encourages the model to work through the problem rather than jump to an answer.

Without

What is the best pricing model for this product?

Generic answer.

With

Think step by step about the best pricing model for this product, considering the target customer, competitive landscape, and our cost structure.

Reasoned analysis.

Technique: iteration

Treat the first output as a draft, not a final answer. The most productive AI users iterate. Common follow-ups:

Make it shorter

Be more specific in the third point

Rewrite this for a non-technical audience

Add two more examples

What are the strongest counterarguments to this approach?

Common mistakes

Most people make the same four errors when they start using AI tools. Here is how to recognize and fix each one.

Too vague

Problem

'Write about product management'

Fix

No direction means generic output. Tell the AI what you actually need: the audience, the format, the length, and the goal.

Assuming knowledge

Problem

Forgetting that the AI does not know your company, product, or team.

Fix

Treat the AI like a smart contractor on day one. Give it the context it needs: your company, your users, the specific product, the goal.

Not iterating

Problem

Accepting the first output and publishing it without review.

Fix

The first output is a draft. Almost every prompt benefits from at least one follow-up. Build the habit of refining before using.

Trusting without verifying

Problem

AI tools hallucinate facts, names, and numbers.

Fix

Always check claims that could be embarrassing or harmful if wrong: statistics, quotes, citations, dates, names, and technical details.

Next steps

Learn AI career paths

Prompt engineering is one of the core skills for AI specialists. See what a full career in AI looks like and how to get there.

Learn AI career paths