0% found this document useful (0 votes)
31 views16 pages

Module 2 - Notes

Module 2 introduces prompt engineering, emphasizing the importance of crafting clear and specific prompts to guide AI models for better outputs. It outlines various techniques such as natural language, system, and conditional prompts, and discusses the evolution of prompt engineering from early chatbots to modern large language models. The module also highlights the future of AI communication and the significance of prompt engineering in ensuring relevance, accuracy, and versatility in AI responses.

Uploaded by

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

Module 2 - Notes

Module 2 introduces prompt engineering, emphasizing the importance of crafting clear and specific prompts to guide AI models for better outputs. It outlines various techniques such as natural language, system, and conditional prompts, and discusses the evolution of prompt engineering from early chatbots to modern large language models. The module also highlights the future of AI communication and the significance of prompt engineering in ensuring relevance, accuracy, and versatility in AI responses.

Uploaded by

ranik1828
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Module 2: Introduction to Prompt

Engineering
Overview of Prompt Engineering:
A prompt is simply the input instruction you give to an AI model. It
can be a question, command, or example that guides the model to
produce the desired response.
Key idea: The better and clearer the prompt, the better the output.
Why is a Prompt Required? Guides the AI: A prompt helps the
AI understand the context and generate a relevant response.
Directs the Output: The quality of the AI's response depends on
how well the prompt is crafted. A good prompt leads to better, more
accurate results.
Contextual Clarity: It ensures the model responds to a specific
task, reducing ambiguity in what is expected.
Example:
[Link] Prompt: "Write a short story about a dragon and a knight who become
friends."
This prompt is clear, specific, and gives the model a clear task, so it can generate a
relevant story.
2. Wrong Prompt: "Tell me about dragons."
This prompt is too vague, and the AI might give a general response about dragons
without focusing on the specific task of creating a story or narrative.
Why Are Prompts Important? Guides the AI: Prompts tell the AI what you
want it to do. Without a clear prompt, the AI might give you something completely
unrelated.
Helps Generate Accurate Results: The more specific and detailed your prompt
is, the more accurate and useful the AI's output will be.
How is Prompt Engineering Useful? Optimizing Output: By crafting better
prompts (known as prompt engineering), we can improve the quality of the AI's
responses.
Control the AI: You can direct the AI to write stories, summarize text, generate
images, and more, based on how well you ask for it.
Simple Example: Bad Prompt: "Tell me about cats." - (Because the prompt is: 1.
Too Vague, 2. Lack of Focus & 3. Can Lead to an Unfocused Answer)
Good Prompt: "Write a fun short story about a cat who travels to the moon.
Instructions Prompt Technique
The Instructions Prompt Technique involves providing specific guidelines to guide
the AI model’s output. This helps ensure that the generated text aligns with the
desired objectives and meets the task’s requirements. This technique ensures that
AI responses are focused and appropriate for the task at hand by giving clear
instructions.
Examples:
Customer Service: Instruction: "Responses should be professional and provide
accurate information."
Result: The AI will generate responses that are formal and factually correct.
Example Prompt: User Query: "How can I reset my password?"
Legal Document: Instruction: "The document should comply with relevant laws
and regulations."
Result: Ensures the document follows legal standards.
Example Prompt: User Query: "Please create a non-disclosure agreement."
Product Review: Instruction: "The review should be unbiased and informative.
“Combined with role prompting (tech expert) and seed-word prompting
(smartphone features), it generates a detailed and balanced review.
Example Prompt: User Query: "Write a product review for the new smartphone."
Combining Techniques: Instructions can be paired with other techniques (like
role prompting or seed-word prompting) to increase the precision and control of
the model’s output.
The Evolution of Prompt Engineering
Year Milestone Description

1966 ELIZA Developed by Joseph Weizenbaum, ELIZA was a


