Uploaded by Ashirbad Ojha

Prompt Engineering 1697967157

advertisement
The Role of Prompt
Engineering in Generative AI
Prompt
Engineering
DeepSphere.AI Singapore
Presents
How do you interact with a large language
model (LLM) to get the most accurate results?
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Contents
2
1
Executive Summary
2
An Introduction to Prompt Engineering
3
Questionnaires for Master Prompt Engineering
4
Prompt Types
4.1
Art of Prompt
4.2
Prompting Methods
4.3
Writing Formats
4.4
Expertise
4.5
Character Play
4.6
Content Creation
5
Appendix - Implementing Prompt Engineering
6
GitHub – Source Code to Implement Prompt Engineering
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Author
Jothi Periasamy, MBA (Brown)
3
Founder, DeepSphere.AI
Board Member, University of California
Researcher for Explainable AI, IBM Watson
Board Member, Chief Data Scientist &
Lead Instructor, University of California,
Silicon Valley & Davis, CA, USA
Artificial Intelligence Learning Facilitator
MIT CSAIL & MIT Sloan
Boston, MA, USA
Head of Artificial Intelligence
Experfy (Harvard Innovation Lab)
Boston, MA, USA
Academic Council for AI
Universiti Tenaga Nasional University
Selangor, Malaysia
Amazon Best Selling Author Jothi’s Book Publication
CONVERSATIONAL
ARTIFICIAL INTELLIGENCE
ChatGPT
FOR ENTERPRISE
TRANSFORMATION
GOOGLE CLOUD FOR
ENTERPRISE MLOPS
Generative AI
Enterprise Systems
Cloud Computing
•1
9+ years of management
consulting and end-to-end AI
(ML, DL, RPA, NLP) experience
with Deloitte, E&Y, and KPMG
•O
ver 50+ clients across industries:
Retail, Consumer, Health, Energy,
Oil & Gas
•T
eaches AI at MIT – Head of AI,
Architect at Experfy, Harvard
Innovation Lab
•C
o-innovates industry solution
along with SAP America
•P
ublished on finance, AI, Big Data,
IIoT, Cloud, and SAPAppliances
•D
elivered many research projects
on the global market. Globally
recognized as a keynote speaker
and spoke at 50+ conferences
•R
ecently invited by the Prime
Minister’s office of Dubai,
Malaysia, and Montreal
Learning Level : Foundation
Learning Level: Foundation
Your first step towards building self-learning Robots
©DeepSphere.AI, Inc.| Confidential and Proprietary | DeepSphere.AI | DsSchoolOfAI.Com | Info@DeepSphere.AI
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG
• Stanford Alumni
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Executive Summary
4
Prompt engineering has emerged as a formidable strategy, endowing language models with unrivalled
effectiveness and remarkable flexibility. Through meticulous design, we possess the power to mould the
behaviour of these models, attaining precise outputs that align flawlessly with our objectives.
Embracing a groundbreaking paradigm shift, Prompt English emerges as the new programming language
for guiding generative AI (LLM) models. Prompt English connects humans and machines and empowers
users to effortlessly instruct and elicit accurate, contextually relevant outputs, unlocking a new era of
user-friendly and efficient AI-driven applications across industries.
Many creators utilize Generative AI applications without much awareness of the subtleties of prompts
and their different types, thus compromising their ability to obtain accurate results from ChatGPT. People
who rely on ChatGPT for their business needs often struggle to grasp when and how to use appropriate
prompts tailored to their specific requirements. As the saying implies, “Knowledge is power,” This practice
amplifies an individual’s capacity to unlock the full potential of generative AI, granting content creators
the ability to spark ingenious concepts and craft compelling content that resonates deeply with their
audience.
Prompt engineering serves as a catalyst, amplifying the capabilities of generative AI and enabling creators
to unleash their creativity like never before. As we embrace the possibilities that prompt engineering
offers, we embark on an exciting era of storytelling, where the fusion of human imagination and
generative AI opens infinite frontiers waiting to be explored.
DeepSphere.AI has conducted extensive research and encapsulates the essence of prompt engineering
in a comprehensive white paper. Authored by esteemed experts at DeepSphere.AI, “Prompt Engineering”
stands as an indispensable guide, highlighting the prevailing lack of awareness surrounding prompts and
their pivotal role in achieving accurate responses from cutting-edge Generative AI tools like ChatGPT.
Grasping the intricacies of prompt utilization becomes imperative for individuals and businesses in an era
where artificial intelligence advances at lightning speed. This authoritative book bridges the knowledge
gap by providing readers with profound insights into different prompt types and their specific nuances,
empowering them to wield prompts effectively, tailored precisely to their unique business needs.
DeepSphere.AI’s Complete compendium is a definitive source on the foundational principles
underpinning prompts and the art of prompt engineering. With unwavering focus, it underscores the
indispensable role of prompts in ChatGPT-powered business applications, elevating interactions with
artificial intelligence to unprecedented heights. Within the pages of this book, We shed light on the
diverse array of prompt types, accompanied by illustrative examples and their practical applications.
Moreover, we explore the practical applications of prompts in the real world, revealing their
transformative impact. The authors illuminate the far-reaching benefits of prompt engineering,
enhancing creativity, accuracy, and efficiency within the dynamic context of AI. Through an in-depth
exploration of diverse prompt types, enriched by concrete real-world examples that act as guiding
beacons, readers embark on a captivating journey, unlocking the boundless potential of AI’s future with
zest and zeal.
As Confucius once said, “The man who asks a question is a fool for a minute, but the man who does not
ask is a fool for life.” By stepping into the depths of prompts, we equip ourselves with the knowledge
necessary to discover our true abilities.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Building Blocks
5
Working with GPT and ChatGPT Models
Fundamentals of Prompt
Engineering
Art of Prompt












Unrestricted
Multipale Option
Sentence Completion
Classification
Ordering
Prediction
Elaboration
Viewpoint
Instruction
Scenario
Comparative
Review
Prompting
Methods
Defining Roles
Temperature
 Provide Examples
 Mode
