Explainer

Prompt Engineering: A Beginner's Guide

Prompt engineering means writing instructions that get better results from AI. Learn the core techniques, see examples and avoid common mistakes.

Close-up of the keys on a computer keyboard
Photo: John Snyder / Wikimedia Commons, CC BY-SA 4.0. Cropped and colour-treated.

Prompt engineering is the practice of writing and refining the instructions you give an AI model so that it produces more useful, accurate and consistent results. It covers everything from adding context and examples to a chatbot request, to designing the hidden instructions that power AI features inside apps.

You do not need to be a programmer to do it. A teacher asking for a worksheet, a marketer drafting ad copy and a developer building a customer support bot are all doing prompt engineering. The difference between a vague prompt and a clear one is often the difference between a generic answer and one you can actually use.

Why does the wording of a prompt matter so much?

A large language model generates its answer by predicting text that fits what came before. Your prompt is most of "what came before". If you write "Tell me about marketing", the model has to guess your audience, purpose, length and depth, so it plays safe with something broad and bland.

Give it specifics and it no longer has to guess. Think of briefing a smart new colleague who knows a lot in general but nothing about your situation. Everything you leave out, they will fill in with assumptions. Our explainer on how ChatGPT works goes deeper into why this happens.

What makes a good prompt?

Most strong prompts include some mix of these six ingredients.

IngredientWhat it doesExample
TaskStates clearly what you want"Write a product description"
ContextGives background the model lacks"for a handmade cotton kurta sold online to first-time buyers in the US"
AudienceSets level and tone"Readers are not familiar with Indian clothing terms"
FormatDefines the shape of the output"Two short paragraphs and three bullet points, under 120 words"
ExamplesShows what good looks like"Here is a description we liked: ..."
ConstraintsSays what to avoid"Do not make claims about sustainability we cannot prove"

You will not always need all six. A quick factual question needs little. A piece of writing you plan to publish benefits from most of them.

A before-and-after example

Weak prompt:

Write an email about the meeting.

Stronger prompt:

Write a short email to my team of six designers moving Thursday's 3 pm project review to Friday at 11 am, because the client needs more time to send feedback. Keep it friendly and under 100 words, and ask anyone who cannot attend to reply by Wednesday evening.

The second prompt states the purpose, the audience, the reason, the tone, the length and the action needed. The model has almost nothing left to guess.

What are the main prompt engineering techniques?

Zero-shot prompting

You ask directly with no examples: "Classify this review as positive, negative or neutral." Modern models handle many tasks well this way, so start here.

Few-shot prompting

You include a few examples of input and desired output before the real task. This is powerful when you want a particular style or format.

Turn these customer notes into tags. Note: "Delivery took 9 days, box was damaged." Tags: shipping-delay, packaging Note: "Size chart was confusing, had to return." Tags: sizing, returns Note: "Great fabric, but the color looked different online." Tags:

The model picks up the pattern and continues it.

Role prompting

You ask the model to take on a perspective: "You are an experienced chartered accountant explaining GST to a first-time shop owner." This shapes vocabulary, depth and focus. It does not give the model real credentials, so expert-sounding answers still need checking.

Step-by-step reasoning

Asking a model to work through a problem step by step before answering, often called chain-of-thought prompting, can improve results on math, logic and planning. Many newer "reasoning" models already do this internally, so the explicit instruction matters less than it once did, but it still helps you see and check the logic.

Breaking big tasks into smaller ones

Instead of one giant prompt, split the work: first outline, then draft each section, then edit. This is sometimes called prompt chaining. Each step is easier for the model to get right, and easier for you to review.

Giving reference material

Paste in the document, data or notes the answer should be based on, and say "Use only the information below." This grounds the response and reduces the chance of hallucinations.

Structuring long prompts

For complex prompts, separate instructions, context and examples clearly, using headings, labels or tags such as <document> and </document>. AI developers' own guides recommend this because it helps the model tell your instructions apart from the material it should work on.

