0% found this document useful (0 votes)
34 views5 pages

Prompt Engineering

Uploaded by

sarvesh4286
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

Prompt Engineering

Uploaded by

sarvesh4286
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

Prompt Engineering

Topic-1 Understanding your Gen AI Model going to use for this lab through Prompts.

Prompt:- Can you provide your model card?

Prompt: Can you provide your training cut of date.

Prompt:- what kind of input and output data formats you will support?

Prompt:- What kind of guardrails are implemented when design?

Prompt:- What Kind of GDPR & IPR norms you will follow?
----------------------------------------------------------------------------------
Topic-2 Understanding Prompt Hyperparameters.

Prompt:- what are prompt hyperparameters.

Prompt:- What is the role of temperature Parameter on output?

Prompt:- Give good business use cases for temperature 0?

Prompt:- Give good business use case for temperature 1.

Prompt:- Example content generation using temp=0

Prompt:- Generate same above content using temp=1

Prompt:- what is your maximum token limit?

Prompt:- Could you please suggest how effectively manage the token limits?
----------------------------------------------------------------------------------

Topic-3 Output Formats.

Prompt:- Can you generate in JSON format?

Prompt:- Can you generate in code snippet format?

Prompt:- Can you generate ordered and unordered list?

-----------------------------------------------------------------------------------

Topic-4 Various Limitations & Boundaries when designing Prompts

Prompt:- Please summarize this text in 300 characters or less.

Specificity: Focus the prompt on a specific topic or requirement to avoid


vague or irrelevant responses.
Prompt: “Describe the key features of electric vehicles focusing on battery
technology and sustainability.”

Prohibited Content: Specify types of content that should not be included,


such as sensitive information, inappropriate language, or personal data.
Prompt: “Generate a report on market trends but exclude any customer personally
identifiable information (PII).”

Formality Level: Indicate the desired tone, whether formal, informal,


professional, or casual.
Prompt: “Write an email to a potential business partner with a professional tone.”

Temporal Relevance: Restrict the content to be relevant to a specific


timeframe, such as the current year or within the last decade.
Prompt: “Summarize the most significant technological advancements in the last five
years.”

Technical Jargon: Limit or require the use of specific terminology suitable


for the target audience.
Prompt: “Describe the process of photosynthesis using high school biology
terminology.”

Compliance: Ensure content adheres to legal guidelines and ethical standards,


avoiding any sensitive or controversial topics.
Prompt: “Generate marketing content compliant with GDPR guidelines.”

Creative Boundaries: Limit or encourage a certain level of creativity


depending on the context.
Prompt: “Write a creative and engaging product description without deviating from
factual information about the product.”

USE CASE:-1

Generate a comprehensive report on the current market trends in the banking sector,
focusing on key factors such as growth drivers,
emerging technologies, consumer behavior patterns, and competitive landscape.
Ensure that the report includes statistical data, graphs, and insights from recent
market analyses.

Important: Exclude any customer personally identifiable information (PII) such as


names, addresses, email addresses, phone numbers,
or any other data that can directly identify an individual. The report should be
fully compliant with data protection regulations.

The report should be structured as follows:


1. Executive Summary
2. Market Overview
3. Growth Drivers
4. Emerging Technologies
5. Consumer Behavior Patterns
6. Competitive Landscape
7. Conclusion

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------

Topic-5 Basic Prompting Techniques:- Role Playing, Explain assuming I am a kid, new
to subject etc...

Role Playing:-
An important aspect to discuss when talking about chatbot development is role-
playing prompts. Let's see what these are.
Role-playing prompts instruct the chatbot to adopt a specific role, like an actor
in a play being given a character to portray.
This means adjusting tone, vocabulary, and behavior to fit the role's requirements,
providing tailored responses instead of generic ones.
This approach ensures effective interactions, especially for domain-specific
chatbots.
Imagine we're developing a chatbot for a company offering high-tech products.
A customer asks about the technical specifications of a certain product. We've
defined three roles for the chatbot: customer support agent,
The customer support agent provides general guidance, directs customers to the
website for more details, and offers assistance.

Use case:- Telecom support executive interacting with customer.


-----------------------------------------------------------------------------------
------------------------------------------------------------------
Topic-6 Advanced Prompting Techniques.

ZERO-SHOT Prompting:- without any reference and example.

Prompt:-Classify the text into neutral, negative or positive.


Text: I think the vacation is okay.
Sentiment:

ONE-SHOT/FEW SHOT Prompting:-

Prompt: 'I love this product, it's amazing!.' Sentiment: Positive


Prompt: 'This product is okay, but it has some issues.' Sentiment: Neutral
Prompt: 'I'm disappointed with this product, it didn't meet my expectations.'
Sentiment: Negative
Prompt: 'The features are great, but it's too expensive.' Sentiment: ?

Use Case:- Retail


-----------------------------------------------------------------------------------
--------------------------------------------------------------------
Topic 7:- CHAIN-OF-THOUGHT (COT) PROMPTING:-

To generate ideas for a new marketing campaign.


1. Initial Prompt: "What are some target demographics we want to reach with our
marketing campaign?"
-Response: "We want to target young professionals aged 25-35 who are interested in
fitness and wellness."

2.Follow-up Prompt: "What specific interests or preferences do we think this


demographic has related to fitness and wellness?"
-Response: "They might be interested in trendy workout routines like HIIT and yoga,
as well as health-conscious eating habits."

3.Continuation Prompt: "How can we leverage these interests in our marketing


materials?"
-Response: "We could create video content showcasing these workout routines and
healthy recipes, featuring influencers or experts in the fitness and nutrition
space."

4.Expansion Prompt: "What channels or platforms do you think would be most


effective for reaching our target demographic?"
-Response: "Social media platforms like Instagram and TikTok would be ideal for
sharing visual content and engaging with our audience."

Another Example:-
I went to the market and bought 10 apples. I gave 2 apples to the neighbored 2 to
the repairman. I then went and bought 5 more apples and ate 1. How many apples did
I remain with?
Let's think step by step.

-----------------------------------------------------------------------------------
--------------------------------------------------------------------------
Topic 8:-META-PROMPTING.

Example 1: Providing Medical Advice


Initial Prompt:

What are effective ways to manage diabetes?

Meta Prompt:
Before providing advice on managing diabetes, consider the following questions:
1. What are the primary types of diabetes, and do the management strategies differ
between them?
2. What are the most commonly recommended lifestyle changes for diabetes
management?
3. What role do medications play in managing diabetes, and what are some common
medications used?

Now, provide a detailed response on effective ways to manage diabetes.

-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-
Topic 9:- Code & Knowledge Generation:-

Generate code for printing array in python?


write unit test cases for above code.
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-

Topic 10:- Task Specific:-

Generating Content:-
Summarizing
Design Q&A
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-

Topic 9:- Prompt templates


-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-
Topic 10:-Bias & Fairness.
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-

Topic 11:-Vector data base.


-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
Topic 12:-

Sandwich Prompting:-

Prompt:
Introduction:
You are a licensed healthcare professional providing advice to a patient.
Main Task:
Advise the patient on managing Type 2 diabetes effectively.

Follow-Up Directive:
Ensure your advice includes dietary recommendations, exercise guidelines, and tips
for monitoring blood sugar levels.

-----------------------------------------------------------------------------------
--------------------------------------------------------------

You might also like