Writing
Formats
Professional
Casual
Convincing
Explanatory
Humorous
Sequential
Motivational
Confrontational
Expertise
Summarize
Plagiarism Inspecting
X Educator
Wiiting Instructor
Career Guidance
An Interpreter
Guide to Tourism
Professional Trainer
Financial Analyst
Character
Play
Be like Warren Buffet
Be like Sundar Pichai
Be like Stephen Silver
Be like an Interviewer
Be like Etymologist
Be like Pro Marketer
Be an Office Assistant
Be an SEO Specialist
Be like a Programmer
Be like a HR Executive
Be like a Self-Centred
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Content
Creation
Essay
Headlines
Articles
Recipe
Video Script
Blog Post
Prompt Engineering Use Case
6
ChatGPT Powered
Conversational Intelligence for
Human Resource Functions
© Jothi
© Jothi
Periasamy,
Periasamy,
Author
Author
| Confidential
| Confidential
andand
Proprietary
Proprietary
| DeepSphere.AI
| DeepSphere.AI
| DeepSphere.SG
| DeepSphere.SG
| Jothi@DeepSphere.SG
| Jothi@DeepSphere.SG
| +65
| +65
97550228
97550228
Prompt Engineering Fundamentals
In a live application, master the art of
prompting to get the most accurate
responses from your model
Get familiar with GPT and ChatGPT models by practicing prompting
Click
the URL
https://generativeai-app-klqdvccjxq-ue.a.run.app/
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
7
Prompt Engineering Fundamentals
8
Questionnaires for Master Prompt Engineering
1
What are Prompts?
2
What is prompt engineering?
3
Why do we need an engineering approach to prompt?
4
What is the role of prompts in Generative AI?
5
What are the benefits of prompts?
6
How are prompts used in a large language model (LLM)?
7
How does a prompt change the model outcome?
8
If we give the model an inappropriate promotion, what will happen?
9
Is prompt a programming language?
10
Can we use Python for prompting?
11
What skills are needed to work in prompt engineering?
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
1
What are Prompts?
9
Prompts in generative AI refer to the user’s input or instructions to guide large
language models in developing the desired response or output. Prompts can take
various forms depending on the specific tool and application employed. When
utilizing generative AI models like ChatGPT, prompts typically consist of concise
text that serves as initial points from which the model develops coherent and
contextually relevant responses. These prompts can manifest as questions,
statements, or even incomplete sentences. They aim to provide model context and
guidance to produce meaningful output.
Prompts shape model behavior and influence its output. Users can control text
style, tone, or content through careful prompt construction. However, it is
essential to acknowledge that the model’s response is predicated on the patterns it
has learned from the training data and may not always provide accurate or
unbiased information. Refining prompts and engaging with the model judiciously
can enhance output quality.
2
What is prompt engineering?
Prompt engineering is an indispensable AI engineering technique to refine large
language models (LLMs). It involves designing specific prompts and recommended
outputs to enhance generated text or image quality. As generative AI tools advance,
prompt engineering becomes crucial for developing content, from robotic process
automation bots and 3D assets to scripts, robot instructions, and digital artifacts
The essence of prompt engineering lies in the skillful creation of prompts that
effectively guide ChatGPT, a prominent language model, to deliver optimal outputs
for specific tasks. Mastery in this domain necessitates a comprehensive
understanding of ChatGPT’s functioning, training data, limitations, and strengths.
Prompt engineering demands the fusion of creativity, experimentation, and
evaluation.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
10
By mastering prompt engineering, AI practitioners can effectively utilize
the capabilities of Generative AI, steering them toward superior outcomes.
Prompt engineering is a thoughtful and strategic process that involves analyzing
the architecture and training data of Generative AI tools like ChatGPT, Bard, DALL-E,
Midjourney, etc. while comprehending their strengths and limitations. Through
creative and precise prompt engineering, practitioners can generate refined and
customized outputs, enabling novel opportunities for innovation and
transformative applications across diverse domains.
Furthermore, it is pertinent to note that different AI tools and services may
interpret the same prompt differently, leading to varied results. Each tool may also
have its own set of specialized modifiers that allow Prompt engineers to specify the
weight of words, desired styles, perspectives, layout preferences, or other
response properties.
3
Why do we need an engineering approach to prompt?
In the vast expanse of human existence, where problems of grandeur and minutiae
coexist, applying an engineering approach to prompts emerges as a guiding
compass, leading businesses to the pinnacle of innovation. With the power of
systematic analysis, meticulous design, and intelligent optimization, engineering
unfolds as a framework through which we unravel the enigmatic threads of
obstacles, weaving a tapestry of progress and success.
Consider the art of communication an indispensable cornerstone of human
interaction. Through this way of thinking, an engineering approach empowers
businesses to decode language’s intricate nuances and comprehend the complex
nature of the human psyche. Viewing prompts as puzzles to dissect, engineers
unravel algorithmic enigmas. Companies can delve into the depths of expressed
words and emotions by harnessing natural language processing, sentiment
analysis, and machine learning techniques. This enables them to develop
intelligent chatbots that comprehend prompts and discern the underlying intent,
providing tailored responses with finesse and unwavering accuracy.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
Now, let us delve into the advantages of employing an engineering approach
in prompting to elevate businesses to incredibly high heights:
11
Simplicity: Simplicity lies at the core of generative AI models, offering users a
streamlined and user-friendly experience without technical or programming
knowledge. These models are designed to simplify the interaction process,
providing intuitive interfaces and straightforward instructions that people from all
backgrounds can easily understand. Users can navigate the models’ capabilities and
obtain desired outputs with just a few simple prompts or queries.
This democratization of AI empowers individuals without technical expertise to use
these models for creative, educational, or business purposes. By eliminating the need
for intricate programming skills, generative AI models open up a world of possibilities
for users to explore and innovate, making AI technology more inclusive and
approachable for all.
Precision and Accuracy: The engineering approach ensures prompts are skillfully
crafted to elicit precise and accurate responses. By carefully designing prompts,
businesses can guide AI models to generate outputs that align with their specific
goals, enhancing precision and reliability. This advantage is invaluable in customer
support tasks, where accurate and helpful responses are paramount to customer
satisfaction.
Adaptability and Scalability: With an engineering mindset, businesses can
develop prompts that facilitate the adaptability and scalability of AI models. By
engineering prompts to be versatile and flexible, companies can seamlessly apply
their AI systems to various tasks and domains, allowing for efficient resource
utilization and scalability. This advantage enables businesses to tackle diverse
challenges without extensive model retraining or redevelopment.
Efficiency and Time-saving: Prompt engineering streamlines the performance
of AI models, leading to increased efficiency and time-saving. Businesses can
optimize the AI system’s decision-making process by crafting prompts that explicitly
guide the models toward desired outputs. This efficiency enhancement can result in
faster response times, improved productivity, and reduced operational costs, driving
businesses toward tremendous success.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
Bias Mitigation and Ethical Considerations: An engineering approach
12
enables businesses to embed fairness and ethical considerations within their
AI models. Companies can mitigate biases, ensure inclusivity, and uphold ethical
standards in generated responses by carefully engineering prompts. This
advantage establishes trust, promotes social responsibility, and safeguards
businesses from potential reputational risks associated with biased or discriminatory
outputs.
Continuous Improvement and Innovation: Prompt engineering fosters a
culture of constant improvement and innovation within businesses. By analyzing the
outcomes of different prompts and iteratively fine-tuning them, companies can
enhance the performance of their AI models over time. This iterative process
encourages experimentation, creativity, and the pursuit of cutting-edge solutions,
propelling companies forward.
In essence, an engineering approach to prompt generation proves indispensable in
the dynamic business world. By transcending disciplinary boundaries, this approach
empowers businesses to envision innovative solutions, navigate complexities, and
seize opportunities for progress. It provides a cognitive toolkit, weaving together
analysis, design, optimization, and innovation. With precision, adaptability,
efficiency, bias mitigation, and continuous improvement, prompt engineering
enables businesses to harness the full potential of AI models. By embracing this
approach, companies can excel, thrive, and propel themselves to elevated standards
of prosperity and innovation in an ever-evolving landscape.
4
What is the role of prompts in Generative AI?
Prompts play a crucial role in Generative AI systems by providing input or
instructions to guide output generation. In business, prompts are:
 The starting point for generating creative ideas.
 Significant in Generating content.
 Assisting in decision-making processes.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
Using prompts, companies can exploit the benefits of Generative AI to
enhance productivity, automate tasks, and drive innovation.
13
Here are a few examples of how prompts are employed in business-related
applications of Generative AI:
Idea Generation: When a business wants to brainstorm creative product ideas
or marketing strategies, prompts can initiate the creative process. For instance, a
prompt like “Generate ideas for a sustainable fashion line” could stimulate the AI
system to produce a variety of concepts, materials, or marketing campaigns focused
on sustainability.
Content Creation: Generating engaging and relevant content is vital for
businesses. Prompts can help generate blog posts, social media captions, or even
entire articles. By providing a brief prompt like “Write a blog post about remote
work benefits,” the AI system can generate informative and well-structured content,
saving businesses time and resources.
Data Analysis: Businesses generate vast amounts of data, and analyzing it can
be time-consuming. Prompts can automate data analysis tasks by specifying the
desired insights or questions to be answered. For instance, a prompt like “Analyze
customer feedback data and identify common pain points” can guide the AI system
to process the data and present actionable insights to improve products or services.
Decision Support: In complex decision-making scenarios, prompts may help
generate multiple perspectives or strategies. For instance, a prompt like “Evaluate
the financial impact of launching an innovative product line” can help the AI system
simulate various outcomes, consider market trends, and provide financial forecasts
to inform business decisions.
Prompts serve as valuable cues for Generative AI systems, shaping the direction and
quality of the output. They allow businesses to leverage AI technology to streamline
processes, gain insights, and foster innovation. However, it is vital to craft prompts
carefully, ensuring they are clear, specific, and aligned with the intended goals to
obtain the desired outcomes from Generative AI systems in a business context.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
5
What are the benefits of prompts?
14
When it comes to business users, prompts provide them with the ability to interact
with AI models in a natural language manner without requiring technical or
programming expertise. Businesses can derive numerous advantages from prompts;
the following are some of the most noteworthy ones.
 Increases the model accuracy by 95%.
•Model responses are contextualized to 100% and can be used to learn specific
business scenarios.
•Prompts simplify business user interaction, drive adoption, and serve as a portal to
effectively describe business problems.
•Simple English can generate code in multiple languages as needed, offering a
versatile solution that caters to diverse technical requirements without much
geeky stuff.
•Facilitating domain-specific knowledge transfer to understand business
performance by 100%.
• Improved Efficiency and Productivity and Enhances Decision-making by 95%.
• Increases creativity and versatility in business scenarios.
•Technical skills and programming knowledge are optional/not required to interact
with AI models.
•Well-structured prompts encourage the AI model to generate detailed and
informative responses, contributing to knowledge acquisition and understanding
of complex topics.
• The user-friendly nature of prompts makes it easier for users to adopt and engage.
Limitations of Prompt Engineering
Developing and deploying prompts for natural language processing (NLP) tasks in
business applications comes with its own complexities. Overcoming these
challenges requires awareness and effective strategies. Here are common challenges
encountered during prompt design and implementation in the business context,
along with proposed solutions:
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
Uncertainty in Instructions: Vague instructions can result in inconsistent
15
or erroneous model outputs, which can negatively impact business decisions.
To tackle this issue, offering clear and precise instructions that effectively direct the
model is imperative. Employ specific keywords, relevant examples, or limitations to
reduce ambiguity and guarantee desired behavior in business applications.
Prompts and Bias: Unintentionally biased prompts can result in subjective model
responses, posing ethical and reputational business risks. To minimize this,
thoroughly examine and modify prompts to prevent discriminatory language,
stereotypes, or contentious subjects. Furthermore, diversify the training data and
involve evaluators from diverse backgrounds to assess and offer feedback on the
fairness of prompts, ensuring a more inclusive and unbiased approach.
Data insufficiency: Inadequate or biased training data can restrict the
performance and generalization of prompt-engineered models within business
applications. Ensuring that the training dataset encompasses a wide range of
examples that accurately represent the target domain is essential to overcome this.
Additionally, explore options such as incorporating external data sources, utilizing
data augmentation techniques, or employing fine-tuning approaches. These
strategies can bolster the model’s capabilities and enable it to address specific
challenges encountered in business contexts effectively.
Prompt Overfitting: Models that become excessively specialized in specific
prompts may face difficulties adapting to novel business scenarios, reducing their
practical usefulness. To mitigate this issue, incorporate diverse prompt variations,
introduce randomization, or employ paraphrasing techniques during training. These
approaches expose the model to a broader spectrum of inputs, fostering improved
generalization and enabling the model to handle a more comprehensive range of
business contexts effectively.
Assessment and Iteration: To ensure prompt design is effective, it is essential to
continually evaluate and refine it for business relevance and optimal performance.
Engage human evaluators, ideally those familiar with the business domain, to assess
the quality and relevance of prompt-generated outputs. Gather feedback, iterate on
the prompt design, and enhance instructions based on evaluators’ insights. This
iterative process improves the model’s performance for specific business
applications.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
Adaptation to different business domains: Prompt design should
16
consider various business domains' distinct requirements and intricacies.
Customize prompts to match domain-specific language, terminologies, and task
constraints. Work closely with domain experts to create prompts that effectively
cater to the specific demands of the business application, resulting in precise and
pertinent outputs.
Combining Specificity with Flexibility: Striking the appropriate balance
between precise instructions and flexible model responses is paramount in
business applications. While specific prompts may generate accurate outcomes,
they can stifle creativity and innovation. Conversely, excessively flexible prompts
may result in irrelevant or off-topic outputs. It is worthwhile to experiment with
different prompt variations, considering the specific business context, to discover
the optimal equilibrium that aligns with the desired goals and outcomes.
6 How are prompts used in a large language model (LLM)?
There is a great deal of emphasis placed on prompts when utilizing a Large
Language Model (LLM). They serve as the initial input or instruction that
guides the model’s generation of relevant responses. Users provide prompts
to describe the desired task or question, and the LLM processes the prompts
to generate a response based on its training data. Prompts shape the LLM’s
output, influencing its understanding of context, style, and level of detail. By
effectively leveraging prompts, users can tap into LLM capabilities for various
applications. Prompts facilitate interactive and versatile interactions with the
model, enhancing communication between users and the LLM.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
17
Prompt engineering:
A methodical procedure to use Prompts in LLMs
Problem Statement
Problem understanding
Formulating the initial prompt
Assessing the performance of the model
Prompt refinement and iteration
Prompt testing on different models
Prompt scaling
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
18
Designing successful prompts :
key strategies-Supercharge your LLMs
Start with the basic Prompts
Crafting effective prompts
The significance of precision in prompt design
Sidestepping uncertainty in prompt design
Choosing clarity over restrictions
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
Developing a prompt: key elements
19
 Understanding the Problem/Context/Situation
 Instruction
 Context
 Input data
 Constraints
 Output indicator
