SlideShare a Scribd company logo
Unleashing the Power of Gen AI
Prompt Engineering
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Agenda
In this session, we’ll discuss:
● Introduction to Generative AI and LLMs
● Basics of Prompt Engineering
● Components of a Good Prompt
● How to Write a Prompt?
● Advanced Prompt Strategies
● Common Prompting Errors
● Limitations of Generative Models
● Applications of Prompt Engineering
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Introduction to Generative AI (Gen AI)
Generative AI (Gen AI) refers to Artificial Intelligence that can generate
content — be it text, images, or code — based on the input it receives from
the user.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Understanding Gen AI
LLM
Artificial
Intelligence
Machine
Learning
Deep
Learning
Gen AI
ChatGPT is here
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Introduction to Large Language Models (LLMs)
What are LLMs?
● Large – as it is trained on large amounts of data and billions of trainable parameters.
● Language – as it deals with text data.
● Model – as it predicts the next word/sentence/token.
● LLMs are language models made up of a neural network with billions of parameters that are trained by
self-supervised learning on vast amounts of unlabeled text.
Foundational LLMs like GPT-3
Base LLMs
Task-specific models following
provided directives
Instruction-
based LLMs
LLMs
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Introduction to Large Language Models (LLMs)
How do LLMs work?
Tasks
1. Text Summarization
2. Sentiment Analysis
3. Question Answering
4. Information Extraction
5. Text Translation
Text
Input LLMs
Generative
Models
Pre-training Fine-tuning
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Popular LLMs
GPT by OpenAI Gemini by Google Llama by Meta
Mistral by OpenAI
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Basics of Prompt Engineering
Prompt engineering is as much an art as it is a
science.
Prompt: A detailed set of guidelines given to an
LLM to do a task.
Engineering: Developing a task-specific prompt
iteratively.
Prompt Engineering is an iterative process.
Idea
Test or
Feedback
Prompt
Results
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Basics of Prompt Engineering
Prompts
Parameters
1
Structure
2
1. Temperature: Lower for creativity and deterministic results; Higher for
diversity and factual QA.
2. Top P: Control model determinism; Low for factual, high for diverse.
3. Max Length: Manage response length.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Let’s write a few prompts!!
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Components of a Good Prompt
external information or
Additional context that
can steer the model to
better responses.
Context
The input or question
that we are interested in
finding a response for.
Input Data
A specific task or
instruction you want the
model to perform.
Instruction
The type or format of the
output.
Output Indicator
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Components of a Good Prompt
Context
Act as an analyst working for an OTT platform. You will have to perform
sentiment analysis based on the feedback provided by the consumers on
the movies and series put on the OTT platform.
external information or
Additional context that
can steer the model to
better responses.
Context
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Components of a Good Prompt
Instruction
Classify the feedback as neutral, negative, or
positive, where positive is promotor; negative
means demoter, and neutral means neither
will promote nor demote the content.
external information or
Additional context that
can steer the model to
better responses.
Context
A specific task or
instruction you want the
model to perform.
Instruction
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Components of a Good Prompt
Example
Feedback: I think the series was okay.
Sentiment: Neutral
Feedback: The acting of each character in the
series was awesome.
Sentiment: Positive
Input Data and Output Indicator
Feedback: The storyline for the series was
repetitive and abysmal.
Sentiment:
external information or
Additional context that
can steer the model to
better responses.
Context
The input or question
that we are interested in
finding a response for.
Input Data
A specific task or
instruction you want the
model to perform.
Instruction
The type or format of the
output.
Output Indicator
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Components of a Good Prompt
Example
Feedback: I think the series was okay.
Sentiment: Neutral
Feedback: The acting of each character in the
series was awesome.
Sentiment: Positive
Input Data and Output Indicator
Feedback: The storyline for the series was
repetitive and abysmal.
Sentiment:
Negative
Instruction
Classify the feedback as
neutral, negative, or
positive, where positive is
promotor; negative
means demoter, and
neutral means neither
will promote nor demote
the content.
Context
Act as an analyst
working for an OTT
platform. You will have
to perform sentiment
analysis based on the
feedback provided by
the consumers on the
movies and series put
on the OTT platform.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
How to Write a Good Prompt?
● Define the Goal – Tell ChatGPT what you exactly want it to do.
● Detail out the Format – Specify the format in which you want your output. E.g., tables/paragraphs/lists,
with or without a heading, listed in priority order if any, etc.
● Create a Role – Assign ChatGPT a role to let it process your request from that specific point of view.
E.g., Act as X.
● Clarify who the Audience is – Specify the demographics for ChatGPT to help it tailor its response
appropriately.
● Give Context – Provide every possible information to ChatGPT to help it understand the purpose of
your request.
Here’s a checklist, to create the most effective prompt and get the best results.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
How to Write a Good Prompt?
● Give Examples – Share examples to let ChatGPT learn from it and produce more accurate results.
● Specify the Style – Outline the tone, the communication style, the brand identity and other details in
your prompt for a suitable response.
● Define the Scope – Outlining a scope with further specifications besides giving a context and examples,
will help ChatGPT operate within those parameters.
● Apply Restrictions – Constraints or restrictions applied in your prompt will create the right boundaries
for ChatGPT to produce more relevant responses.
Here’s a checklist, to create the most effective prompt and get the best results.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Different Prompt Patterns
What are some of the most common Prompt Patterns?
1. Persona Pattern - Act as X. Do the task Y. (E.g., As a Yoga instructor, create a beginner-friendly routine for joint
mobility.)
2. Audience Persona Pattern - Explain X to me. Assume I’m Y. (E.g., Explain the importance of eating greens. Assume
I’m a skeptical child.)
3. Visualization Generator Pattern - Generate X that can be provided to tool Y for visualization. (E.g., While talking
about the data around user engagement metrics on certain website, generate a CSV that I can use in Tableau to
create a visualization.)
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Different Prompt Patterns
4. Recipe Pattern - In order to do X, I need to perform steps a, b, c. Provide a complete sequence of steps for me
while filling in any missing steps and removing redundant steps. (Eg: I want to travel from Bangalore to Darjeeling. I
know I have to take a flight to Kolkata. And from there take train and a cab to Darjeeling. Complete the itinerary
for me)
5. Template Pattern - I will provide a template, with placeholders for content. Fit the output with one or more
placeholders that I list.
Eg: Generate a day-wise travel itinerary for visiting Paris.
My placeholders are -
❏ <Day> for the day of the travel plan
❏ <Location> for the place to visit
❏ <Activity> for what to do in that place
❏ <Time> for the best part of the day to visit
Template: For <Day> visit <Location> at <Time> for <Activity>
What are some of the most common Prompt Patterns?
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Examples
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Advanced Prompt Strategies
● Zero-Shot Learning - Directly instructing the model to perform a task without any additional examples.
● Few-Shot Learning – Teaching with examples in the prompt.
● Chain of Thought Process – Asking to show its work or thought process.
Here’s a few instances of advanced prompt strategies:
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Common Prompting Errors
1. Vague or Ambiguous Prompts
2. Biased Prompts
3. Lack of Contextual Information
4. Insufficient Examples or Training Data
5. Complex or Confusing Prompts
6. Not testing prompts thoroughly
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Limitations of Generative Models
1. Hallucinations - produce imaginative and surreal responses
2. Token length - tokens available 4096 tokens for input & 2048 for output
3. Pricing - for better versions / increase in token size
4. Resource Intensive - computationally expensive and resource-intensive
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Applications of Prompt Engineering
Content
Generation
Data Analysis and
Science
Code Generation
and Software
Development
Research and
Information
Retrieval
Customer Support
and Engagement
- Automating Code Writing
- Debugging Assistance
- Documentation Generation
- Text Summarization
- Question Answering
- Chatbots and Virtual
Assistants
- Instructional Guides
- Copywriting and Advertising
- Creative Writing
- Educational Content
- Data Cleaning and
Preparation
- Statistical Analysis and
Visualization
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Applications of Prompt Engineering
Machine
Translation
Other
Domains
Sentiment
Analysis
- Consumer Feedback Analysis
- Brand Management
- Marketing
- Information Sharing
- Internal Communication
- Healthcare
- Manufacturing
- Security
- Retail and Shopping
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
Summary
Here’s a brief recap:
● The key to becoming a proficient prompt engineer is practice.
○ Experiment with different prompts.
○ Analyze the outcomes.
○ Refine your techniques.
● Keep practicing, stay curious, and explore various AI platforms to enhance your skills.
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.

