What is a Prompt Engineer?
Prompt engineering is the skill of writing instructions that get reliable, high-quality results from AI models like Claude, ChatGPT and Gemini. A prompt engineer designs, tests and improves these prompts for products, teams and workflows.
Companies use prompt engineering to build chatbots, writing assistants, data extraction tools and AI agents. It is valuable for developers, marketers, analysts and anyone who works with AI every day.
How to use this Prompt Engineering roadmap
You do not need to code for the first steps. Developers should continue to the API, RAG and evaluation steps.
Keep a prompt library: save every prompt that works well, with notes on why.
1Step 1: How LLMs work
Understand what happens when you send a prompt.
What is it?
The same request with and without context.
What to learn
Treat the model like a smart new colleague with no background on your task. Give it the context it needs.
Learn each topic here
What is a large language model
A large language model (LLM) is an AI system trained on huge amounts of text to predict the next word. That simple skill lets it write, summarise, translate, answer questions and write code. Claude, GPT and Gemini are examples.
Why it matters: Knowing how LLMs work explains why clear prompts get better results.
Tokens and context windows
Models read and write tokens (pieces of words). The context window is how many tokens the model can consider at once, including your prompt, documents and its answer.
Temperature and sampling
Temperature controls how random the model’s answers are. A low value such as 0 to 0.3 gives focused, repeatable answers; a higher value gives more varied, creative output.
Why it matters: Use low temperature for data extraction and higher temperature for brainstorming.
Model strengths and limits
LLMs are strong at language, reasoning and pattern tasks, but they may not know recent events, can make maths slips and only know what is in their training data or your prompt.
Why it matters: Knowing the limits helps you decide when to add tools, documents or checks.
Hallucinations
A hallucination is when a model states something false with confidence, such as a made-up statistic or source. You reduce it by giving source documents, allowing the model to say “I don’t know” and asking for quotes.
Why it matters: Unchecked hallucinations can damage trust in any AI product.
Example
text
Weak: Write a product description.
Strong: Write a 60-word product description for a
reusable water bottle aimed at gym-goers in Dubai.
Tone: energetic. Mention it keeps water cold for 24 hours.The second prompt gives a focused description that fits the audience and length.
Helpful resource: Anthropic prompt engineering guide
2Step 2: Writing clear prompts
Learn the core techniques that improve any prompt.
What is it?
Using examples and a fixed format.
What to learn
Say what you want, not only what you do not want. Positive instructions work better.
Learn each topic here
Clear and specific instructions
Good prompts state the task, audience, length, tone and format directly, for example “Write 3 bullet points for busy managers, under 15 words each.”
Why it matters: Vague prompts give vague results; specific prompts save rounds of editing.
Giving context and roles
Context explains the situation, such as who the reader is and why the task matters. A role, like “You are an experienced HR manager”, sets expertise and tone.
Why it matters: The more relevant context the model has, the closer it gets to what you need.
Few-shot examples
Few-shot prompting means including a few input and output examples in the prompt so the model copies the pattern, format and style.
Why it matters: Examples are often the fastest way to get consistent output.
Output format and structure
Tell the model exactly how to format the answer: a table, bullet points, JSON, a fixed heading order or a word limit. You can also start the answer for it.
Why it matters: Predictable output is easier to read and to use in other tools.
XML tags in prompts
XML-style tags such as <document> and <instructions> separate the parts of a long prompt so the model knows which text is data and which is instruction.
Why it matters: Tags make complex prompts clearer and help you pull specific parts out of the answer.
Example
text
Classify the review as Positive, Negative or Mixed.
Review: Great food, slow service.
Label: Mixed
Review: Loved everything!
Label: Positive
Review: The room was dirty and noisy.
Label:The model answers Negative, following the format shown in the examples.
Helpful resource: Prompt Engineering Guide
3Step 3: Reasoning and complex tasks
Get better answers on hard problems.
What is it?
Asking the model to think before answering.
What to learn
When a task has several parts, split it into a chain of smaller prompts and check each output.
Learn each topic here
Step-by-step reasoning
Asking the model to think step by step before answering, often called chain of thought, improves accuracy on maths, logic and analysis tasks.
Why it matters: Visible reasoning also lets you see where an answer went wrong.
Prompt chaining
Prompt chaining splits a big task into several prompts, where the output of one becomes the input of the next, for example outline, then draft, then edit.
Why it matters: Each step is simpler, so results are more reliable and easier to fix.
Breaking down tasks
Before writing a prompt, list the sub-tasks involved, such as reading the data, finding issues and writing a summary, and decide which belong in one prompt and which need their own.
Why it matters: Smaller tasks lead to clearer prompts and better answers.
Self-checking prompts
You can ask the model to review its own answer against a checklist, or run a second prompt that checks the first output for errors and missing points.
Why it matters: Self-checks catch many mistakes before a human sees them.
Iterating on prompts
Test prompts on many real inputs, note failures and improve the instructions step by step. Keep versions so you can compare.
Example
text
A shop sells pens at 3 for AED 10. How much do 12 pens cost?
Think through the problem step by step inside <thinking> tags,
then give only the final answer inside <answer> tags.The model shows its working and then answers AED 40.
Helpful resource: Chaining prompts guide
4Step 4: LLM APIs and system prompts
Use prompts inside real applications.
What is it?
Calling an LLM API with a system prompt.
What to learn
Keep API keys on the server, never in front-end code or public repositories.
Learn each topic here
LLM APIs
LLM APIs let your code send messages to a hosted model and get responses back, so you can add AI features without training models yourself.
python
import anthropic client = anthropic.Anthropic() msg = client.messages.create(model="MODEL_NAME", max_tokens=300, messages=[{"role": "user", "content": "Explain RAG simply."}]) print(msg.content[0].text)Messages and system prompts
Chat APIs take a list of messages with roles (user, assistant). A system prompt sets overall behaviour and rules.
Structured output with JSON
Ask the model to reply in JSON that matches a schema, for example {"name": string, "email": string}, so your code can read the answer directly. Many APIs also support enforced structured outputs.
Why it matters: Structured output is how AI results flow into databases, spreadsheets and apps.
Tool use and function calling
Tool use lets a model call functions you define, such as searching a database or checking the weather. The model chooses the tool and arguments, and your code runs it and returns the result.
Why it matters: Tools let AI take real actions and use live data.
API keys and security
API keys are like passwords for AI services. Store them in environment variables or a secrets manager, never in frontend code or GitHub.
bash
export ANTHROPIC_API_KEY="..."Example
python
import anthropic
client = anthropic.Anthropic()
msg = client.messages.create(
model="claude-sonnet-4-5",
max_tokens=300,
system="You are a helpful travel assistant.",
messages=[{"role": "user", "content": "3 things to do in Dubai"}],
)
print(msg.content[0].text)The script prints three Dubai suggestions written in the assistant’s role.
Helpful resource: Claude API documentation
5Step 5: RAG and AI agents
Give models your own knowledge and let them take actions.
What is it?
A RAG prompt template.
What to learn
In RAG, tell the model to answer only from the supplied documents and to say when the answer is not there.
Learn each topic here
Embeddings
Embeddings turn text into lists of numbers that capture meaning, so similar sentences have similar numbers. They power search, recommendations and RAG.
Retrieval-augmented generation (RAG)
RAG finds relevant passages from your own documents and gives them to the model, so answers are based on your data instead of guesses.
python
chunks = search(question, top_k=4) prompt = f"Answer only from this context:\n{chunks}\n\nQ: {question}"Vector databases
Vector databases (such as pgvector, Pinecone, Chroma) store embeddings and quickly find the most similar ones.
AI agents
An AI agent is a model that works in a loop: it plans, calls tools, reads the results and decides the next step until the task is done.
Why it matters: Agents can automate multi-step work like research, data entry or customer support.
Prompt templates
A prompt template is a reusable prompt with placeholders such as {customer_name} or {documents} that your code fills in for each request.
Why it matters: Templates keep prompts consistent across thousands of requests.
Example
text
Answer the question using only the documents below.
If the answer is not in them, say "I don't know".
<documents>
{retrieved_chunks}
</documents>
Question: {user_question}The model answers from your documents instead of guessing.
Helpful resource: Building effective agents
6Step 6: Evaluation and safety
Measure prompt quality and protect your apps.
What is it?
A simple prompt test loop.
What to learn
Never judge a prompt by one good answer. Test it on at least 20 varied inputs.
Learn each topic here
Prompt evaluation
Prompt evaluation means measuring how well a prompt performs, using exact-match checks, scoring rubrics, human review or another model as a grader.
Why it matters: Evaluation turns prompt writing from guesswork into an engineering process.
Test sets for prompts
A test set is a list of realistic inputs, including tricky edge cases, with the expected outputs. You run every new prompt version against it.
Why it matters: Test sets show whether a change really improved results or broke something.
Prompt injection
Prompt injection is when text in a document or user input tries to override your instructions. Treat retrieved content as data, limit tool permissions and validate outputs.
Guardrails and moderation
Guardrails are checks before and after the model: filtering harmful input, limiting topics, validating output and blocking sensitive data from leaking.
Why it matters: They keep AI products safe and on-brand.
Prompt versioning
Store prompts in version control with notes and test scores, just like code, so you can compare versions and roll back.
Why it matters: Without versioning, a small prompt edit can silently break a product.
Example
python
tests = [("I love it", "Positive"), ("Terrible", "Negative")]
score = 0
for text, expected in tests:
if classify(text) == expected:
score += 1
print(f"{score}/{len(tests)} correct")The script prints how many test cases the prompt got right.
Helpful resource: Creating strong evaluations
Prompt Engineering roadmap project ideas
Projects turn what you learn into real skills. Build at least one project from each level below, and put every finished project on GitHub with a clear README.
Prompt library
A collection of 30 tested prompts for writing, research and planning.
Social media assistant
Prompts that turn one blog post into posts for five platforms.
Email data extractor
A script that pulls structured JSON from customer emails.
Customer support bot
A system prompt and FAQ-based chatbot with tone rules.
RAG knowledge assistant
Answers questions from company documents with citations.
Prompt evaluation dashboard
Compares prompt versions on a test set and tracks scores.
Tips to finish this prompt engineering roadmap
- Learn by building. Spend at least two thirds of your study time writing code and making projects, not watching videos.
- Be consistent. One focused hour every day beats a long session once a week. Small daily progress adds up quickly.
- Share your work. Post your projects on GitHub and LinkedIn. It builds your confidence and helps recruiters find you.
- Ask for feedback. Join a community, ask questions and review other people’s code. Explaining things to others is one of the fastest ways to learn.
- Do not chase every new tool. The fundamentals in this prompt engineering roadmap change slowly. Master them first, then explore new libraries.
Career paths and next steps
Move into building AI products with the AI engineer roadmap.
Learn generative AI more deeply to understand models, fine-tuning and multimodal AI.
Related roadmaps
Prompt Engineering Roadmap FAQs
Is prompt engineering a real job?
Yes. Some companies hire dedicated prompt engineers, and many more expect developers, marketers and analysts to have strong prompting skills.
Do I need coding for prompt engineering?
Not for the basics. To build AI apps, use APIs or run evaluations, basic Python helps a lot.
How long does it take to learn prompt engineering?
You can learn the core techniques in a few weeks and become advanced, including APIs and RAG, in 2 to 4 months.
Which AI model should I practise with?
Practise with more than one, such as Claude, ChatGPT and Gemini, so you learn techniques that work across models.