chatbot that used simple pattern-matching to
simulate a conversation, marking the beginning of
prompt-based interaction.
1970 SHRDLU Created by Terry Winograd, SHRDLU was a natural
s language processing system capable of
interpreting commands and reasoning about a
virtual environment.
1990 Mad Hatter Systems like Jabber wacky and ALICE used humor
s Dialogue and open-ended conversations, pushing the
Systems boundaries of natural language interaction.
2000 Template-based Models like Madalyn and Galatea used user input to
s Approaches fill predefined templates, setting the foundation
for structured prompt engineering.
2017 The The introduction of the Transformer architecture
Transformer sparked a revolution in NLP, leading to models
Revolution like GPT-3 and Jurassic-1 Jumbo, which brought
prominence to prompt engineering.
2020 Adjusting and Refinement and fine-tuning of large language
s Refining LLMs models for specific tasks, using techniques like
few-shot learning and conditional generation for
precise control.
Types of Prompt
1. Natural Language Prompts:
These prompts are written in natural human language, making them more
intuitive for developers to interact with the model. The goal is to provide
instructions that mimic human speech, making the communication more natural.
Prompt: "Can you explain how photosynthesis works?"
Output: "Photosynthesis is the process by which plants convert light
energy into chemical energy stored in glucose."
2. System Prompts:
System prompts are pre-written instructions or templates that guide the AI
model on how to respond. These prompts can direct the format, style, or tone of
the output, providing a clear framework for the model to follow.
Prompt: "Write a formal email explaining the delay in project delivery."
Output: "Subject: Project Delivery Delay Dear [Recipient], I regret to
inform you that due to

3. Conditional Prompts:
Conditional prompts involve setting specific conditions or limitations that direct
the model's behaviour based on certain criteria. These conditions can be framed as
logical statements, like "If X, then Y", guiding the model on what to produce in
different scenarios.
Prompt: "If the user asks about weather, provide a weather update. If the
user asks about sports, provide the latest sports news." Input: "What's the
weather like today?"
Output: "The weather today is sunny with a high of 25°C."

How Does Prompt Engineering Work?


Prompt engineering is a systematic process that involves crafting effective
instructions for Large Language Models (LLMs) to get the best output. The
process is iterative, meaning you might need to refine your prompts multiple
times to achieve the desired results.
Steps for Effective Prompt Engineering:
Step 1: Understand the Task Thoroughly
 Goal: Know exactly what you want the LLM to do before crafting the
prompt.
 Questions to ask yourself: What outcome am I expecting? What kind of
answer am I looking for (e.g., creative, factual, instructional)?
 Example: If you want a poem, understand if you need it to be creative or
educational. If you need the model to generate a formal email, the
prompt needs to be task-specific.
Step 2: Use Precise and Simple Language
 Goal: Make sure the LLM understands your prompt clearly.
 Tip: Avoid using technical jargon or overly complex terms. Your language
should be direct and simple.
 Example: Vague Prompt: "Create a response to the user’s inquiry. “Precise
Prompt: "Write a formal email apologizing for a delayed response. “The
second prompt gives clear, understandable directions, leaving no room for
confusion.
Step 3: Add Specific Details.
 Goal: The more detailed the prompt, the better the response.
 Tip: Provide enough context or constraints to guide the model effectively.
Specificity helps the model understand your exact requirements.
 Example: General Prompt: "Write a poem."
 Specific Prompt: "Write a poem about the joy of summer, with imagery of
the beach and sunshine."
 The second prompt gives the LLM more to work with, increasing the chance
of generating a relevant poem.
Step 4: Provide Examples.
 Goal: Help the LLM understand the type of output you're expecting.
 Tip: If possible, provide a sample output that demonstrates the desired style
or format. This helps the model align its output with your expectations.
 Example: Prompt: "Write a summary of the following article in bullet
points."
 Example Output: “Article Summary:
• Discusses the impact of climate change.
• Explores renewable energy solutions."
Providing an example shows the model exactly how you want the summary to
look.
Step 5: Experiment and refine.
Goal: Prompt engineering isn’t perfect from the first try.
Tip: Test different prompts to find the one that works best. Experimentation and
iteration are key to discovering the most effective approach.
Example: If you’re not getting the right answer, try rephrasing the prompt or
adding more context to see if the response improves.

The Role of Prompt Engineering in Communication

The Advantages of Prompt Engineering


The Future of Large Language Model (LLM)
Communication.
 As LLM technology progresses, prompt engineering will continue
to evolve,shaping the way we interact with AI models.
 Ongoing research into adaptive prompts and AI behavior control
will make communication with LLMs more sophisticated and
contextually aware than ever before.
 The future holds exciting possibilities for AI-powered