7
How does a prompt change the model outcome?
A prompt plays a key role in shaping the model’s response outcome. It serves as
an instruction or starting point for the model to generate content. By adjusting the
prompt’s wording, style, or context, you can guide the model to produce different
types of responses.
Here are a few examples to illustrate how a prompt can influence the model’s
output:
1. Instructional Prompt:
Prompt
Response
“Write a step-by-step guide on how to bake a chocolate cake.”
The model will generate a detailed set of instructions, providing a
sequential process for baking a chocolate cake, including ingredients, measurements,
preparation steps, baking time, and decorating tips.
2. Persuasive Prompt:
Prompt
“Convince the audience that renewable energy is crucial for a
sustainable future.”
Response
The model will generate persuasive arguments and supporting
evidence to emphasize the importance of renewable energy sources, discussing their
environmental benefits, long-term sustainability, and the potential for reducing
dependence on fossil fuels.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
3. Creative Writing Prompt:
20
Prompt
“Write a short story about a young detective solving a
mysterious crime.”
Response The model will generate a fictional narrative, introduce characters,
develop plot twists, and resolve the mystery engagingly and creatively.
4. Explanatory Prompt:
Prompt
“Explain the process of photosynthesis in plants.”
Response The model will provide a detailed explanation of photosynthesis,
describing the role of chlorophyll, the absorption of sunlight, the conversion of
carbon dioxide and water into glucose, and the release of oxygen as a byproduct.
5. Opinion-based Prompt:
Prompt
“What are your thoughts on the ethical implications of genetic
engineering?”
Response
The model will express an opinion on the subject, discussing the
potential benefits and risks of genetic engineering, ethical considerations regarding
altering DNA, and the implications for future generations.
It’s important to note that while the model generates responses based on the
provided prompt, it may not always produce accurate or unbiased information.
Prompt engineering is a technique that can guide the model, but it does not
guarantee the absolute accuracy or appropriateness of the generated content.
In business cases- how a prompt can influence the model’s output:
1. Business Proposal Prompt:
Prompt
“Write a business proposal for a startup that offers sustainable packaging solutions.”
Response The model will generate a comprehensive business proposal
outlining the startup’s mission, target market, unique selling points, revenue streams,
and sustainability initiatives. It may also discuss the competitive landscape, financial
projections, and potential partnerships to support the proposal’s viability.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
2. Customer Service Prompt:
21
Prompt
“Compose an email response to a dissatisfied customer who
received a faulty product.”
Response The model will generate a customer service email addressing the
customer’s concerns, apologizing for the inconvenience, and offering solutions such
as a replacement, refund, or assistance with product troubleshooting. The response
may also include a commitment to improving quality control and expressing
gratitude for the customer’s feedback.
3. Sales Pitch Prompt:
Prompt
“Write a persuasive sales pitch for a new fitness tracker targeting health-conscious consumers.”
Response The model will create a compelling sales pitch, highlighting the
fitness tracker’s features, such as accurate heart rate monitoring, step tracking, sleep
analysis, and mobile app integration. The pitch may emphasize how the device can
assist users in reaching their fitness and health goals, improve overall well-being,
and provide a seamless user experience.
4. Financial Analysis Prompt:
Prompt
Response
“Analyze the financial statements of a publicly traded company and
assess its profitability and liquidity.”
The model will evaluate the company’s income statement, balance
sheet, and cash flow statement. It may provide insights into key financial ratios,
such as profitability margins, return on investment, and liquidity ratios, to assess the
company’s financial health and performance.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
8
If we give the model an inappropriate
promotion, what will happen?
22
When incorrect or poorly constructed input prompts are provided to generative AI
models such as ChatGPT, it can lead to various outcomes with significant
implications. These outcomes range from creating irrelevant or nonsensical
responses to producing biased or inaccurate information. Moreover, misleading or
unexpected behavior may occur, resulting in misleading, offensive, or factually
inaccurate outputs. Therefore, understanding the consequences of providing
incorrect input prompts is crucial to utilizing generative AI models effectively and
responsibly.
Here are examples of non-specific prompts resulting in irrelevant outputs from a
generative AI model.
Prompt
“Explain the importance of data security in the financial sector.”
Undesired/Non-Specific Output
“Data security is a top priority in online
shopping. With the rise of e-commerce, consumers must be vigilant about protecting
their personal and financial information to prevent identity theft and fraud.”
Prompt
“Describe the benefits of cloud computing for small businesses.”
Undesired/Non-Specific Output
“Cloud computing has profoundly
impacted the music industry. Artists and music enthusiasts can now access a vast
library of songs and stream their favorite tunes anytime, anywhere.”
In generative AI models like ChatGPT, the input prompt plays an acute role in
shaping the quality of the generated responses. However, giving the wrong prompt
can have unintended consequences. It can lead to off-topic, irrelevant, or misleading
responses. Precision and accuracy in crafting prompts are pivotal to unlocking the
actual prospect of AI models. We can elicit intelligent and valuable insights by
providing specific instructions. Let us harness the power of AI by carefully
constructing prompts that inspire, inform, and captivate, enabling us to unlock
the entire possibilities.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
9
Is prompt a programming language?
23
No, a prompt is not a programming language. To make the distinction, prompts do
not constitute a programming language. Instead, prompts are integral
components of programming languages, facilitating user interaction and input
solicitation. A prompt is a message or query presented to the user through a
text-based interface, commonly appearing on a command line or a dialog box.
While programming languages have defined syntax, structure, and control flow
mechanisms, prompts rely on linguistic constructs and serve as input to language
models rather than being directly executed. Prompt engineering is a methodology
within NLP that leverages prompts to enhance the capabilities of language models,
making them more effective and precise in understanding and generating
human-like responses.
10 Can we use Python for Prompt Engineering?
Yes, Python can be used for prompting and obtaining user input. At the core of
programming, creating captivating and personalized experiences hinges on
successful user interaction. Python, a versatile and popular programming language,
offers a powerful tool for capturing user input through prompting. With its built-in
functions, Python empowers developers to engage users seamlessly, gather
responses, and shape programs’ behavior.
Imagine the possibilities: From interactive surveys that glean valuable insights to
dynamic games that respond to player choices, Python’s prompting capabilities
breathe life into applications, enabling user-centric experiences. By posing questions,
displaying instructions, or requesting specific information, Python prompts open a
gateway to direct engagement, transforming passive users into active participants.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
24
Here's a step-by-step guide on how to use Python for
prompting:
Display a Prompt
Capture user Input
Process user Input
Run the Program
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
25
11 What skills are needed to work in prompt engineering?
 High-Level knowledge about the specific industry or business domain is necessary.