More Related Content

Similar to Promt software engineer rEngineering.pdf

ChatGPT in HPE
ChatGPT in HPE ChatGPT in HPE
ChatGPT in HPE
Vaikunthan Rajaratnam
 
Prompt Engineering Guide.pptx
Prompt Engineering Guide.pptxPrompt Engineering Guide.pptx
Prompt Engineering Guide.pptx
AmitSherewat
 
Google Interview Prep Guide Software Engineer
Google Interview Prep Guide Software EngineerGoogle Interview Prep Guide Software Engineer
Google Interview Prep Guide Software Engineer
Lewis Lin 🦊
 
Bootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptxBootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptx
Object Automation
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
Object Automation
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
Object Automation
 
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Xavier Amatriain
 
ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...
ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...
ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...
AgileNetwork
 
Testers in an agile world
Testers in an agile worldTesters in an agile world
Testers in an agile world
Ilan Kirschenbaum
 
Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...
Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...
Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...
Intellipaat
 
Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...
Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...
Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...
Author Tushar Sheth
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
 
SOP Presentation.pdf
SOP Presentation.pdfSOP Presentation.pdf
SOP Presentation.pdf
LovishChopra10
 
Unleashing The Power Of CHAT-GPT
Unleashing The Power Of CHAT-GPTUnleashing The Power Of CHAT-GPT
Unleashing The Power Of CHAT-GPT
Demetris D-Papa
 
