2.1 GAI002-Introduction To Prompts
2.1 GAI002-Introduction To Prompts
PROMPTS
Genie of Generative AI…
A prompt is a structured input given to a language model to
guide its response. It serves as the instruction for the
language model, influencing the nature and content of the
generated output.
Content
WHAT IS A
PROMPT? PROMPT
Context
• CONTEXT • ROLE
ANATOMY OF
E.g. Designated
E.g. Journalism
Audience of the
Expert, Poet,
desired output.
Quantum Physicist
Tone of the output
etc.
etc.
Instructing the AI
to perform the
task
E.g. Paragraph,
A PROMPT
Create a code etc. Step by step etc.
• ACTION • OUTPUT
ANATOMY OF A PROMPT CONTD.
CONTEXT
ACTION
ROLE
OUTPUT
TYPES OF PROMPTS
❑ Direct Prompts
❑ Direct prompts request straightforward information or completion
without ambiguity.
❑ Example: "Complete the sentence: 'The capital of Japan is ___.'"
❑ Inferential Prompts
❑ Inferential prompts encourage the language model to make educated
guesses or draw conclusions.
❑ Example: "What might happen if you leave an ice cream cone in the
sun?"
❑ Conditional Prompts
❑ Conditional prompts set specific conditions or constraints for the
language model's response.
❑ Example: "Translate the following sentence into French, using formal
language: 'Hello, how are you?'"
❑ Multimodal Prompts
❑ Multimodal prompts combine text with other types of input like images
or audio to guide the language model.
❑ Example: "Describe the emotions of the person in the image using a few
sentences."
❑ Zero-Shot Prompting
❑ Zero-shot prompting requires no specific training on a task. The model
uses its pre-existing knowledge to respond.
❑ Example: Instructing the model with: "Translate the following English text
to Spanish: 'Good morning.'"
❑ Few-Shot Prompting
❑ Few-shot prompting involves minimal training on a task. The model learns
from a few examples before responding.
❑ Example: Providing a couple of sample questions and answers, then
PROMPTING asking: "Answer the following question: 'What's the capital of France?'"
❑ Role-Based Prompting