communication, improving everything from language translation
to creative collaboration.

The Future of Large Language Model (LLM) Communication


*. Prompt Engineering Techniques for ChatGPT
Introduction to Prompt Engineering Techniques Prompt engineering involves
crafting specific instructions (prompts) to guide how an AI model generates
responses.
By providing clear and structured prompts, developers can direct the AI's output to
be relevant, accurate, and high-quality for a wide range of tasks.
Goal: The main goal of prompt engineering is to shape the model's behavior,
ensuring that the responses meet the desired standards and objectives for a given
task.
Key Techniques in Prompt Engineering
Standard Prompts: Simple prompts that directly ask the AI to perform a specific
task.
Role Prompting: The model is given a specific role to play, influencing the tone,
style, or behaviour of the response.
Seed-Word Prompting: The prompt provides a seed word or phrase that the
model should build upon, guiding its response based on that initial cue.
Conditional Prompting: Conditions or limitations are set for the model, such as
"If this, then that".

Why is Prompt Engineering Important?


Relevance: Well-crafted prompts ensure the model produces relevant
responses, making them more aligned with the task's objectives.
Accuracy: Prompt engineering helps the model generate responses that
are factually correct and appropriate for the given context.
Versatility: Different types of prompts can be used to adapt the model’s
output to fit a wide variety of tasks, from casual conversations to formal
reports.
The Future of Prompt Engineering
As AI continues to advance, prompt engineering will become
increasingly important for optimizing language models. Future
developments may involve: Automated prompt generation to streamline
the process. Dynamic prompts that adjust based on user interactions or
context. Contextual awareness in prompts, allowing the AI to respond
more naturally and flexibly.

[Link] Prompt Technique


The Instructions Prompt Technique is a method used to guide the output of natural
language processing models like ChatGPT by providing specific instructions that
the model must follow. This ensures the generated text aligns with the desired
objectives and requirements of the task.
Purpose: Directs the model to produce outputs based on specific guidelines or
criteria.
Customization: Allows for tailoring the model's response to meet particular goals,
such as professionalism, accuracy, or legal compliance.
How It Works:
Step 1: Provide clear instructions to the model. These instructions specify how the
model should approach the task or the style of the output.
Step 2: The model follows these instructions to generate responses that meet the
set criteria.
Zero, One, and Few Shot Prompting
Zero, One, and Few Shot Prompting are techniques in prompt engineering that
help guide AI models, like ChatGPT, to generate responses based on different
amounts of context or examples. These techniques are useful when you want the
model to produce responses with limited information.
a. Zero Shot Prompting
b. One Shot Prompting
c. Few Shots Prompting

1. Zero Shot Prompting The model generates a response without any examples or
context. You simply give a prompt or instruction, and the model uses its pre-
existing knowledge to generate an answer.
Example:
Prompt: "Write a poem about nature."
Output: A poem generated by the model based on its general knowledge.
When to Use: When you want the model to think creatively without any specific
examples. Useful for open-ended tasks or when you want to explore the model’s
generalization abilities.
Limitation: Sometimes results may be less accurate or relevant without context.

2. One Shot Prompting


What It Is: The model generates a response based on one example you provide.
This single example helps guide the model in understanding the context or task.
Example:
Prompt: "Summarize the following paragraph: 'The sun rises in the east and sets
in the west.'"
Output: "The sun moves across the sky from east to west."
When to Use: When you have one clear example but still need the model to
generate a response with some level of accuracy.
Limitation:
If the task is complex, one example might not be enough, and you may need more
examples.
[Link] Shots Prompting The model generates a response based on a few examples
you provide. This gives the model more context and helps it generate more
accurate and relevant responses.
Example: Prompt: *"Write a product review based on these features: Battery
life: 10 hours
Camera: 12 MP
Screen: 6.5 inches"*
Output:
A detailed product review based on the provided features.
When to Use:
When you need more context or examples to help the model generate precise
and relevant responses.
Limitation:
You need to ensure that the examples are relevant and complete to get the best
results.

