What Is Prompt Engineering
What Is Prompt Engineering
Prompt engineering has emerged as a critical discipline in the field of generative AI, representing the
nuanced art and science of crafting input instructions that maximize the potential of artificial
intelligence systems.
Unlike traditional programming, which relies on rigid syntax and predefined rules, prompt
engineering requires a deep understanding of language models' capabilities, limitations, and
underlying mechanisms. Generative AI, such as OpenAI's ChatGPT and DALL-E, can create text,
images, audio, and much more. Anyone can use these tools to perform a task, but the key to
obtaining high-quality results lies in how effectively you communicate with the AI. Understanding
the model's strengths and constraints allows you to refine prompts in a way that yields the best
possible outcome.
Imagine you're giving instructions to a very smart but very literal assistant. If you’re vague or
imprecise, the assistant might misinterpret your request or provide an answer that doesn't fully
meet your needs. Prompt engineering is the art of structuring your inputs to AI in a way that gets
you exactly what you want. It's like learning a new language—the language of talking to artificial
intelligence.
Think of an AI like a powerful but somewhat confused translator. If you're not super clear, you might
end up with something totally different from what you intended. Prompt engineering helps you
communicate precisely and get the results you're looking for.
In everyday use, AI can enhance creativity, boost productivity, and automate tedious tasks—but only
if it's guided properly. A well-crafted prompt can mean the difference between a vague, unhelpful
response and a highly useful, well-structured output. This skill is becoming increasingly important as
AI continues to integrate into various industries, from writing and marketing to software
development, legal research, customer service, and even medical diagnostics.
For example, let's say you're a writer using AI to help brainstorm ideas. If you type in "Give me some
story ideas," you might receive a broad and generic list. However, if you refine your prompt to
something like "Give me five science fiction story ideas set in a dystopian future where humans and
AI coexist but struggle for control," the AI will generate more focused and relevant suggestions. The
specificity of your request drastically improves the quality of the response.
Similarly, in programming, you can ask AI to generate a piece of code. A vague prompt like "Write a
Python function" might not be very helpful. But if you specify, "Write a Python function that takes a
list of numbers and returns a new list with only the even numbers, using list comprehension," the AI
will provide exactly what you need.
Another crucial aspect of prompt engineering is iteration. Rarely will your first prompt yield the
perfect response. Instead, refining and experimenting with different ways to phrase your
instructions can help you achieve better results. This process is akin to debugging in software
development—adjusting and optimizing until you reach the desired output.
Whether you're a student, professional, or business owner, mastering prompt engineering allows
you to harness AI's full potential and make it work for you rather than against you. As AI tools
become more prevalent, those who understand how to interact with them effectively will have a
significant advantage in productivity and efficiency.
In the following chapters, we'll dive deeper into specific techniques, best practices, and real-world
applications that will turn you into an expert in communicating with AI. From structured prompting
methods to advanced strategies like chain-of-thought reasoning, you'll learn how to craft prompts
that consistently yield high-quality outputs. Let’s get started!
Chapter 1: Limit Scope and Provide Context
Interacting with AI without setting a clear scope is like fishing without knowing what you’re looking
for. The ocean is vast, and without a clear target, you might end up catching something irrelevant—
or nothing at all.
When prompting an AI, defining scope acts as a guide, ensuring that the response is precise,
relevant, and useful. Without proper scope, the AI might provide vague, overly general, or even off-
topic information.
Prompting AI works the same way. A broad request leaves too much room for interpretation, often
resulting in a response that is too general to be useful. If you want the AI to provide the exact
information you need, you must narrow the focus and define your catch.
Example:
● Refined prompt: "Explain how deforestation contributes to climate change, with a focus on
its impact on carbon dioxide levels."
1. Avoids an Overloaded Net – The broad prompt could lead to an overwhelming response
covering everything from greenhouse gases to rising sea levels. The refined prompt ensures
the AI focuses only on deforestation and its relationship to CO₂.
2. Targets the Right Catch – Instead of dragging in every aspect of climate change, the AI is
now searching for one specific connection: how deforestation impacts carbon dioxide levels.
This makes the response more relevant.
3. Delivers a High-Quality Yield – Just as a skilled fisherman uses the right net for the right fish,
a refined prompt helps the AI retrieve the most useful and accurate information, saving time
and effort.
Key Takeaway:
A well-defined request helps the AI "fish" in the right part of the ocean, bringing in the exact
information you need while avoiding a tangled mess of irrelevant details. Before prompting, ask:
Being specific ensures you don’t spend extra time sorting through unnecessary information, making
AI a much more efficient and valuable tool.
AI works the same way. If you do not specify the format of the response, the AI will generate
information in whatever way it thinks is best—which might not be what you need. It could provide
a lengthy essay when you wanted a concise summary, a detailed explanation when you needed
bullet points, or an unordered list when you required structured paragraphs.
Example: The Difference Between Getting Information and Getting It in the Right Format
Imagine you have a school assignment on ocean ecosystems. The teacher has asked you to write a
formal three-paragraph summary on coral reefs, deep-sea habitats, and kelp forests.
This might generate a general, unstructured response covering everything from marine biodiversity
to pollution, with no clear focus on coral reefs, deep-sea habitats, or kelp forests. You now have to
sort through all the details and rewrite it yourself to fit the assignment requirements.
Scenario 2: A Refined Prompt That Provides the Right Information in the Right Format
Prompt: "Provide a three-paragraph summary of ocean ecosystems, focusing on coral reefs, deep-
sea habitats, and kelp forests."
Now, the AI delivers exactly what you need—a structured three-paragraph summary that directly
addresses the topics you were assigned. You no longer have to manually reshape the response, and
it is already formatted to match your homework instructions.
1. Provides a Usable Structure – The AI now knows to return three cohesive paragraphs, rather
than a list of random facts.
2. Targets the Right Information – By specifying coral reefs, deep-sea habitats, and kelp
forests, the response stays focused instead of covering unrelated marine topics.
3. Eliminates Extra Work – Instead of sorting through excess information and rewriting the
response, you get something that is already assignment-ready.
The way you format your request depends on what you need the AI to produce. Let’s look at the
same topic—ocean ecosystems—but in different contexts.
"Create a PowerPoint slide outline on ocean ecosystems, highlighting key facts about coral reefs,
deep-sea habitats, and kelp forests."
The AI generates bullet points instead of paragraphs, making it easy to copy into a slide deck.
"List five key differences between coral reefs, deep-sea habitats, and kelp forests in a table format."
The AI organizes information in a table, making it easy to compare and review.
"Draft a 500-word research report introduction on ocean ecosystems with citations and a formal
tone."
The AI writes a formal research introduction, including academic-style citations if requested.
Key Takeaways:
If setting the scope tells the AI where to fish, specifying the format tells it what kind of net to use.
● What structure would make this response most useful? (Paragraphs, bullet points, tables,
summaries, slides, etc.)
● Should the response be formal, technical, or conversational?
● Is there a word limit, specific sections, or key topics that need to be covered?
By defining the format clearly, you ensure the AI gives you exactly what you need, in the most
practical way possible, reducing time spent restructuring or reformatting the response.
C. Set Constraints
A skilled fisherman doesn’t just throw a net into the ocean and hope for the best—he selects the
right size, mesh, and depth to catch exactly what he needs. A net with wide gaps might let smaller
fish escape, while a deep-sea net won’t work if the fish are near the surface.
Constraints in AI prompting work the same way. Without them, the AI might return responses that
are too broad, too long, or irrelevant to your needs. By limiting the scope through clear constraints,
you ensure the AI’s response is focused, useful, and actionable.
● Refined prompt: "Provide five social media marketing strategies for a startup with a small
budget."
1. Limits the Catch to the Right Fish – The AI now knows it must provide exactly five ideas,
preventing an overwhelming flood of suggestions.
2. Nets the Right Type of Fish – By specifying social media, the AI won’t return ideas about
print ads or TV commercials.
3. Considering Environmental Conditions – The constraint “for a startup with a small budget”
ensures the AI provides cost-effective strategies instead of expensive campaigns.
Imagine you are looking for fitness advice. A general request might pull in too much information,
requiring extra effort to filter out what is useful.
● Refined prompt: "I’m a 30-year-old beginner looking for a simple home workout plan with
no equipment."
2. Targets a Specific Depth – The AI avoids gym-based exercises, since the request specifies no
equipment.
3. Adapts to the Fisherman – The plan is now designed for a 30-year-old beginner, ensuring
that it is neither too advanced nor too basic.
By adding constraints, the AI eliminates unnecessary details, delivering a precise and useful response
instead of a generic one.
Key Takeaway:
A fisherman does not leave his catch to chance—he chooses the right tools, location, and strategy
to ensure a successful haul.
1. How many results do I need? (A list of five? A summary under 200 words?)
2. What specific category should the AI focus on? (Fitness, marketing, finance?)
3. What real-world conditions should be considered? (Budget, skill level, time constraints?)
By setting clear constraints, you ensure the AI delivers exactly what you need, in the right format,
without excess information. This makes AI a more efficient and reliable tool in any workflow.
Scenario:
You are a business consultant hired by a small chain of coffee shops that wants to expand into online
sales. The owner has asked you to research the best strategies for selling coffee products online.
Since you are using AI to assist with your research, you must apply the three key techniques for
refining prompts:
3. Set Constraints
Task 1: Being Specific About the Task
The AI provides a long, general response that includes everything from building a website to supply
chain management. However, the coffee shop owner is primarily interested in marketing strategies,
not logistics.
The output of this prompt continued way beyond what was included in the screenshot above,
including plenty of information not relevant to your desired output.
Refined Prompt: "What are the most effective digital marketing strategies for selling coffee products
online?"
Question:
● What details does it exclude that would have made the response less relevant?
Now that you have more relevant information, your next step is ensuring it’s delivered in a usable
format.
Your first attempt at prompting lacks format specification:
Prompt: "What are the most effective digital marketing strategies for selling coffee products
online?"
The AI generates a long list of with mixed strategies, including SEO, email marketing, and influencer
partnerships—but the information is disorganized and difficult to scan.
Refined Prompt: "List five digital marketing strategies for selling coffee online, with a brief
explanation of each."
Question:
● How does specifying the format improve the usability of the response?
Even with a structured response, the AI is too general, listing expensive marketing strategies such as
celebrity endorsements and national TV ads—ideas that are unrealistic for a small coffee shop.
Your initial prompt:
Prompt: "List five digital marketing strategies for selling coffee online, with a brief explanation of
each."
Refined Prompt: "List five cost-effective digital marketing strategies for a small coffee shop selling
coffee online, with a budget of under R15,000 per month."
Question:
● What might happen if constraints like budget or business size were not included?
Now that you have tested all three methods, combine them into one well-structured prompt.
Your final goal is to generate a concise, structured, and budget-friendly marketing strategy for the
coffee shop owner.
● Constraints that ensure the recommendations are practical for a small business
Example Answer:
"Provide a bullet-point list of five cost-effective digital marketing strategies for a small coffee shop
selling coffee online. Focus on strategies with a budget of under $5,000 per month and explain why
each strategy is effective."
1. Know where and what to fish for – Be specific about the task.
o A vague search might bring in all kinds of fish, some irrelevant. Define your target
clearly.
o Example: Instead of "How do I sell coffee online?", specify "What are the best digital
marketing strategies for a small coffee shop?"
o A net catches everything, while a spear is precise. The format shapes how AI delivers
results.
3. Use the right tools for the right waters – Set constraints.
o A deep-sea rod isn’t needed for shallow water. Constraints ensure relevance.
o Example: Instead of "List marketing strategies," specify "List five strategies for a
coffee shop with a budget under $5,000 per month.
Think of it like teaching a new employee. If you give them minimal instructions, they might get the
job done, but with more context—such as company culture, past reports, and detailed expectations
—they will perform much better.
Prompt:
"I need to calculate revenue recognition for a retail company under IFRS 15. What additional
information do you need to provide the most accurate response?"
2. How are contracts/sales structured? Are there long term contracts or is revenue recognised
at point of sale?
Step 2: "Now, explain how IFRS 16 treatment differs for short-term leases and low-value assets."
Step 3: "Finally, apply this to a company that leases multiple office spaces across different countries.
What additional factors should be considered?"
● The AI builds on previous information, creating a more structured and detailed response.
● Useful for complex topics where too much context at once might overwhelm the AI.
Conclusion
Expanding context allows the AI to refine and enhance its response, just like a navigator providing
constant updates for a ship on the ocean. The more details, background, and structure you provide,
the more accurate and useful the AI’s answer will be.
Prompt engineering is a new and evolving science, and providing context is one of the pillars of
generating accurate and relevant outputs. New methods of structuring and expanding context are
being experimented with daily, and the most effective techniques may vary depending on the
complexity of the task and the AI model being used.
To get the most out of AI, be open to experimenting with different ways of providing context—
whether through upfront details, AI-driven questioning, step-by-step inputs, or real-world scenarios.
Over time, refining your approach will help you consistently produce high-quality AI-assisted
outputs.
Chapter 3: Persona’s
One of the most powerful techniques in prompt engineering is instructing the AI to adopt a specific
persona before giving it a task. This allows the AI to tailor its language, tone, and approach based on
the role it is playing, ensuring responses that are relevant, accurate, and well-structured.
Just as an actor adjusts their performance depending on the character they are playing, AI can step
into different roles to provide specialized responses.
The same applies when prompting AI. The more you shape the persona, the better the AI adapts its
response.
For example:
● A board member cares about profitability, investor confidence, and strategic direction.
● A department head wants to know how budgets and spending affect their team.
If you don’t adjust your message, your presentation might be too technical for some and not
detailed enough for others.
This is where personas come in. By instructing AI to adopt a specific role, you can ensure it tailors
responses based on who it's speaking to—just like you would in real life.
For this example we have taken financial statements of the SPAR Group, specifically the income
statement. This can be found at :
https://thespargroup.com/wp-content/uploads/2024/11/SPAR_Group_FY24_AFS.pdf
Response
Scenario 2
Under scenario 2 we have chat gpt respond as a board member
Scenario 3
Chapter 4: Using Delimiters
When interacting with AI, clarity is key. Without clear boundaries, the AI might misinterpret your
request, mixing instructions with input data or providing responses that don’t match your intent.
Delimiters help solve this problem by clearly marking different sections of your prompt.
What is a Delimiter?
A delimiter is one or more characters that separate different parts of a text string. In AI prompting,
delimiters act as markers that tell the AI where one section of a prompt starts and another ends.
Let’s translate that to English. A delimiter is a symbol or a set of characters that helps separate
different parts of a prompt so that the AI knows where one part starts and another ends.
Think of it like dividers in a fishing tackle box—each section holds a different type of bait, keeping
things organized. In AI prompting, delimiters help separate instructions from input data, making sure
the AI knows what to do and what to work with.
● double hashtags, ##
https://libguides.uvic.ca/promptdesign/delimiters#:~:text=Delimiters%20are%20a%20sequence
%20of,to%20understand%20your%20prompt's%20structure.
Prompt:
Help me Summarise IFRS 16 for a client with no accounting background: IFRS 16 requires lessees to
recognise most leases on the balance sheet, recording a right-of-use asset and a lease liability. This
eliminates the distinction between operating and finance leases for lessees.
● Instead of summarizing IFRS 16, the AI gave advice on how to summarise it.
● The AI wasn’t sure where the instruction ended and where the standard's content began.
Prompt Template:
"Summarise the following IFRS standard for a [target audience]: """[insert IFRS standard text]"""
By simply replacing the target audience and the text inside the delimiters, you can reuse the same
prompt structure:
● For an auditor:
"Summarise the following IFRS standard for an external auditor: """IFRS 15 outlines how
companies recognize revenue from contracts with customers, ensuring revenue is reported
when performance obligations are met."""
1. Saves Time – Instead of rewriting the full prompt, you only change the text inside the
delimiters.
2. Customizes the Output – The AI tailors responses based on who will read the explanation.
3. Ensures Clarity – The delimiters make it clear where the IFRS text begins and ends,
preventing misinterpretation.
Chapter 5 Splitting up complete tasks
When working with AI, it can be tempting to ask for everything at once—but just like trying to eat a
whole meal in one bite, it’s inefficient and overwhelming. Instead, breaking tasks into smaller, more
manageable sub-tasks leads to clearer responses, improved efficiency, and better results.
Similarly, splitting tasks in AI prompts ensures better-defined outputs by focusing on one step at a
time.
2. Increased Efficiency – The AI can process and refine each step, leading to better overall
results.
3. More Control Over the Process – You can review each step and make adjustments before
moving forward.
4. Reduces Token Usage – Instead of repeating unnecessary details, only relevant summaries
are carried forward.
"Before writing the proposal, outline the key sections that should be included."
Now the AI gives you a structured plan—maybe an introduction, market analysis, financial
projections, and risk assessment. Once the plan is clear, you can ask for each section separately,
ensuring a well-structured and professional result.
This method keeps each step focused and clear, preventing AI from getting bogged down by
unnecessary background details. It also reduces token usage, meaning you get more efficient, cost-
effective responses without repeating unnecessary context.
Let’s say you’re preparing a business presentation on cash flow management. If you ask AI to "Create
a full presentation on cash flow management, including strategies, key metrics, and case studies,"
the response might be too generic or too long-winded. Instead, try:
1. "What are the key cash flow management strategies used by successful businesses?"
2. "What are the most important metrics used to evaluate cash flow performance?"
3. "Provide two case studies of companies that successfully improved cash flow using strategic
planning."
4. "Now that I have the research, generate a structured outline for a business presentation on
cash flow management."
5. "Expand on each section of the presentation outline, ensuring clear explanations and
examples."
By handling one piece at a time, you refine the output step by step, making it more organized and
polished than if you had asked for everything at once.
Just like solving a puzzle, assembling a business plan, or preparing a financial report, the key to
success is handling one piece at a time—ensuring each part fits perfectly before moving on to the
next.
Chapter 6: Multimodal Tasks – Expanding Beyond Text
So far, we’ve focused on text-based prompting, but AI is capable of much more. Just like a chef uses
multiple ingredients to create a dish—balancing flavours, textures, and techniques—AI can process
and generate different types of media to complete more complex tasks.
This is where multimodal AI comes in. Instead of just working with text, AI can now analyze images,
generate audio, create videos, and even provide insights from photos or voice inputs.
Just like a conversation with a person who can see, hear, and speak, multimodal AI doesn’t rely on
just one type of input or output—it can blend multiple forms of media to create richer, more
interactive responses.
Imagine your car is making a strange noise, and you’re unsure what’s wrong. Instead of typing a
vague description, you can:
1. Take a photo of the engine warning light and ask AI what it means.
2. Record the sound the engine is making and ask AI to analyze it.
Now, instead of spending hours searching through car forums, you get an immediate, customized
response based on real-world input.
● Provide emphasis through tone and inflection, which might be lost in written instructions.
Because some AI models can analyse tone and speech patterns, it picks up on subtle details that text
alone might miss.
AI can turn text descriptions into images, logos, or design mock-ups. If you’re starting a business and
need branding ideas, you can prompt AI with:
"Generate a logo concept for a modern coffee shop with a minimalist aesthetic."
Instead of just describing the idea, the AI creates a visual that helps you see the concept
immediately.
Not everyone absorbs information best through reading. AI can take written content and convert it
into spoken narration or even video presentations.
● Convert sections into audio files for people who prefer listening.
Ever been stuck fixing something at home but didn’t know where to start? Instead of searching
through endless how-to articles, you can:
● Create a personalized fitness plan based on your goals and body type.
Multimodal AI can transform education by making learning more visual, interactive, and accessible.
Students can:
Text-based AI is powerful, but combining different media types takes AI interaction to a whole new
level. Instead of just reading responses, users can now see, hear, and experience information in
more intuitive ways.
● Bridge the gap between knowledge and action (e.g., learning by watching rather than just
reading).
As AI technology continues to evolve, blending text, images, video, and audio will become the new
standard—making tasks easier, faster, and more engaging than ever before.
Chapter 7: Other Prompt Engineering Techniques
By now, we've covered the fundamentals of prompt engineering—limiting scope, providing context,
using personas, splitting tasks, and leveraging multimodal capabilities. But advanced techniques can
further refine AI responses, making them even more targeted, efficient, and insightful.
Each of these methods helps fine-tune responses, reduce unwanted information, and improve AI-
generated insights.
Let’s say you want to learn about the history of South Africa, but you already know a lot about
Nelson Mandela and want to focus on lesser-known events.
However, this technique is still evolving. The moment you bring up what not to include, you create a
"pink elephant problem"—when someone tells you not to think about a pink elephant, it’s the first
thing that comes to mind.
Sometimes, AI still mentions the excluded topic or leaves gaps in the response where that
information would have naturally fit. While negative prompting can work in highly specific cases, its
effectiveness is hit or miss.
● Be very specific about what to exclude. The more defined the exclusion, the better.
● Instead of negative prompting, reframe the request to redirect the AI’s focus.
● If AI still includes the unwanted topic, manually refine or reword the request.
Self-Review – Making AI Improve Its Own Responses
One of the most powerful techniques in prompt engineering is asking AI to review and refine its own
response.
AI responds with:
"AI is revolutionizing businesses by automating tasks, improving efficiency, and enhancing decision-
making. Companies across industries use AI-driven insights for better customer service, risk
assessment, and operational improvements."
AI might respond:
"Upon review, my initial response was informative but lacked depth on challenges businesses face
when adopting AI. The revised version includes both benefits and potential risks."
Revised Response:
"AI is transforming businesses by automating tasks, improving efficiency, and enhancing decision-
making. However, adoption challenges include high implementation costs, data security concerns,
and workforce adaptation issues. Companies must balance AI-driven innovation with ethical and
operational considerations."
By forcing AI to critique its own work, you get a stronger and more balanced response—without
needing to refine it yourself.
● When you need a more in-depth answer than what AI first provides.
For example, suppose you want AI to help with self-study in business strategy. Instead of making a
new request every time, you can create a custom instruction:
Prompt:
*"I am interested in business strategy and its application in real-world companies. Can you provide
case studies that showcase how different companies have successfully implemented strategic
frameworks? Each case study should include:
Now, every time you ask for case studies, AI follows this structure, ensuring consistent and relevant
responses.
● Content Format Requirements: "Summarize in bullet points first, then provide a detailed
explanation."
By defining how AI should think and respond, custom instructions make AI more aligned with your
needs.
● Negative prompting attempts to exclude unwanted information, but its effectiveness varies
—it’s best to redirect focus rather than explicitly state exclusions.
● Self-review techniques allow AI to critique and improve its own work, resulting in more
refined and insightful responses.
As AI continues to evolve, experimenting with different techniques will help refine your approach—
ensuring AI is not just a tool but a strategic partner in problem-solving, learning, and business
decision-making.