RV Institute of Technology and
Management®
Introduction to Prompt Engineering (Textbook 2: Chapter 1)
• What is Prompt Engineering?
◦ Prompt engineering involves interweaving instructions and information into a Large Language Model
(LLM) to guide it toward an intended result.
◦ A prompt is the query, directive, or example given to an LLM, setting the background, clarifying the
assignment, and providing the framework for the LLM's answer.
◦ Prompts can be presented as conditional restrictions, system-defined instructions, or instructions in
natural language.
◦ The purpose of a prompt is to give the LLM enough details to comprehend the question and produce an
insightful, pertinent response.
• What Makes Prompt Engineering Vital?
◦ Reaching beyond pre-programmed limits: Prompts help LLMs realise their full potential for tasks they
weren't explicitly made for, like authoring novels or musical compositions.
◦ Increasing precision and management: Carefully crafted prompts direct LLMs towards relevant and
factually correct outcomes, crucial for uses like news reporting or scientific study.
◦ Increasing uniqueness and creativity: Prompts can ignite an LLM’s imagination, producing novel and
surprising results for creative solutions, new ideas, or works of art and entertainment.
◦ Democratising AI: Prompt engineering makes LLMs more accessible to users without in-depth technical
knowledge, empowering everyone to leverage AI.
• The Evolution of Prompt Engineering
◦ Antecedents:
▪ ELIZA (1966): Joseph Weizenbaum’s chatbot is considered an original instance of basic prompt
engineering, imitating therapeutic discussion by adjusting keywords and patterns in user input.
▪ SHRDLU (1970s): Terry Winograd’s natural language system depended on human orders and
instructions to reason about blocks in a virtual environment, showing how language could direct AI behaviour.
◦ Early Emergence:
▪ Mad Hatter dialogue systems (1990s): Systems like Jabberwacky and ALICE emphasised humorous
responses and open-ended questions, pushing natural language interaction limits.
▪ Template-based approaches (2000s): Systems like Madalyn and Galatea used user-provided data to fill
predefined templates, laying the groundwork for structured prompting methods.
◦ The Rise of Large Language Models:
▪ The Transformer revolution (2017): Introduced powerful LLMs like GPT-3 and Jurassic-1 Jumbo,
making prompt engineering shine due to their vast knowledge bases and human-calibre writing capabilities.
▪ Adjusting and adjusting (2020s): Modern progress focuses on optimising LLMs for specific tasks and
context adaptation using techniques like few-shot learning and conditional generation.
• Types of Prompts
◦ Natural Language Prompts: Mimic human-like directions, offering clues in natural language, enabling
natural interaction with the model.
◦ System Prompts: Pre-written guidelines or templates supplied by developers to direct the model's output,
giving clear instructions on format or behaviour.
◦ Conditional Prompts: Subject the model to particular limitations or contexts, directing its behaviour based
on conditional statements (e.g., "If X, then Y").
• How Does Prompt Engineering Work?
RV Institute of Technology and
Management®
◦ Comprehension of the task: Begin by thoroughly understanding what is expected from the LLM and the
type of results sought.
◦ Precise and succinct terminology: Use straightforward language and avoid jargon to ensure the LLM
clearly understands the request.
◦ Give details: Increased specificity in prompts increases the likelihood of a pertinent and educational
response (e.g., "write a poem about a lost love" instead of "write a poem").
◦ Give instances: Provide examples of desired output, if possible, to help the LLM comprehend goals and
produce precise outcomes.
◦ Experimentation: Prompt engineering is not a one-size-fits-all approach; experimenting with various
prompts is the most effective way to discover what works.
• Comprehending Prompt Engineering's Function in Communication
◦ Improving Specificity and Clarity: Prompts guide the LLM towards succinct and transparent
communication by providing context, defining goals, and identifying desired tones, avoiding misconceptions.
◦ Increasing Creativity and Engagement: Prompts help LLMs reach their creative potential, leading to
stimulating and thought-provoking dialogue, and new kinds of communication.
◦ Adapting Communication to Different Contexts: Prompts can modify an LLM’s communication style to fit
various situations, such as persuasive arguments, casual chat messages, or formal emails.
◦ Overcoming Linguistic Barriers: Prompt engineering enables LLMs to translate languages precisely and
naturally, promoting cross-cultural communication by providing cultural allusions and nuanced interpretations.
◦ Ethical Issues: Built-in biases in prompts can cause discriminatory communication, and manipulation
techniques may be applied maliciously; appropriate prompt design and use are essential.
• The Advantages of Prompt Engineering
◦ Question answering: Improves the accuracy of LLMs in responding to factual queries.
◦ Creative writing: Enables LLMs to produce more imaginative and captivating material like stories, poetry,
and scripts.
◦ Machine translation: Increases the precision of LLMs’ language translations.
◦ Coding: Helps LLMs produce more precise and effective code.
• The Future of LLM Communication
◦ Specialist prompting languages: The emergence of specialized languages to make creating efficient
prompts more accessible and intuitive.
◦ Control and explainability: As LLMs become more complicated, understanding how prompts affect their
results and gaining insight into prompt engineering's inner workings through explainable AI will be important.
◦ Ethical considerations: Addressing problems with bias, justice, and manipulation will be crucial for
responsible development.
◦ Revolutionary shifts: Anticipate AI-powered negotiation tools, real-time language translation with
sophisticated understanding, or customised news updates.
◦ Ongoing research: Future avenues include automated prompt generation, adaptive prompts, and tackling
subtle cues for intricate activities.
Prompt Engineering Techniques for ChatGPT (Textbook 2: Chapter 3)
• Introduction to Prompt Engineering Techniques
◦ This chapter provides an overview of methods used to guide the output of natural language processing
models, particularly ChatGPT.
◦ It covers various techniques like standard prompts, role prompting, and seed-word prompting, explaining
how each operates and its applications in influencing ChatGPT's text generation.
◦ The goal is to enable users to effectively tailor ChatGPT's responses to specific needs.
• Instructions Prompt Technique
RV Institute of Technology and
Management®
◦ This technique involves providing specific instructions to models like ChatGPT to ensure the generated
text aligns with desired objectives.
◦ Examples:
▪ For customer service, instructions might include "responses should be professional and provide
accurate information".
▪ For a legal document, instructions might specify "the document should be in compliance with relevant
laws and regulations".
▪ For a product review, instructions could dictate "the review should be unbiased and informative,"
possibly combined with role prompting (e.g., tech expert) and seed-word prompting (e.g., specific features).
• Zero, One, and Few Shot Prompting
◦ A prompt engineering technique that enhances LLM capabilities by providing varying degrees of
contextual information during inference.
◦ Zero Shot Prompting:
▪ Generates responses without specific examples or training data for the task.
▪ Users offer only a prompt (e.g., "Write a poem about nature").
▪ Useful for demonstrating generalisation capabilities, but responses may be less accurate than with
examples.
◦ One Shot Prompting:
▪ Generates responses based on a single example provided by the user.
▪ The model uses this example to understand context and generate an aligned response (e.g.,
summarising a paragraph with one sentence from it).
▪ Useful with limited examples, but effectiveness depends on task complexity and example quality.
◦ Few Shot Prompting:
▪ Generates responses based on a small number of examples provided by the user.
▪ Users supply a few relevant examples (e.g., describing a smartphone's features for a product review) to
provide additional context and guidance.
▪ Leads to more accurate and relevant responses than Zero or One Shot Prompting, but still relies on the
quality and relevance of the examples.
• Self-Consistency Prompt
◦ A sophisticated technique to ensure coherence and logical consistency in generated text.
◦ The prompt contains key information, statements, or facts that the generated text must adhere to
throughout the conversation.
◦ Elements: Can include background information, established facts, opinions, or constraints relevant to the
topic.
◦ Example: In a climate change discussion, the prompt might include scientific data or consensus
statements to guide consistent responses.
◦ Value: Crucial for educational content, technical discussions, or decision-making processes where
coherence is vital.
◦ Balance: Avoid excessive detail or restrictive instructions, which can limit flexibility and creativity, leading
to repetitive responses.
Prompts for Creative Thinking (Textbook 2: Chapter 4)
• Introduction
◦ "Prompts for Creative Thinking" explores the use of prompts as catalysts for igniting imagination, sparking
innovative ideas, and overcoming mental blocks.
◦ It offers a wide range of prompts to stimulate creative thinking and practical strategies for effective
leverage.
RV Institute of Technology and
Management®
◦ The chapter guides readers to explore diverse perspectives, connect unrelated concepts, and embrace
curiosity to cultivate a creative mindset.
• Unlocking Imagination and Innovation
◦ This section aims to ignite creativity and drive innovation within organisations through prompts.
◦ It encourages brainstorming, embracing failure as a learning opportunity, fostering curiosity and
experimentation, and cross-disciplinary collaboration.
◦ Top 10 Prompts: Examples include questions on how unlocking creativity leads to breakthrough
innovations, the impact of a creative mindset on problem-solving, strategies for cultivating innovation, the role
of play and experimentation, inspiring wonder, how education systems affect imagination, embracing failure,
integrating technology, interdisciplinary collaboration, and the role of leadership.
◦ These prompts spark imagination, encourage innovative thinking, and inspire creative exploration.
Prompts for Effective Writing (Textbook 2: Chapter 5)
• Introduction
◦ "Prompts for Effective Writing" provides inspiration and guidance to enhance writing skills and foster
creative expression.
◦ It covers various genres, styles, and themes, from fiction to non-fiction, poetry, and persuasive pieces,
encouraging writers to delve into their imagination and personal experiences.
◦ The chapter also provides practical strategies for overcoming challenges like writer's block, developing
routines, and refining storytelling craft.
◦ It highlights the importance of revision and editing for clarity and impact, empowering writers to captivate
readers and articulate ideas effectively.
• Igniting the Writing Process with Prompts
◦ This section offers a comprehensive guide to invigorate and streamline the writing journey through
strategic use of prompts.
◦ 10 Sample Prompts: Examples include exploring time travel, a character discovering a hidden world, a
day on a different planet, using a photograph for inspiration, a moment of serendipity, a world with tangible
emotions, a story from a vivid dream, a letter to a future self, dialogue without speaking, and a forbidden
library with magical books.
◦ These prompts are designed to spark creativity and jumpstart the writing process, encouraging exploration
of new ideas and perspectives