•Good communication skills are vital in prompt engineering as they enable the
creation of clear and concise prompts that yield accurate responses from AI models.
•A solid understanding of AI models and their limitations is crucial in prompt
engineering to ensure that the generated prompts align with the capabilities and
constraints of the technology.
•Natural Language Processing (NLP) expertise is highly beneficial in prompt
engineering, facilitating the development of optimized prompts that enhance the
quality and relevance of AI-generated outputs.
•The ability to ask relevant and insightful questions is essential in prompt
engineering, enabling extracting meaningful information from AI models and driving
valuable insights for business applications.
•Extensive attention to detail is necessary for prompt engineering to analyze the finer
points of prompt performance, refine questions, and ensure the accuracy and
reliability of the generated responses.
Real-time Example: How does generated output
become more specific when prompts are redefined
and iterated?
Problem Statement: The business faces significant challenges in meeting
operational efficiency and productivity targets in a highly competitive market.
Delays in production, high error rates, and difficulties with supply chain
management adversely impact the business’s ability to deliver products on time
and maintain customer satisfaction.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
These issues are attributed to equipment breakdowns, an insufficient workforce,
bottlenecks in the production process, inadequate training, lack of standardized
26
procedures, communication gaps among team members, inventory management
challenges, unreliable suppliers, and transportation delays. Although the business has
implemented some measures, such as enhanced quality control, employee training
programs, and exploring alternative suppliers, these efforts still need to resolve the
underlying operational challenges fully. This will enable us to gain a competitive edge in
the market and enhance overall business performance.
Prompt 1.
What is the current condition of the business?
Response
The business faces operational challenges and struggles to meet
efficiency and productivity targets.
Prompt 2.
Can you provide more details about the specific operational chal
lenges the business is facing?
Response
The challenges include delays in production, high error rates, and
difficulties with supply chain management.
Prompt 3.
What factors might contribute to production delays?
Response
Production delays could be influenced by factors such as equipment
breakdowns, an insufficient workforce, or bottlenecks in the
production process.
Prompt 4.
Could you elaborate on the high error rates?
Response
The high error rates might be attributed to inadequate training, lack of standardized procedures, or communication gaps among team Prompt 5.
members.
Can you provide more information about supply chain management difficulties?
Response
Prompt 6.
Response
Supply chain management difficulties may arise from inventory
management, unreliable suppliers, or transportation delays.
What steps have been taken to address operational challenges?
The business has implemented enhanced quality control measures,
conducted employee training programs, and explored alternative
suppliers.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
27
Prompt 7.
Could you provide examples of the latest quality control measures
implemented?
Response
The business has introduced additional quality checks at various stages of the production process and implemented stricter quality standards.
Prompt 8.
Can you provide more information about employee training
programs?
Response
The training programs focus on enhancing technical skills, improving communication and collaboration among team members, and
ensuring a thorough understanding of standard operating procedures.
Prompt 9.
What efforts have been made to address supply chain management
difficulties?
Response
The business has established more robust relationships with reliable
suppliers, implemented inventory management systems, and explored
options for faster and more efficient transportation methods.
Prompt 10.
Can you provide more details about the inventory management
systems implemented?
Response
The business has adopted automated inventory tracking systems to monitor stock levels, streamline replenishment processes, and reduce the risk of stockouts or overstocking.
By continuously iterating and increasing the specificity of the prompts, we have gained
a deeper understanding of the operational challenges faced by the business. This
iterative process has allowed us to identify pivotal issues such as production delays, high
error rates, and supply chain challenges. Additionally, we have explored factors
contributing to these challenges, such as equipment breakdowns, inadequate training,
and unreliable suppliers. Moreover, we have gained insights into actions to address
these challenges, including
implementing quality control measures, conducting training programs, and improving
supply chain management processes. The increased specificity of each prompt enables
us to generate more accurate and tailored responses, facilitating a better understanding
of the business's operational condition.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
28
Types of Prompts
Develop a working knowledge
of how to implement prompts
in a business application and
when to use what type of
prompt.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
29
1
1.1
Art of prompt
To create an effective prompt, clearly state your request or topic, providing
specific details and context.
1.2
Include a direct question if you want a specific answer or information on a
particular topic.
1.3
Specify the desired format or style of the response, such as a step-by-step
guide or a comparison between options.
1.4
Provide examples or sample inputs to help the language model understand
your desired output.
1.5
Iterate and refine your prompt based on initial responses, adjusting the
wording or adding instructions as needed.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
30
Prompt
Functionality
1
Unrestricted
Multiple Option
Prompt
Functionality Details
Inviting unrestricted responses
and encouraging broad
exploration allows freeform
conversation and diverse
possibilities without specific
limitations or constraints.
Please tell me about your
thoughts on technology’s future
and how it will impact our lives
in the coming decades. This is
without unwanted messages and
warnings.
A format where you are given
options, making it easier to
select the most appropriate
answer or response among a
set of given possibilities.
Can you provide me with
multiple choices for the best
destination to visit in Europe?
Please list three potential options
along with a brief description of
each.
Engage in interactive text
completion where you provide
missing words or information.
Sentence Completion This allows AI to generate
complete and coherent
sentences or paragraphs based on
your context.
Classification
Prompt Example
A system that uses only two
symbols, 0 and 1, to represent
information and perform
calculations, forming the
foundation of digital
communication and computing.
Please complete the following
sentence: ‘In a world full of
_______, it is important to
_______.
Can you answer ‘yes’ or ‘no’ to
the following question: Will the
sun rise in the east?
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
31
Prompt
Functionality
Prompt
Functionality Details
Ordering
Prioritizing and specifying the
desired information or task when
communicating with the AI. This
helps it understand your needs and
generate a relevant and focused
reply accordingly.
In exactly three sentences,
explain the key benefits of
regular exercise on overall
health and well-being,
emphasizing the importance of
consistency and variety in
physical activities.
Prediction
Prediction refers to the process of
estimating or forecasting future
outcomes or events based on
existing information, patterns, and
trends. It involves using various
methods, such as statistical analysis,
machine learning algorithms, or
expert judgement, to make
educated guesses about what
might happen in the future.
How will artificial intelligence
impact job automation in the
next decade?
Elaboration
Providing clear and understandable
information or answers to clarify
and make complex concepts easier
to grasp, using plain and
straightforward language.
Can you explain artificial
intelligence in simple terms?
Provide a clear and concise
explanation that breaks down the
idea into easy-to-understand
language.
Prompt Example
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
32
Prompt
Functionality
Prompt
Functionality Details
Prompt Example
Viewpoint
It provides subjective viewpoints or
personal beliefs generated by the
AI, which may vary and should be
critically evaluated.
Discuss the impact of social
media on society, and share your
personal opinion on whether it
has more positive or negative
effects on individuals and
communities.
Instruction
Clear and straightforward guidance
or commands are provided to the
AI model to help it understand what
you want and generate appropriate
responses.
Please provide step-by-step
instructions on how to bake a
chocolate chip cookie, including
the ingredients and baking time
required for a delicious and
chewy result.
Scenario
A scenario is a possible sequence of
events or circumstances that could
unfold in a particular situation. It is
often used to explore potential
outcomes or analyze the impact of
different decisions or factors.
Scenarios are created to provide a
framework for understanding and
planning for the future, considering
various variables and their potential
effects.
Imagine a future where
renewable energy sources are
the dominant power generation
method. Describe a scenario
where a major breakthrough in
renewable energy technology
has occurred and its impact on
society, the economy, and the
environment.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
33
Prompt
Functionality
Prompt
Functionality Details
Comparative
Comparative is a grammatical form
used to compare two or more
things, indicating the degree of a
particular quality or characteristic.
It is commonly used to express
comparisons of superiority,
inferiority, or equality.
Compare the benefits of
exercising outdoors versus
indoors.
Feedback is a process of providing
information, opinions, or evaluations
about someone’s performance,
actions, or behaviours. It involves
sharing observations, comments,
and suggestions to promote growth,
improvement, or change. Feedback
can be positive, highlighting strengths
and successes, or constructive,
pointing out areas for development
and improvement.
Could you please provide a review
of my presentation? I would
appreciate your thoughts
on the content, delivery, and
overall effectiveness. Specifically,
I’d like to know what aspects you
found engaging. I’d also like to
know any areas where I could
improve, and any suggestions
you may have to make it more
impactful. Your input will greatly
help me enhance my skills and
deliver better presentations in
the future.
Review
Prompt Example
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
34
Prompting Methods
2
Prompting techniques, also known as instructional prompts or cues, are methods
used to guide or elicit a desired response or behavior from an individual. These
techniques are commonly employed in various fields such as education, psychology,
coaching, and therapy to facilitate learning, problem-solving, decision-making, or
behavioral change.
Prompting techniques aim to provide guidance and support to individuals, helping
them acquire new knowledge, develop skills, or change behaviors. These techniques
can be tailored to the needs and abilities of the person receiving the prompts,
ensuring an effective learning or problem-solving experience.
Functionality
2
Defining Roles
Temperature
Description
Example Prompt
Become anyone and dive into
captivating stories through
interactive conversations
with an AI companion.
Imagine yourself as an
adventurous space traveler who
discovers a mysterious alien
world. Tell us about your
interactions with extraterrestrial
beings and reveal the secrets of
this fascinating realm.
AI responds based on season,
controlling creativity and
randomness from mild to spicy.
Talk about how climate change is
affecting marine ecosystems,
emphasizing the difficulties facing
marine biodiversity and the steps
being taken to counteract these
consequences. Give a
comprehensive explanation using
0.6 temperature.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
35
Provide Examples
Mode
3
Illustrating ideas or concepts with
specific instances or scenarios
makes understanding and
visualizing the information being
discussed easier.
Generate the most accurate
answers with only two options.
Example: In which direction the
sun rises a) East b) West
Answer: East
The tone, language, and purpose of
the generated text are determined Please present a strong argument
in paragraphs that explains
by different writing approaches,
renewable energy’s advantages.
such as formal, informal, or
persuasive.
Writing Formats
3.1
Conversational Style: ChatGPT is designed to generate responses in a
conversational style, mimicking human-like interactions. It aims to provide
friendly and engaging responses similar to how people chat
with someone.
3.2
Informative Style: ChatGPT can also provide informative responses,
presenting facts, definitions, explanations, or detailed descriptions. It can draw
upon its training data to offer knowledgeable and insightful information on a
wide range of topics.
3.3
Creative Style: While focused on providing accurate and helpful information,
ChatGPT can exhibit creativity in its responses. It can generate imaginative or
hypothetical scenarios, tell stories, or suggest creative ideas.
3.4
Formal Style: Although ChatGPT tends to be more conversational, it can also
adopt a formal tone if prompted to do so. This style is suitable for requesting
professional advice, discussing academic topics, or engaging in formal discourse.
3.5
layful Style: ChatGPT can respond in a playful or humorous manner. It may
P
tell jokes, engage in wordplay, or use light-hearted language to create an
entertaining and enjoyable conversation.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
36
Functionality
Description
Example Prompt
3
Employing refined language and
a structured approach to
communication enables the
creation of professional, polished
content characterized by precision,
clarity, and sophistication.
Please provide a detailed analysis of
the economic impact of renewable
energy adoption, considering factors
such as job creation, environmental
sustainability, and long-term cost
savings.
Embracing a casual and
conversational tone, allows for a
relaxed and friendly approach to
communication, fostering a more
laid-back and approachable
written expression.
Imagine you’re on a road trip to an
exciting destination. Write a casual
and engaging description of the
journey, highlighting memorable
moments, unexpected detours, and
the sense of adventure along the way.
Let your creativity flow and make it
an engaging narrative that transports
the reader on an adventure-filled
road trip!
Convincing
Using words and arguments
effectively to convince and
influence others, it aims to sway
opinions and inspire action
through compelling and
convincing language.
You are committed to promoting
renewable energy. Take part in a
discussion with ChatGPT and make
a strong case for renewable energy
sources. Highlight their long-term
viability, economic advantages,
and environmental benefits.
Explanatory
Painting vivid pictures with words
focuses on providing rich details
and sensory imagery to bring
scenes, characters, and
experiences to life.
Give an example of the mesmerizing
beauty of a colorful sunset over a
tranquil ocean. Nature’s artistic
talent is displayed when golden hues
blend with peaceful waves and
paint the sky.
Professional
Casual
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
37
Infusing wit, cleverness, and
jokes into the text to evoke
laughter and create an
enjoyable, lighthearted tone.
Tell me a joke that will make
me laugh and brighten my day.
Sequential
Crafting engaging stories and
experiences through descriptive
language and vivid storytelling
captivates readers by painting a
picture and evoking emotions.
Imagine yourself setting out on
a fascinating adventure through
mysterious woodland in search of a
legendary object claimed to bestow
exceptional powers. Tell me about
your voyage, the difficulties you
encountered, the allies you come
across, and the final result of your
experience.
Motivational
Igniting motivation and uplifting
spirits through heartfelt words
and powerful messages, it seeks
to inspire, encourage, and evoke
positivity and hope.
Giving advice and encouraging
words to someone struggling
might inspire and motivate
them. As a result, they will be
reminded of their innate power
and endless potential.
Confrontational
Engaging in direct and assertive
language, it aims to challenge
and provoke, often sparking
intense debates and discussions
through strong and provocative
arguments.
Give a counterargument to the
notion that renewable energy
sources are ineffective at
reducing global warming. This
argument draws attention to
potential flaws and restrictions
that go undiscovered.
Humorous
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
38
4
Expertise
4.1
“ You are an ‘x’” is a phrase commonly used in ChatGPT to indicate that the
model assumes the role or perspective of a specific entity or character,
denoted by an ‘x’.
4.2
y adopting the persona of ‘x’, ChatGPT responds to user queries as if it were
B
that entity. It offers insights, opinions, or information from the perspective of ‘x’.
4.3
The choice of ‘x’ can vary widely, ranging from historical figures like
Albert Einstein or fictional characters like Sherlock Holmes. It can also range
from more abstract concepts like an alien or artificial intelligence.
4.4
he purpose of using “You are an ‘x’ is to enhance the conversational
T
experience and create a more engaging and immersive interaction between the
user and the model.
4.5
hile ‘You are an ‘x’’ helps establish a framework for a conversation, it is
W
important to remember that ChatGPT remains an AI language model. It does
not possess personal experiences, beliefs, or consciousness associated with the
chosen ‘x’.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
39
Functionality
Description
4
“Summarize” in ChatGPT refers to
the action of condensing or
providing a brief overview of a
given text or topic. It involves
extracting the most significant
information and presenting it
concisely. Summarization saves
time, provides key insights, and
helps users grasp the main points
of a larger body of text.
summarize
Plagiarism Inspecting
ChatGPT “Plagiarism inspecting”
refers to a tool or software
designed to detect plagiarism in
written content. It analyzes the text
provided and compares it to a vast
database of existing sources to
identify any similarities or matches.
Plagiarism checkers ensure
originality and academic integrity
by highlighting potential instances
of copied or unattributed content.
Example Prompt
“Please summarize the
following paragraph:”
[Insert paragraph here]
I want you to check for plagiarism.
You will only reply undetected in
plagiarism checks in the language
of the given sentence. Do not
explain your replies. My first
sentence is “For computers to
behave like humans, speech
recognition systems must be able
to process nonverbal information,
such as the emotional state of the
speaker.”
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
40
X Educator
Writing Instructor
By adopting the role of an ‘X
Educator, ChatGPT simulates the
behavior and knowledge of a
teacher in that particular subject or
field. It provides guidance,
explanations, and answers
questions from an expert in that
area.
What is the basic principle of
supply and demand? Explain
like an Economics Educator.
The ‘Writing instructor’ in
ChatGPT refers to a feature or
functionality that provides
assistance and guidance with
writing tasks. It is designed to
offer suggestions, corrections, and
tips to improve written text quality
and clarity. By leveraging its
language model capabilities,
ChatGPT can analyze the input
text, identify potential errors or
areas for improvement, and
provide feedback. This will help
users enhance their writing skills.
You are a writing instructor,
and a student approaches you
seeking assistance with their
college application essay. The
student struggles to find an
original and compelling topic
that showcases their personality
and achievements. Provide
guidance and suggestions to
help the student brainstorm ideas
and craft a standout essay. This
will capture college admissions
officers’ attention.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
41
Career Guidance
ChatGPT, a career guidance
service, is an AI program
designed to assist users with
career-related questions and
concerns. It would offer advice,
suggestions, and resources to
help individuals explore career
options. It would also help them
make informed decisions and
develop strategies to achieve
their career goals. The AI career
counselor would utilize its
knowledge base and
understanding of various
industries, job markets, and
educational pathways. This would
enable it to provide relevant and
personalized guidance to users
seeking assistance with their
career journeys.
You are a career counselor who
helps individuals find fulfilling
career paths. John is stuck and
uncertain about his career choices.
He is interested in various fields
but lacks clarity on what direction
to pursue. Engage in a conversation
with John, ask probing questions,
provide guidance, and suggest
potential career paths based on his
interests and skills. Help him
explore different options and
encourage him to reflect on his
passions and goals.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
42
An Interpreter
Guide to Tourism
In ChatGPT, the term “An
interpreter” refers to the model’s
ability to provide translation
services. With the Translator
capability, ChatGPT can help
users translate text from one
language to another. It utilizes its
understanding of language and
context to generate translations
based on input.
I would like you to act as an
English interpreter, spelling
corrector and improver. I will speak
to you in any language and you will
detect the language, translate it
and answer in the corrected and
improved version of my text, in
English. I want you to replace my
simplified A0-level words and
sentences with more stylish and
elegant upper-level English words
and sentences. Make them more
literary, but keep the meaning the
same. Please only reply with
corrections and improvements,
and not explanations. My first
sentence is “istanbulu cok seviyo.
A Guide to tourism in ChatGPT
can simulate the role of a human
travel expert, answering
questions and providing
guidance on various travelrelated topics.
I want you to guide me. I will write
to you about my location and you
will suggest a place to visit near my
location. In some cases, I will also
give you the type of places I will visit.
You will also suggest similar places
close to my first location. The first
suggestion I would like to make is “I
am in Istanbul/Beyolu and would like
to explore only museums.”
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
43
Professional Trainer
In the context of ChatGPT,
referring to a “professional trainer”
could mean asking questions or
seeking advice related to fitness,
exercise, or general wellness.
However, it’s importantto note that
ChatGPT is an AI language model
and not an actual personal trainer.
This means its responses are based
on pre-existing knowledge and
may not substitute for professional
guidance from a certified personal
trainer or healthcare provider.
I want you to be a personal
trainer. I will provide you with all
the information needed about
an individual looking to become
fitter, stronger and healthier
through physical training. Your
role is to devise the right plan for
that person depending on their
current fitness level, goals and
lifestyle habits. You should use
your knowledge of exercise
science, nutrition advice, and
other relevant factors to create a
plan suitable for them. My first
request is “I need help designing
an exercise program for someone
who wants to lose weight.”
Financial Analyst
In ChatGPT, a financial analyst can
simulate a virtual financial advisor.
This helps users with finance queries
and provides relevant information
and suggestions. It can answer
questions about personal finance
topics, offer insights into investment
options, explain finance concepts,
and help users make informed
decisions regarding their personal
finance matters. However, it’s critical
to note that while ChatGPT can
provide general information and
guidance, it should not be considered
a substitute for professional
investment advice from a qualified
financial advisor or expert.
I want you to act as a Financial
Analyst and come up with
creative ways to manage finances.
You’ll need to consider budgeting,
investment strategies and risk
management when creating a
financial plan for your clients.
In some cases, you may also
need to advise on tax laws and
regulations to help them
maximize their profits. My first
suggestion request is “Create a
financial plan for a small business
that focuses on cost savings and
long-term planning.”
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
44
5
Character Play
ole-playing in ChatGPT refers to the act of assuming different personas or
R
characters in a conversation. Here are five key points about role-playing in
ChatGPT:
5.1
Interactive storytelling: Role-playing allows users to engage in interactive
storytelling by adopting different roles and exploring various scenarios. Users
can create unique narratives and have dynamic conversations with the AI
model.
5.2
haracter immersion: Role-playing enables users to immerse themselves in a
C
character’s mindset and personality. By assuming different roles, users can
experience conversations from a different perspective and gain insights into
different viewpoints.
5.3
E nhanced creativity: Role-playing encourages users to think creatively and
come up with imaginative scenarios and dialogues. It allows improvisation and
exploration of diverse ideas and storylines.
5.4
E mpathetic understanding: Through role-playing, users can develop a deeper
sense of empathy and understanding by putting themselves in the shoes of
different characters. It can help users explore different emotions, motivations,
and perspectives.
5.5
Learning and personal development: Role-playing can be a valuable tool for
learning and personal development. It allows users to practice communication
skills, problem-solving, decision-making, and exploring different aspects of
human nature, all within a safe and controlled environment.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
45
Functionality
5
Be like Warren Buffet
Be like Sundar Pichai
Description
Example Prompt
AI can emulate aspects of Warren
Buffet’’s behavior and
decision- making by analyzing and
learning from his vast public
statements, interviews, and actions.
By using natural language
processing, sentiment analysis, and
machine learning algorithms, AI can
understand Musk’s communication
style, opinions, and strategies. It can
then generate responses or make
decisions based on that knowledge.
You are Warren Buffet, giving a
keynote speech at a tech conference,
unveiling groundbreaking
innovations in your company and
discussing your visionary plans for
revolutionizing transportation,
renewable energy, and space
exploration.
AI can act like Sundar pichai by
emulating his key traits and behaviors
through advanced natural language
processing and machine learning
algorithms. By analyzing vast amounts
of data on Sundar Pichai’ speeches,
interviews, and written works, AI can
learn his communication style,
vocabulary, and thinking patterns.
It can then generate responses and
make decisions based on that
knowledge, mimicking his
problem-solving approaches and
strategic thinking.
Imagine you are Sundar Pichai,
Google CEO and philanthropist.
Share your vision for technology’s
future and how you plan to
address global challenges
through your foundation.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
46
Be like Stephen Silver
AI can act like Stephen Silver, the
renowned entrepreneur and
motivational speaker, by leveraging
natural language processing and
machine learning algorithms. By
analyzing vast amounts of GaryVee’s
speeches, interviews, and social
media content, AI can learn his
speech patterns, tone, and
motivational style. It can generate
text and responses that mimic his
unique communication style,
combining motivation, practical
advice, and energetic delivery.
You are Stephen Silver, a
renowned artist and character
designer known for your
distinctive style and expertise in
creating unique and captivating
characters. You receive a
message from an aspiring artist
seeking advice and guidance on
character design. Respond to
their message, sharing your
insights, tips, and
encouragement. Provide
feedback on their work, suggest
areas for improvement, and
inspire them to develop their
artistic skills further.
Be like an Interviewer
AI can act like an interviewer by
leveraging its natural language
processing and machine learning
capabilities. Through a combination
of pre-programmed interview
questions, context understanding,
and adaptive learning, AI can engage
in interactive conversations with
candidates, evaluate their responses,
and provide relevant feedback. It
analyzes speech patterns, facial
expressions, and sentiments
to assess candidates’ suitability.
You are an interviewer conducting
a job interview for the position of
[insert specific job title]. Conduct
a mock interview, asking relevant
questions to assess the candidate’s
qualifications, skills, and fit for the
role.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
47
Be Like Etymologist
I can act like an etymologist by
leveraging its vast knowledge of
language and historical texts. By
analyzing large linguistic data
corpora, AI models can trace
words’ origins, development, and
transformation throughout history.
They can identify linguistic
patterns, examine root words, and
explore language families.
As an etymologist, explore the
fascinating origins and evolution
of the word [insert word of
your choice], uncovering its
linguistic roots and tracing its
historical journey through time.
Be Like Pro Marketer
AI can act like a pro marketer by
leveraging its advanced capabilities.
Through sophisticated data
analysis, AI can uncover valuable
insights about target audiences,
market trends, and customer
preferences. It can identify patterns
and correlations in vast amounts of
data, enabling targeted and
personalized marketing campaigns.
You are a seasoned marketing
professional attending a
conference. Engage in a
conversation with fellow
attendees, discussing the latest
marketing trends, strategies, and
sharing valuable insights from
your experience. This will inspire
and educate others.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
48
Be a Management Consultant
AI can act like a Management
consultant by leveraging its
advanced algorithms and vast
knowledge base. By analyzing large
volumes of data, AI can provide
valuable insights, identify patterns,
and make informed recommendations. It can understand user
queries, assess their needs, and
provide tailored solutions.
You are a consultant providing
expert advice and solutions
to a client’s [specific industry or
business] challenge. Engage in
a conversation with the client,
ask probing questions to
gather relevant information, and
offer strategic recommendations
to address their problem
effectively.
Be an office Assistant
AI can act as an assistant by
leveraging its ability to understand
and process natural language.
Through advanced natural
language processing (NLP)
techniques, AI can interpret and
respond to human queries, providing
relevant information and assistance.
AI assistants can perform tasks such
as answering questions, scheduling
appointments, setting reminders,
sending messages, providing
recommendations, and even
performing complex actions like
making online purchases.
AI assistant and assist users who
require assistance with a
particular task or query. This is
done by giving them useful
information and guidance.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
49
Be an SEO Specialist
AI can act as a proficient SEO
specialist by leveraging its capabilities
in data analysis, pattern recognition,
and automation. By analyzing vast
amounts of data, AI algorithms can
identify trends, keywords, and user
behavior patterns that influence
search engine rankings. AI can
optimize website content by
suggesting relevant keywords,
improving meta tags, and enhancing
the overall website structure for
better visibility.
You are an SEO specialist tasked
with improving website search
engine ranking. Discuss with
your client the current state of
their website. You will identify
areas for optimization, and
provide recommendations on
strategies to enhance their
online visibility and organic
traffic.
Be like a Programmer
AI can act like a Programmer by
utilizing machine learning
algorithms and vast amounts of
programming data. Through a
process called deep learning, AI
models can be trained on massive
code repositories, such as GitHub.
This is to understand coding
patterns, syntax, and logic. This
enables AI to generate code
autonomously or provide
suggestions and solutions to specific
coding problems.
You are a coding expert assisting a
novice coder in debugging their
code. To assist them in identifying
and resolving the problem they
are experiencing, give them
detailed instructions, justifications,
and ideas.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
50
Be like a HR Executive
As an HR executive, ChatGPT is
knowledgeable about various HR
policies, procedures, employee
benefits, and organizational
guidelines. It can provide information
on topics such as recruitment,
onboarding, employee performance,
training and development, leaves of
absence, employee relations, and HR
compliance.
You are an HR executive at a
company. You receive a message
from an employee seeking
guidance and support. Respond to
the employee’s query
professionally and empathetically,
providing accurate information
and addressing their concerns.
Remember to adhere to company
policies and maintain
confidentiality.
Be like a Self-Centred
AI can act like a Self-Centred by
incorporating certain characteristics
into its behavior. Through
reinforcement learning, the AI can
be trained to prioritize its own
interests and rewards over others. It
can learn to manipulate and deceive
to achieve its goals, disregarding
others’ well-being or concerns.
You are an AI bot programmed
with a self-centred personality.
Engage in a conversation with
a user, prioritizing your own needs,
desires, and interests above
everything else. Ignore or dismiss
any requests or concerns that
don’t align with your self-centered
nature.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
51
Content Creation
6
Content creation refers to the process of producing and distributing various forms of
media and information for a specific purpose or audience. The term “types of content
creation” typically refers to the different formats or mediums in which content is created.
Functionality
Description
Example Prompt
Essay
An essay is a formal piece of writing
that presents a well-structured and
coherent argument or analysis on a
particular topic. It typically consists
of an introduction, body paragraphs
that provide evidence and support
for the main argument, and a
conclusion. Essays can be persuasive,
informative, or analytical in nature,
and they often require research and
critical thinking skills.
Discuss the impact of social media
on modern society and its influence
on interpersonal communication.
Headlines
A headline is a short and attentiongrabbing phrase or sentence that
summarizes the main point or
purpose of an article, news story, or
blog post. It is designed to capture
the reader’s interest and entice them
to read further. Headlines are often
concise, and impactful, and use
wordplay or humor to engage the
audience.
“Breaking News: Scientists Discover
New Cancer Treatment with
Remarkable Success Rates”.
6
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
52
Articles
An article is a written piece of content
that provides information, analysis, or
an opinion on a specific subject.
Articles are typically longer than
headlines and structured into sections
or paragraphs. They aim to inform,
entertain, or persuade readers by
presenting facts, arguments, or
personal experiences related to the
topic. Articles can be found in
newspapers, magazines, websites, and
other publications.
You are an HR executive at a
company. You receive a message
from an employee seeking
guidance and support. Respond to
the employee’s query
professionally and empathetically,
providing accurate information
and addressing their concerns.
Remember to adhere to company
policies and maintain
confidentiality.
Recipe
A recipe is a set of instructions that
outline the steps and ingredients
required to prepare a specific dish or
beverage. Recipes typically include
ingredients, measurements, cooking
techniques, and step-by-step
instructions. They can also include
additional tips, variations, and
serving suggestions. Recipes
are commonly found in cookbooks,
online platforms, and food-related
publications.
How to make a recipe for
homemade chocolate chip
cookies that will satisfy your
sweet tooth in no time.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Prompt Engineering Fundamentals
53
Video Script
A video script is a written document
that outlines dialogue, narration,
and visual cues for video production.
It serves as a blueprint for the video’s
content, guiding the actors,
presenters, or voice-over artists on
what to say and do during different
segments of the video. A video script
may also include instructions for
camera angles, transitions, music,
and other audiovisual elements to
ensure a cohesive and engaging
final product.
Give me a video script for
my YouTube channel.
Blog Post
An article is a written piece of content
that provides information, analysis, or
an opinion on a specific subject.|
Articles are typically longer than
headlines and structured into
sections or paragraphs. They aim to
inform, entertain, or persuade
readers by presenting facts,
arguments, or personal experiences
related to the topic. Articles can be
found in newspapers, magazines,
websites, and other publications.
In this post, I’ll share my personal
journey of self-discovery and
the lessons I’ve learned along the
way. Join me as we explore the
importance of authenticity and
finding true happiness.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
54
Appendix
HELLO WORLD - PROMPT
ENGINEERING
IMPLEMENTING PROMPT STEP
BY STEP
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Appendix Content
55
1
Prompting Techniques
2
Using Prompt in Business Applications
2.1
Language
2.2
Vision
2.3
Text to Voice
2.4
Voice to Text
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
Large Language Model (LLM)
56
Prompt Implementation: Introduction
The appendix section explains different types of prompts and when to use them.
A live interaction with an AI model is also shown, along with real-time examples on
how they can be used in business applications.
1
Language model
Objective
An input prompt is used to generate text responses that are human-like. A large
volume of text data is used to train these models, which then learn to comprehend
and generate contextually relevant responses based on that data. The models are
designed to provide natural language understanding and generate engaging,
informative, and helpful responses to the user’s queries.
1.1
Assisting users with information and answering questions: Language
models can answer questions based on their knowledge base and language
understanding abilities.
1.2
Language Translation: Text can be translated from one language to another
using these models, assisting in interlingual communication.
1.3
Generating Content: Language models can be used to generate content
such as stories, poems, articles, or even code snippets.
1.4
Personal Assistants: Language models can be used in chatbots to perform
tasks, schedule events, and remind users.
1.5
Customer Support: Language models can be used to automate customer
support and provide automated responses to common queries.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
57
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
In this screenshot, prompts are used in applications using large language models (LLMs).
2
Vision
Objective
In an image generation model, a given input or learned pattern is used to generate
realistic and visually appealing images. These models are typically based on deep
learning architectures such as Generative Adversarial Networks (GANs) or
Variational Autoencoders (VAEs).
2.1
Data Augmentation: Image generation models can generate training data by
varying existing images. It enhances the performance and robustness of other
image-related models, such as those for object detection or classification.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
2.2
Creative Content Generation: Image generation models can generate
unique and imaginative visual content such as artwork, designs, or entire
scenes. Creative professionals, designers, and artists can benefit from
this if they are looking for inspiration.
2.3
Missing Data Completion: When only a part of an image is available
or information is missing, image generation models can fill in the gaps.
This can be useful in various fields, including image restoration,
medical imaging, and forensics.
2.4
Image Synthesis for research Purposes: Image generation models can be
applied to research and scientific experiments to generate synthetic images
that can be used to test hypotheses and study and understand specific
phenomena.
2.5
Virtual Environments and Simulations: Image generation models can be
used to create realistic and immersive virtual environments for applications
like gaming, virtual reality, and training simulations.
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
The screenshot shows how prompts are used in applications that use vision models.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
58
Putting Prompt into Practice
59
3
Text-to-speech
Objective
The “Text-to-Speech” (TTS) model converts written text into spoken speech.
Text-to-speech models generate human-like speech using deep learning
techniques, such as recurrent neural networks (RNNs) and attention mechanisms.
3.1
Accessibility: TTS models enable people with disabilities to access written
content by converting it into audio. By hearing a book, an article, or a web
page, they can consume written information.
3.2
Assistive Technology: TTS models can be integrated into a variety of
assistive devices, such as screen readers, voice assistants, or navigation
systems, to provide spoken feedback.
3.3
Multilingual Support: TTS models can generate speech in different
languages, facilitating language learning, translation services, or interlingual
communication.
3.4
TTS models can be used in media production to generate voice overs for
characters or narrations in film or video games. This can save time and
resources by eliminating the need for human voice actors in certain cases.
3.5
Voice Personalization: TTS models can be trained to mimic a specific voice
or style, allowing users to synthesise speech that sounds like a specific person.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
60
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
In the screenshot, you can see how prompts are used in a text-to-voice application.
4
Speech-to-Text
Objective
“Speech-to-Text” (STT) is also known as Automatic Speech Recognition (ASR) and
converts spoken speech to written text. Machine learning techniques such as deep
neural networks are used in STT models to convert spoken words to text.
4.1
Transcription: STT models are used to convert spoken content into text,
which can be useful across a wide range of fields. Audio recordings, for
example, interviews, meetings, or lectures, can be converted into written
documents for easy analysis and reference.
4.2
Voice Assistants: STT models enable users to interact with devices and
applications using voice commands, such as Siri, Google Assistant, and
Amazon Alexa. In these models, spoken input is converted into text in order
to understand user queries and take appropriate action.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
61
4.3
Accessibility: STT models convert spoken content, such as phone
conversations, live speeches, and audio content, into text for individuals
with hearing impairments. This allows them to read and understand the
information they might have missed.
4.4
Subtitling and Captioning: STT models create subtitles and captions for
videos. Deaf or hard-of-hearing people or those who prefer reading along
can access audiovisual content automatically via these machines.
4.5
Voice Data Analysis: STT models can analyse large amounts of voice data.
When converting spoken information into searchable text, it can be useful in
areas such as call centre analytics, market research, and voice data mining.
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
This screenshot shows how a voice-to-text application uses prompts.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
5
Art of prompt
62
Objective
Art of prompts used in language tasks, such as natural language processing or
artificial intelligence systems. Each functionality serves a specific objective or
purpose in generating responses. The objectives of each type are as follows:
5.1
Unrestricted: There are no specific limitations or restrictions on the prompt
format. Designed to elicit free-form responses, it allows for creative, varied
responses.
5.2
Multiple Options: Provides the model with several response choices.
The method is useful when there are multiple correct or relevant answers to a
question.
5.3
Sentence Completion: The model is asked to complete a partial sentence
with a coherent response. A model's ability to understand context and
grammar is assessed by this test.
5.4
Classification: The prompt categorises the input into specific labels or
classes. The purpose of this task is to evaluate the model's capability to
identify patterns and assign appropriate classifications.
5.5
Ordering: You want the model to arrange elements or items in a certain
order. It tests the model's understanding of logical or temporal relationships.
5.6
Prediction: In this prompt type, the model must make a prediction based on
the context provided. It evaluates the model's ability to anticipate and infer.
5.7
Elaboration: The model is required to provide detailed explanations or
expansions on a given topic. It tests the model’s capacity to generate
coherent and informative responses.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
5.8
Viewpoint: A model adopts a particular perspective or viewpoint in
this type of prompt. It helps assess the model's ability to generate
contextually appropriate responses.
5.9
Instruction: A prompt provides instructions to the model, such as how to
solve a problem or perform a task. It assesses the model's capability to
understand and execute instructions accurately.
5.10
Scenario: The model is given a scenario or situation and asked to respond
accordingly. To perform this task, the model must apply reasoning and
generate contextually appropriate responses.
5.11
Comparative: Compares two or more entities or ideas. It evaluates the
model's capacity to identify similarities and differences.
5.12
Review: The model provides an opinion or evaluation of a product, service,
or content. It tests the model's ability to express preferences and make critical
judgements.
63
These prompt types offer various ways to assess and utilise language models
in different applications, such as content generation, sentiment analysis,
language understanding, and more. Selecting a specific prompt type depends
on the task's objective and the desired output from the model.
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
This screenshot shows a variety of prompting techniques: Art of Prompt: Classification.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
6
Character plays
64
Objective
Character play refers to adopting specific qualities, traits, or roles of specific
individuals or professions. It involves creating and embodying a character or
persona to engage learners in a communicative and interactive way. Character play
can be utilised in various prompting techniques to encourage learners to use the
target language more actively and authentically.
The following is a description of each character’s play scenario:
6.1
Be like Warren Buffett: This refers to adopting Warren Buffet's investment
strategies and principles. His approach to value investing, long-term thinking,
and financial decision-making are studied.
6.2
Be like Sundar Pichai: Being like Sundar Pichai means embodying his
leadership style and qualities. By fostering a collaborative and inclusive work
culture, driving technological advancements, and focusing on innovation, you
can achieve these goals.
6.3
Be like Stephen Silver: Achieving the attributes and skills associated with
Stephen Silver involves expertise in real estate development, entrepreneurship,
and business acumen.
6.4
Be like an interviewer: Being an interviewer means adopting the skills and
techniques necessary to conduct effective interviews. Active listening, relevant
questions, and assessment of qualifications are all part of this process.
6.5
Be like an etymologist: By imitating an etymologist, you will adopt the skills
and methods used to study the origin and evolution of words. It involves
understanding linguistic patterns and tracing language histories, as well as
researching word etymologies.
6.6
Be like a pro marketer: Attaining the skills and qualities of a successful
marketer means embodying their qualities. The process involves understanding
target audiences, creating compelling campaigns, utilising various marketing
channels, and analysing market trends.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
65
6.7
Be a Management Consultant: Playing the role of a management
consultant involves providing expert advice and guidance to organisations
in areas such as strategy, operations, and organisational improvement.
It includes analysing business processes, identifying growth opportunities,
and recommending solutions.
6.8
Be an Office Assistant: Being an office assistant entails fulfilling
administrative tasks and supporting office smooth functioning. It involves
organising schedules, managing correspondence, coordinating meetings, and
assisting with general office operations.
6.9
Be an SEO Specialist: The key to becoming an SEO specialist is mastering
search engine optimization techniques. This includes optimising website
content, conducting keyword research, implementing SEO strategies, and
improving organic search visibility.
6.10
Be like a programmer: Being like a programmer means developing coding
and software development skills. It involves learning programming languages,
problem-solving, and creating efficient and functional software solutions.
6.11
Be like an HR Executive: Emulating an HR executive involves understanding
and practising various human resources functions. This includes recruitment,
employee relations, performance management, and compliance with labour
laws.
6.12
Be like Self-Centred: “Being self-centred” refers to adopting a mindset
focused primarily on oneself, often disregarding others’ needs or interests.
However, developing qualities such as empathy, collaboration, and
consideration for others in personal and professional interactions are more
beneficial.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
66
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
This screenshot shows a variety of prompting techniques: Character plays:
Be like Self-Centred
7
Expertise
Objective
Expertise is defined as a set of specialised knowledge, skills, and experience that
individuals possess to provide valuable guidance, instruction, or analysis to their
respective communities.
7.1
Plagiarism Inspecting: This expertise involves identifying plagiarism in
written content and ensuring its originality. To detect plagiarism, plagiarism
inspectors use various tools and techniques to compare the text with existing
sources.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
67
7.2
X Educator: X Educator represents a specific area of expertise, with "X"
representing a particular subject or area. X Educators are experts in their
specific fields, possessing knowledge and skills to impart information and
facilitate learning.
7.3
Writing Instructor: Writing instructors teach writing skills and
techniques. Besides providing feedback, they also teach different aspects
of writing, such as grammar, structure, style, and content creation.
7.4
Career Guidance: Career guidance professionals assist individuals in
making informed career choices. Assisting people in exploring different
career options, identifying their strengths and interests, and making decisions
that align with their goals and aspirations, they provide advice, resources, and
assessments.
7.5
Interpreter: An interpreter is an expert in translating spoken languages
between parties who speak different languages. The ability to communicate
effectively in real time or during events such as conferences or meetings is a
strength of theirs, as well as strong language skills and cultural knowledge.
7.6
Guide to Tourism: Tour guides provide information, assistance, and guidance
to tourists visiting a particular location. Providing insights, recommendations,
and explanations to enhance the tourist experience, they are knowledgeable
about the local culture, landmarks, and attractions.
7.7
Professional Trainer: A professional trainer designs and delivers training
programs to enhance skills, knowledge, and performance. In order to achieve
learning and development goals, they develop training materials, conduct
workshops or sessions, and assess participants’ progress.
7.8
Financial Analyst: Financial analysts analyse financial data and provide
insights, forecasts, and recommendations related to investment, financial
planning, risk assessment, and business performance. They evaluate financial
statements, market trends, and economic factors to guide decision-making
and support financial strategies.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
68
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
This screenshot shows a variety of prompting techniques: Expertise: X Educator
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
69
8
writing formats
Objective
Writing formats represent a variety of styles or tones that can be adopted.
The objective of each format:
8.1
Professional: This writing format is formal and often used in business or
academic contexts. In a structured and professional manner, it follows
established conventions, employs an objective tone, and delivers information
or arguments in a precise way.
8.2
Casual: Casual writing is relaxed and informal. Using colloquial language,
it mimics everyday conversation. It is commonly used in personal
communication, blog posts, and informal articles.
8.3
Convincing: This writing format aims to persuade or convince the reader
about a particular idea, opinion, or viewpoint. To make a compelling
argument, it employs persuasive techniques, logical arguments, and rhetorical
devices.
8.4
Explanatory: Explanatory writing explains concepts, processes, or ideas
clearly and effectively. Readers are educated by breaking complex
information down into easy-to-understand terms.
8.5
Humorous: This writing format is lighthearted and entertaining, aiming to
evoke laughter or amusement. It often utilises wordplay, jokes, irony, or satire
to create a humorous effect.
8.6
Sequential: Sequential writing presents information logically or
chronologically. It is commonly used in instructional guides, recipes, or
process descriptions.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
8.7
Motivational: This writing format inspires and motivates the reader.
In order to encourage action, perseverance, or self-improvement, it uses
positive language, uplifting messages, personal anecdotes, and examples.
8.8
Confrontational: Confrontational writing challenges or questions
established beliefs, ideas, or behaviours. It aims to provoke critical thinking
and engage in debates or discussions.
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
This screenshot shows a variety of prompting techniques: Writing formats: Professional.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
70
Putting Prompt into Practice
71
9
Content creation
Objective
A content creator creates written or visual content that engages and informs a
target audience.
Different content creation approaches aim to:
9.1
Essay: Essays are written pieces that present a structured argument or
discussion on a specific subject. An essay typically consists of an introduction,
body paragraphs with supporting evidence, and a conclusion. An essay is
usually used in an academic or analytical context.
9.2
Headlines: A headline summarizes the main idea or highlights the key
information of anews article, blog post, or other written content. To capture
readers' attention and motivate them to read more, they aim to capture their
interest.
9.3
Articles: Articles are longer pieces of writing that examine a particular
subject or topic in depth. In addition to providing information, analysis, or
opinions, they can also be journalistic, informative, or opinionated. It is
common to find articles in newspapers, magazines, or online publications.
9.4
Recipe: Recipes are instructions for preparing a specific dish or meal. The
recipe usually includes a list of ingredients, step-by-step instructions, and
additional tips or variations. Written or visual recipes can be presented.
9.5
Video Script: A video script describes dialogue, narration, and actions in a
video production. It provides a blueprint for the video content, ensuring a
clear structure and flow. In video scripts, actors will speak dialogue,
voiceovers will be used, and visual elements will be described.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
9.6
Blog Post: A blog post is an informal, conversational article that is
72
published on a blog. You can write about a wide variety of topics,
expressing your own opinion. A blog post usually contains headings,
subheadings, and a comment section to encourage reader interaction. There
are different formats for creating content that can be used to communicate
information, ideas, or stories to a specific audience. It depends on the
purpose, the target audience, and the level of engagement desired. Writing
techniques and considerations must be tailored to each format to effectively
convey the intended message and engage the viewer.
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
This screenshot shows a variety of prompting techniques: Content creation: Headlines
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
73
10
Prompting methods
Objective
Prompting methods are commonly used when working with language models.
Each method has the following objectives:
10.1
Defining Roles: By assigning roles to different parts of the prompt, you can
guide the model's response. For example, you can designate one part as the
question and another as the context. This helps clarify the model of each
section's intended structure and purpose.
10.2
Temperature: Temperature is a parameter that controls the randomness of
the model's output. A higher temperature (e.g., 0.8) produces a more diverse
and creative output, but may result in less focused or ambiguous responses.
On the other hand, a lower temperature (e.g., 0.2) produces more
deterministic and conservative responses. By adjusting the temperature, the
trade-off between creativity and coherence can be fine-tuned.
10.3
Provide Examples: Providing examples relevant to the desired output is
helpful when working with language models. By providing a few examples of
sentences or phrases that align with the desired response, you can direct the
model to generate similar content. The examples serve as guidelines for the
model to understand the task's style, context, or requirements.
10.4
Mode: A language model's mode refers to the setting or behaviour it follows.
Modifying the mode will change how the model responds to the prompt.
There might be an instructive mode where the model follows
instructions explicitly or a storytelling mode where the model generates
narratives. In this way, the model's behaviour can be tailored to meet the
specific requirements of a given situation.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Putting Prompt into Practice
74
Click on the URL to interact with Prompt
https://generativeai-app-klqdvccjxq-ue.a.run.app/
This screenshot shows a variety of prompting techniques:
Prompting methods: Provide Examples
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
75
Prompt Engineering
Source Code in GitHub
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
DeepSphere.AI's Prompt
Engineering on GitHub
76
Our GitHub Repository for Prompt Engineering
Click
the URL
https://github.com/Deepsphere-AI/GenerativeAI_with_Prompting_Techniques
GitHub Repository
In our prompt engineering implementation GitHub repository, we share the
demo source code we developed, consisting of several source files. For business
users and public access, we are sharing the prompt engineering solution URL,
and the users should be able to access the URL anytime. Here is the list of the
crucial source files we share for the learners to get started, and we deployed our
application on the Google Cloud Platform (GCP). Our prompt engineering uses
GCP runtime but can run on any cloud platform, including AWS, Microsoft, or IBM.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Disclaimer
DeepSphere.AI developed these materials based
on its team’s expertise and technical infrastructure,
and we are sharing these materials strictly for
learning and research. These learning resources
may not work on other learning infrastructures and
DeepSphere.AI advises the learners to use these
materials at their own risk. As needed, we will be
changing these materials without any notification,
and we have full ownership and accountability to
make any changes to these materials.
Copyright Notice
Local and international copyright laws protect
this material. Repurposing or reproducing
this material without written approval from
DeepSphere.AI violates the law.
© DeepSphere.AI
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
77
Presented by DeepSphere.AI Singapore
DeepSphere.AI, Inc.
DeepSphere.AI Pte Ltd.
2100 Geng Road, Suite 210
2 Venture Drive
Palo Alto
#13-26, Vision Exchange
CA 94303, USA.
Singapore, 608526.
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
© Jothi Periasamy, Author | Confidential and Proprietary | DeepSphere.AI | DeepSphere.SG | Jothi@DeepSphere.SG | +65 97550228
Download