What is a system prompt?

A system prompt is a set of instructions that sits above the conversation and shapes every reply. Developers use it to set a product's behavior: "You are a support assistant for an airline. Answer only questions about bookings and baggage. Be concise."

Everyday users can do something similar. Many chatbots let you add custom instructions or create a project with standing guidance, such as "Always use British spelling and explain technical terms." That saves you repeating yourself in every chat.

What settings affect AI output?

If you use AI through a developer platform rather than a chat app, you may see extra controls.

  • Temperature: controls randomness. Lower values give more predictable, focused answers. Higher values give more varied, creative ones. See our glossary entry on temperature.
  • Maximum length: caps how long the response can be.
  • Reasoning effort: on some newer models, sets how much the model "thinks" before answering, trading speed and cost for accuracy.

What are common prompt mistakes?

  1. Being vague about the goal. "Make this better" gives the model no target. Say better how: shorter, more formal, more persuasive?
  2. Leaving out context. The model does not know your company, audience or constraints unless you say so.
  3. Cramming too many tasks into one prompt. Quality drops when you ask for research, analysis, writing and formatting all at once.
  4. Only saying what not to do. "Don't be boring" is less helpful than "Use short sentences and one concrete example."
  5. Accepting the first answer. Treat it as a draft. Follow up with specific changes.
  6. Trusting facts blindly. A well-written prompt does not guarantee correct names, dates or figures.

Is prompt engineering still a real job?

In the early chatbot days, "prompt engineer" was a headline-grabbing job title. As models have become better at understanding plain instructions, fewer roles are purely about prompts. The skill has instead become part of many jobs: developers building AI features, analysts automating reports, marketers producing content and teachers designing lessons all use it.

For people building products, prompt work increasingly overlaps with "context engineering": deciding which documents, tool results and memories the model sees, in what order and format. The core principle stays the same. Clear, complete, well-organized input produces better output.

How can you practice prompt engineering?

  1. Pick a task you do every week, such as summarizing meeting notes.
  2. Write a simple prompt and save the output.
  3. Add context, format and an example, then compare.
  4. Keep the best version as a template and reuse it.

For a hands-on set of templates, see our guide on how to write better prompts.

Why It Matters

Prompting is quietly becoming a basic workplace skill, in the same way that writing a clear email or building a simple spreadsheet once did. Two colleagues with the same AI tool can get very different value from it, and the gap usually comes down to how well each one explains what they need. That gap shows up in how fast work gets done and, over time, in who gets trusted with more of it.

The good news is that the skill rewards people who already think clearly. If you can brief a new hire well, you can prompt well. That makes it one of the easier AI skills for students and professionals in India and the US to build, with no course fees or coding required.

Be wary, though, of anyone selling prompt tricks as a career on their own. The lasting value is in knowing your subject well enough to give the right context and to spot a wrong answer. A polished prompt that produces a confident mistake is still a mistake, and you are the one who signs off on it.

Frequently asked questions

Do I need coding skills for prompt engineering?

No. Most prompt engineering is clear writing and structured thinking. Coding becomes useful if you want to build prompts into apps or automate them through an API, but anyone can improve results in a chatbot.

Do the same prompts work on ChatGPT, Claude and Gemini?

Mostly, yes. The core techniques apply across all major models. Each model has quirks, so a prompt tuned for one may need small adjustments for another, and each company publishes its own prompting guidance.

What is the difference between a prompt and a system prompt?

A prompt is the message you send in a conversation. A system prompt is a standing set of instructions, usually set by a developer or in custom settings, that shapes how the model responds to every message.

Can better prompts stop AI from making things up?

They help. Giving source material, asking the model to say when it is unsure and requesting citations all reduce errors. But no prompt removes hallucinations entirely, so check anything important.

Researched and written by The AI Telegraph staff and checked against primary sources. See our editorial policy. Spotted an error? Tell us.