3685807
36858073685807
3685807
nazeer pasha
 
Software Development in the Brave New world
Software Development in the Brave New worldSoftware Development in the Brave New world
Software Development in the Brave New world
David Leip
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
Anand Ramdeo
 
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
Sri Ambati
 
Agile Network India | Agility Day @Noida | Enterprise agility through enginee...
Agile Network India | Agility Day @Noida | Enterprise agility through enginee...Agile Network India | Agility Day @Noida | Enterprise agility through enginee...
Agile Network India | Agility Day @Noida | Enterprise agility through enginee...
AgileNetwork
 
Content Atomization with LLMs - Ginger Shimp
Content Atomization with LLMs - Ginger ShimpContent Atomization with LLMs - Ginger Shimp

Similar to Promt software engineer rEngineering.pdf (20)

ChatGPT in HPE
ChatGPT in HPE ChatGPT in HPE
ChatGPT in HPE
 
Prompt Engineering Guide.pptx
Prompt Engineering Guide.pptxPrompt Engineering Guide.pptx
Prompt Engineering Guide.pptx
 
Google Interview Prep Guide Software Engineer
Google Interview Prep Guide Software EngineerGoogle Interview Prep Guide Software Engineer
Google Interview Prep Guide Software Engineer
 
Bootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptxBootcamp_AIAppsUCSD.pptx
Bootcamp_AIAppsUCSD.pptx
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
 
Bootcamp_AIApps.pdf
Bootcamp_AIApps.pdfBootcamp_AIApps.pdf
Bootcamp_AIApps.pdf
 
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
Recsys 2016 tutorial: Lessons learned from building real-life recommender sys...
 
ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...
ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...
ANIn Hyderabad Nov2023|Generative AI for software engineering - Lakshman Peet...
 
Testers in an agile world
Testers in an agile worldTesters in an agile world
Testers in an agile world
 
Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...
Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...
Data Science Engineer Resume | Data Scientist Resume | Data Science Resume Ti...
 
Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...
Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...
Mastering Chatgpt The Ultimate Guide To Prompt Engineering For Beginners 2024...
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
SOP Presentation.pdf
SOP Presentation.pdfSOP Presentation.pdf
SOP Presentation.pdf
 
Unleashing The Power Of CHAT-GPT
Unleashing The Power Of CHAT-GPTUnleashing The Power Of CHAT-GPT
Unleashing The Power Of CHAT-GPT
 
3685807
36858073685807
3685807
 
Software Development in the Brave New world
Software Development in the Brave New worldSoftware Development in the Brave New world
Software Development in the Brave New world
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
Practitioner's Guide to LLMs: Exploring Use Cases and a Glimpse Beyond Curren...
 
Agile Network India | Agility Day @Noida | Enterprise agility through enginee...
Agile Network India | Agility Day @Noida | Enterprise agility through enginee...Agile Network India | Agility Day @Noida | Enterprise agility through enginee...
Agile Network India | Agility Day @Noida | Enterprise agility through enginee...
 