4 Self-Consistency Prompt
The Self-Consistency Prompt is a sophisticated technique used
in prompt engineering to ensure that the generated text
remains coherent and logically consistent with the information
provided. This technique is particularly useful when you want
the AI model, such as ChatGPT, to adhere to specific facts,
opinions, or constraints throughout a conversation or task.
How It Works: The main aim of the Self-Consistency Prompt is
to maintain coherence and logical consistency in the model's
responses.
Process: You provide the model with a prompt that contains
key information or facts that the model must remain consistent
with during the interaction. This could include background
knowledge, established facts, or constraints that the model
should adhere to while generating text.
Key Features of Self-Consistency
Prompts:
Incorporates Key Information: The prompt includes critical facts, statements,
or context that guide the model to maintain consistency.
Guides Logical Flow: Ensures that the model's responses remain logically
aligned with the established context throughout the conversation.
Balances Detail and Flexibility: While it’s important to provide enough
context, it’s crucial not to over-restrict the prompt, as that could limit the
model's creativity and diversity in responses.
Example:
[Link]: Climate Change
Prompt: “Climate change is driven by human activity, particularly the burning of
fossil fuels. Scientists agree that the Earth's average temperature has risen by 1.1°C
since the late 19th century. Based on this scientific consensus, explain the impact
of rising global temperatures on ecosystems."
Generated Response: The model, guided by the self-consistency prompt, would
provide an answer that aligns with the scientific consensus and remains consistent
with the data about climate change.
Module 2: Prompt Engineering Techniques for ChatGPT
4 Self-Consistency Prompt When to Use Self-Consistency Prompts:
Educational Content: Ensures the information presented is accurate and aligned
with established knowledge, making it useful for creating educational materials.
Technical Discussions: When discussing specialized topics, like engineering or
medicine, where accuracy and adherence to known facts are critical.
Decision-Making: In scenarios where decisions rely on consistent data or logical
reasoning, like business strategies or technical choices.

Module 2: Prompts for Creative Thinking


1. Introduction: In today’s world, creativity is essential for
innovation and problem-solving across various fields. Prompts act
as tools to ignite imagination, spark new ideas, and help
overcome mental blocks.
Types of Prompts: Open-ended questions challenge
conventional thinking. Playful prompts encourage unconventional
associations.
Benefits of Prompts: Help expand imagination and discover
new possibilities. Guide you to connect unrelated ideas and
embrace curiosity.
Practical Strategies: The chapter offers practical exercises that
encourage exploration and creative thinking

2. Unlocking Imagination and Innovation


1. Encourage Brainstorming: Regular sessions to generate and discuss new
ideas.
2. Embrace Failure: View failure as a learning opportunity, not a
setback.
3. Foster Curiosity and Experimentation: Promote a culture where exploration
is encouraged.
[Link]-disciplinary Collaboration: Bring together diverse teams with different
skill sets and perspectives.
[Link] and Inclusion: Ensure diverse voices and viewpoints are included in
the innovation process.
[Link] Learning and Adaptation: Stay updated with emerging trends and
technologies to stay relevant.
[Link] Goal-Setting and Autonomy: Provide employees with freedom and
recognition to pursue creative ideas.
Top 10 Prompts for unlocking imagination and innovation:
[Link] can unlocking creativity lead to breakthrough innovations? This
prompt encourages you to explore how fostering creative thinking can lead to

significant advancements and innovations in your field or industry. Usefulness: It


helps organizations understand that creativity is essential for achieving major
breakthroughs.
2. The impact of a creative mindset on problem-solving and innovation. This
prompt examines how a creative mindset helps overcome challenges and leads to
new solutions.
Usefulness: It highlights that the way we approach problems affects the quality and
novelty of solutions.
[Link] for cultivating a culture of innovation through imagination. This
prompt focuses on methods for creating a work environment where creativity and
imagination are at the forefront of the organization's values. Usefulness: It
provides strategies to build a culture of innovation that encourages new ideas to
flourish.
[Link] role of play and experimentation in stimulating imagination for
innovation. This prompt stresses the importance of play and experimentation in
generating new ideas and innovative thinking. Usefulness: It emphasizes that
taking risks and testing new concepts can stimulate creativity and lead to
innovation.
[Link] a sense of wonder to fuel creative thinking in the workplace. This
prompt suggests ways to bring a sense of curiosity and awe to the workplace to
inspire creative exploration. Usefulness: It encourages leaders to cultivate an
environment where wonder and curiosity drive creative thinking.
6. Can education systems enhance or inhibit imagination and innovation? This
prompt invites discussion on whether traditional education systems foster or limit
creative thinking and innovation. Usefulness: It can lead to conversations about
how education impacts creativity and innovation in the real world.
[Link] embracing failure can foster a culture of innovation through
imagination. This prompt explores how learning from failure and treating it as an
opportunity can enhance innovation and encourage creativity. Usefulness: It helps
organizations understand that failure is not something to avoid, but a learning
experience that fosters innovation.
8. Integrating technology to amplify creative thinking and innovation. This
prompt looks at how technology can enhance and support creative processes and
innovation.
Usefulness: It guides organizations to leverage new technologies that can facilitate
idea generation and problem-solving.
9. The importance of interdisciplinary collaboration in unlocking innovation.
This prompt highlights the value of bringing together people from different
disciplines to create innovative solutions. Usefulness: It encourages collaboration
between teams with diverse backgrounds, leading to new perspectives and ideas.
10. The role of leadership in fostering a culture of imagination and
innovation. This prompt explores how leaders can play a vital role in encouraging
creativity and establishing an innovative culture. Usefulness: It shows that
leadership plays a crucial role in creating an environment where innovation
thrives.
Module 2: Prompts for Effective Writing
Introduction
A prompt for effective writing is a specific instruction, question, or idea that helps
guide the writer in generating creative, focused, and coherent content. Prompts can
serve as a starting point when you’re unsure how to begin writing or need
inspiration. They encourage you to explore different writing styles, overcome
writer's block, and tackle a wide range of topics.
*Types of Writing Prompts:
 Creative Writing Prompts: These prompts encourage imagination and
creativity. They’re perfect for writers working on fiction, poetry, or
storytelling.
 Descriptive Writing Prompts: These focus on developing skills to describe
people, places, or objects in detail.
 Problem-Solving Writing Prompts: These help you tackle challenges or
work through critical thinking in your writing.
 Reflective Writing Prompts: These encourage you to explore your
thoughts, experiences, and feelings.
 Persuasive Writing Prompts: These help you practice convincing readers
of your viewpoint on a particular issue.

Igniting the Writing Process with Prompts


"Igniting the Writing Process with Prompts" is a helpful guide designed to
kickstart your writing journey. It provides creative prompts and practical strategies
to help writers of all levels overcome obstacles like writer's block and improve
their writing skills.
1. Encourages Creativity Prompts inspire new ideas and spark imagination
for writing. They give you a starting point when you don't know where to
begin.
Example:
Prompt: "Write about a character who discovers a hidden door in their
house. “
This prompt gets you thinking about mystery and adventure, helping you
start a story even when you’re stuck.
2. Overcomes Writer's Block If you're struggling to write, prompts help you
break through writer's block by giving you a clear direction for your writing.
Example:
Prompt: "Describe a place where you feel most at peace. “This
prompt helps you focus on writing a peaceful scene, even if you feel stuck with
ideas.
3. Refines Storytelling Skills Prompts help you develop storytelling skills by
encouraging you to think about different characters, settings, and conflicts.
Example:
Prompt: "Write a dialogue between two people who have just met for
the first time. "This prompt helps you focus on creating characters and
conversation, improving your dialogue-writing skills.
4. Enhances Expression Prompts encourage you to express yourself in new
ways, whether you're writing fiction, essays, or poetry.
Example:
Prompt: "Write a poem about a rainy day. “This prompt helps you
explore descriptive language and develop your creative expression.
5. Provides Clear Pathways for Writing Prompts act as guides that lead you
through the writing process, making it easier to organize thoughts and ideas.
Example:
Prompt: "Write an essay arguing why online education is the future. “This
helps you structure your thoughts, guiding you to create a clear argument for
the essay.
6. Builds Confidence By using prompts, writers gain confidence because they
know exactly where to start and can practice regularly.
Example:
Prompt: "Write a letter to your future self. “Writing something
personal like this can make you feel more comfortable with expressing your
thoughts and ideas.
Why These Prompts Are Helpful:
Stimulate Creativity: Help you think of new ideas and ways to approach writing.
Improve Writing: Develop better storytelling, descriptive writing, and
expression.
Build Confidence: Encourage regular practice and creativity, making writing feel
easier.

You might also like