Prompt Engineering Basics: How to Get Better Answers from ChatGPT

Ask ChatGPT a vague question and you get a vague answer: polite, generic and often not quite what you needed. The tool is rarely the problem. The answer you get back is shaped mostly by the instructions you give it, and writing better instructions is a skill anyone can learn in an afternoon.
This guide covers the practical side of prompt engineering for everyday work: what to put in a prompt, before-and-after examples, how to refine answers, and how to stay safe with accuracy and confidential data. The same principles apply to other AI assistants such as Gemini, Copilot and Claude.
Why Vague Prompts Produce Generic Answers
A large language model generates text by predicting what is most likely to come next, based on patterns learned from enormous amounts of training data. Our explainer on how AI works covers this in more detail. When your prompt contains little information, the most likely response is an average one, written for an imaginary average reader.
The model also can't see what is in your head. It doesn't know your audience, your industry, your deadline or the tone your manager expects unless you say so. Prompt engineering is mostly the habit of supplying that missing information. If you want a fuller picture of how these systems generate text, images and code, the Fundamentals of Generative AI course explains the underlying ideas without heavy maths.
The Five Building Blocks of a Strong Prompt
You don't need all five every time, but checking for each one will improve most prompts.
| Element | What it does | Example phrase |
|---|---|---|
| Role | Sets the perspective and expertise level | "Act as an experienced HR manager…" |
| Context | Gives the background the model cannot guess | "Our company is a 40-person software house in Karachi…" |
| Task | States exactly what you want produced | "Write a job advert for a junior QA engineer." |
| Format | Shapes the output | "Use a heading, five bullet points and a closing line." |
| Constraints | Sets limits and rules | "Under 200 words. No jargon. Do not mention salary." |
The role is the least important of the five. Context and a precise task matter far more. "Act as a world-class expert" adds little on its own, while two sentences of real background can transform the result.
Weak vs Strong Prompts: Four Before-and-After Examples
1. A difficult client email
Weak:
Write an email to a client about a delay.
Strong:
I manage a website project for a retail client in Dubai. Launch was planned
for 1 March, but payment-gateway testing has failed twice, so we need two
more weeks. Write a short email to the client's marketing director that:
- apologises without over-explaining
- gives the new date of 15 March
- explains we are protecting their customers' payment security
- offers a 20-minute call this week
Tone: professional and confident, not defensive. Maximum 150 words.
The second version tells the model who is writing, to whom, why, what must be included and how long it should be. Very little is left to guesswork.
2. An Excel formula
Weak:
Excel formula for commission.
Strong:
In Excel, column B has sales amounts in PKR (rows 2 to 200). Commission is
5% for sales up to 100,000 and 8% for the full amount if sales exceed
100,000. Give me a formula for C2 that I can drag down, then explain in two
sentences how it works.
Spreadsheet work is one of the most practical uses of ChatGPT. The ChatGPT for Excel course goes further, into formulas, data cleaning and automation.
3. Learning a new concept
Weak:
Explain machine learning.
Strong:
I'm an accountant with no programming background. Explain machine learning
using examples from finance, such as fraud detection. Keep it under 300
words, avoid maths, and finish with three questions I can use to check
my understanding.
4. Improving your CV
Weak:
Make my CV better.
Strong:
Below are three bullet points from my CV. I'm applying for a junior data
analyst role. Rewrite each bullet to start with an action verb and show a
measurable result where my text supports one. Do not invent numbers or
skills I haven't mentioned. Show the original and the rewrite side by side.
Note the constraint "do not invent numbers". Without it, the model may add impressive-sounding figures that are not true, which you would then have to defend in an interview.
Iterate: The First Answer Is a Draft
Prompting works best as a conversation. Rather than rewriting your whole prompt when the answer misses, give targeted feedback:
- "Make it shorter and more direct."
- "The second point is too generic. Make it specific to the logistics industry."
- "Rewrite this for a reader whose first language is not English."
- "Give me three alternative subject lines with different tones."
- "What information would help you improve this answer? Ask me before rewriting."
The last one is especially useful for complex tasks. Asking the model to question you first often surfaces gaps you hadn't noticed.
Show, Don't Just Tell: Giving Examples
When you need a particular style or structure, an example works better than a description. This is often called few-shot prompting. For instance:
Write product descriptions in this style.
Example:
Product: Steel water bottle, 750 ml
Description: Keeps drinks cold for hours. Leak-proof lid. Fits most car
cup holders.
Now write one for:
Product: Laptop backpack, 15.6 inch
The model picks up the length, rhythm and tone from your example far more reliably than from instructions such as "short and punchy".
Asking for Reasoning
For problems with several steps (calculations, planning, comparing options), asking the model to work through the problem step by step, or to state its assumptions before answering, tends to produce more careful results and makes errors easier to spot. Many current models already reason internally before responding, so you may not need to ask explicitly. A request such as "list the assumptions you made" is still valuable, because it shows you where the answer could be wrong.
A practical pattern for decisions:
Compare these two laptop options for a freelance video editor. First list
the criteria that matter most, then evaluate each option against them,
then give a recommendation and state any assumptions you made.
Verify Everything That Matters
Language models can produce statements that sound confident but are wrong. These are often called hallucinations, and they include invented statistics, non-existent references, outdated facts and plausible-looking code that doesn't work. Before you rely on an answer:
- Check facts against a primary source, such as an official website, the original document or the law itself.
- Test any formula or code on sample data where you already know the correct result.
- Be extra cautious with numbers, dates, names, legal and medical information, and anything that changes often, such as prices or regulations.
- Ask for sources, then open them. A citation is only useful if it exists and says what the answer claims.
- Give the model the material. Pasting in the relevant (non-confidential) text and saying "answer only from this text" reduces made-up content. This idea is the basis of retrieval-augmented generation (RAG).
Privacy: What Never to Paste into a Chatbot
Treat a public AI chatbot like an external service, because that is what it is. Unless your organisation has approved a specific tool and plan for this purpose, do not paste:
- Customer names, phone numbers, CNIC, passport or Emirates ID numbers, or bank details
- Passwords, API keys or internal system addresses
- Unreleased financial results, contracts or legal documents
- Patient or employee records
- Source code your employer considers confidential
Replace real details with placeholders such as "Client A" or "[amount]". Review the data controls in your account settings, and read your provider's privacy policy and help pages, such as OpenAI's policies, to understand how conversations may be stored or used. Many organisations now publish internal AI-use policies, so follow yours.
A Reusable Prompt Template
Save this somewhere handy and fill in the blanks:
Role: You are a [expertise] helping a [type of person].
Context: [Background, audience, purpose, what you've tried.]
Task: [Exactly what to produce.]
Format: [Bullets / table / email / steps; length.]
Constraints: [Tone, words to avoid, what not to invent.]
Before answering, ask me up to 3 questions if anything important is unclear.
Frequently Asked Questions
Do I need technical skills to write good prompts?
No. Good prompting is mostly clear writing and clear thinking: knowing what you want, who it is for and what "good" looks like. Those skills already matter in any professional job.
Are longer prompts always better?
Not always. Prompts should be complete rather than long. Relevant context helps; padding and repeated instructions can distract the model. If a detail would change the answer, include it.
Why do I get different answers to the same prompt?
Responses involve some randomness, and different model versions behave differently. If consistency matters, make your instructions and format requirements more specific, and provide an example of the output you want.
Is it safe to use ChatGPT for work documents?
It depends on your organisation's policy, the plan you use and the data involved. Remove or anonymise confidential information, and check with your IT or compliance team before using AI tools with company data.
Conclusion
Better answers come from better instructions: add context, be precise about the task and format, set constraints, iterate, and verify anything important before you use it. If you are just getting started, the Introduction to ChatGPT: A Practical Guide course builds these habits through real examples. To apply AI more broadly across your role, from reports to decision-making, look at Artificial Intelligence for Professionals.