Content Atomization with LLMs - Ginger Shimp
Content Atomization with LLMs - Ginger ShimpContent Atomization with LLMs - Ginger Shimp
Content Atomization with LLMs - Ginger Shimp
 

Promt software engineer rEngineering.pdf

  • 1. Unleashing the Power of Gen AI Prompt Engineering Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 2. Agenda In this session, we’ll discuss: ● Introduction to Generative AI and LLMs ● Basics of Prompt Engineering ● Components of a Good Prompt ● How to Write a Prompt? ● Advanced Prompt Strategies ● Common Prompting Errors ● Limitations of Generative Models ● Applications of Prompt Engineering Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 3. Introduction to Generative AI (Gen AI) Generative AI (Gen AI) refers to Artificial Intelligence that can generate content — be it text, images, or code — based on the input it receives from the user. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 4. Understanding Gen AI LLM Artificial Intelligence Machine Learning Deep Learning Gen AI ChatGPT is here Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 5. Introduction to Large Language Models (LLMs) What are LLMs? ● Large – as it is trained on large amounts of data and billions of trainable parameters. ● Language – as it deals with text data. ● Model – as it predicts the next word/sentence/token. ● LLMs are language models made up of a neural network with billions of parameters that are trained by self-supervised learning on vast amounts of unlabeled text. Foundational LLMs like GPT-3 Base LLMs Task-specific models following provided directives Instruction- based LLMs LLMs Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 6. Introduction to Large Language Models (LLMs) How do LLMs work? Tasks 1. Text Summarization 2. Sentiment Analysis 3. Question Answering 4. Information Extraction 5. Text Translation Text Input LLMs Generative Models Pre-training Fine-tuning Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 7. Popular LLMs GPT by OpenAI Gemini by Google Llama by Meta Mistral by OpenAI Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 8. Basics of Prompt Engineering Prompt engineering is as much an art as it is a science. Prompt: A detailed set of guidelines given to an LLM to do a task. Engineering: Developing a task-specific prompt iteratively. Prompt Engineering is an iterative process. Idea Test or Feedback Prompt Results Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 9. Basics of Prompt Engineering Prompts Parameters 1 Structure 2 1. Temperature: Lower for creativity and deterministic results; Higher for diversity and factual QA. 2. Top P: Control model determinism; Low for factual, high for diverse. 3. Max Length: Manage response length. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 10. Let’s write a few prompts!! Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 11. Components of a Good Prompt external information or Additional context that can steer the model to better responses. Context The input or question that we are interested in finding a response for. Input Data A specific task or instruction you want the model to perform. Instruction The type or format of the output. Output Indicator Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 12. Components of a Good Prompt Context Act as an analyst working for an OTT platform. You will have to perform sentiment analysis based on the feedback provided by the consumers on the movies and series put on the OTT platform. external information or Additional context that can steer the model to better responses. Context Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 13. Components of a Good Prompt Instruction Classify the feedback as neutral, negative, or positive, where positive is promotor; negative means demoter, and neutral means neither will promote nor demote the content. external information or Additional context that can steer the model to better responses. Context A specific task or instruction you want the model to perform. Instruction Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 14. Components of a Good Prompt Example Feedback: I think the series was okay. Sentiment: Neutral Feedback: The acting of each character in the series was awesome. Sentiment: Positive Input Data and Output Indicator Feedback: The storyline for the series was repetitive and abysmal. Sentiment: external information or Additional context that can steer the model to better responses. Context The input or question that we are interested in finding a response for. Input Data A specific task or instruction you want the model to perform. Instruction The type or format of the output. Output Indicator Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 15. Components of a Good Prompt Example Feedback: I think the series was okay. Sentiment: Neutral Feedback: The acting of each character in the series was awesome. Sentiment: Positive Input Data and Output Indicator Feedback: The storyline for the series was repetitive and abysmal. Sentiment: Negative Instruction Classify the feedback as neutral, negative, or positive, where positive is promotor; negative means demoter, and neutral means neither will promote nor demote the content. Context Act as an analyst working for an OTT platform. You will have to perform sentiment analysis based on the feedback provided by the consumers on the movies and series put on the OTT platform. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 16. How to Write a Good Prompt? ● Define the Goal – Tell ChatGPT what you exactly want it to do. ● Detail out the Format – Specify the format in which you want your output. E.g., tables/paragraphs/lists, with or without a heading, listed in priority order if any, etc. ● Create a Role – Assign ChatGPT a role to let it process your request from that specific point of view. E.g., Act as X. ● Clarify who the Audience is – Specify the demographics for ChatGPT to help it tailor its response appropriately. ● Give Context – Provide every possible information to ChatGPT to help it understand the purpose of your request. Here’s a checklist, to create the most effective prompt and get the best results. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 17. How to Write a Good Prompt? ● Give Examples – Share examples to let ChatGPT learn from it and produce more accurate results. ● Specify the Style – Outline the tone, the communication style, the brand identity and other details in your prompt for a suitable response. ● Define the Scope – Outlining a scope with further specifications besides giving a context and examples, will help ChatGPT operate within those parameters. ● Apply Restrictions – Constraints or restrictions applied in your prompt will create the right boundaries for ChatGPT to produce more relevant responses. Here’s a checklist, to create the most effective prompt and get the best results. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 18. Different Prompt Patterns What are some of the most common Prompt Patterns? 1. Persona Pattern - Act as X. Do the task Y. (E.g., As a Yoga instructor, create a beginner-friendly routine for joint mobility.) 2. Audience Persona Pattern - Explain X to me. Assume I’m Y. (E.g., Explain the importance of eating greens. Assume I’m a skeptical child.) 3. Visualization Generator Pattern - Generate X that can be provided to tool Y for visualization. (E.g., While talking about the data around user engagement metrics on certain website, generate a CSV that I can use in Tableau to create a visualization.) Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 19. Different Prompt Patterns 4. Recipe Pattern - In order to do X, I need to perform steps a, b, c. Provide a complete sequence of steps for me while filling in any missing steps and removing redundant steps. (Eg: I want to travel from Bangalore to Darjeeling. I know I have to take a flight to Kolkata. And from there take train and a cab to Darjeeling. Complete the itinerary for me) 5. Template Pattern - I will provide a template, with placeholders for content. Fit the output with one or more placeholders that I list. Eg: Generate a day-wise travel itinerary for visiting Paris. My placeholders are - ❏ <Day> for the day of the travel plan ❏ <Location> for the place to visit ❏ <Activity> for what to do in that place ❏ <Time> for the best part of the day to visit Template: For <Day> visit <Location> at <Time> for <Activity> What are some of the most common Prompt Patterns? Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 20. Examples Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 21. Advanced Prompt Strategies ● Zero-Shot Learning - Directly instructing the model to perform a task without any additional examples. ● Few-Shot Learning – Teaching with examples in the prompt. ● Chain of Thought Process – Asking to show its work or thought process. Here’s a few instances of advanced prompt strategies: Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 22. Common Prompting Errors 1. Vague or Ambiguous Prompts 2. Biased Prompts 3. Lack of Contextual Information 4. Insufficient Examples or Training Data 5. Complex or Confusing Prompts 6. Not testing prompts thoroughly Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 23. Limitations of Generative Models 1. Hallucinations - produce imaginative and surreal responses 2. Token length - tokens available 4096 tokens for input & 2048 for output 3. Pricing - for better versions / increase in token size 4. Resource Intensive - computationally expensive and resource-intensive Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 24. Applications of Prompt Engineering Content Generation Data Analysis and Science Code Generation and Software Development Research and Information Retrieval Customer Support and Engagement - Automating Code Writing - Debugging Assistance - Documentation Generation - Text Summarization - Question Answering - Chatbots and Virtual Assistants - Instructional Guides - Copywriting and Advertising - Creative Writing - Educational Content - Data Cleaning and Preparation - Statistical Analysis and Visualization Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 25. Applications of Prompt Engineering Machine Translation Other Domains Sentiment Analysis - Consumer Feedback Analysis - Brand Management - Marketing - Information Sharing - Internal Communication - Healthcare - Manufacturing - Security - Retail and Shopping Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.
  • 26. Summary Here’s a brief recap: ● The key to becoming a proficient prompt engineer is practice. ○ Experiment with different prompts. ○ Analyze the outcomes. ○ Refine your techniques. ● Keep practicing, stay curious, and explore various AI platforms to enhance your skills. Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited.