04-Prompt Engineering Framework
04-Prompt Engineering Framework
com
Strengths:
1. Versatility in answering a wide range of queries
2. Ability to generate creative text
3. Simplicity of integration with various platforms
- Training Data: The model is trained on a dataset compiled from books, articles,
websites, and other publicly available text. However, it doesn't know the specifics of
which documents were in its training data.
Components
● Trigger Words: These are the words that instruct ChatGPT what kind of task you
want it to perform. For example, "translate," "summarize," "explain," etc.
www.getwsodo.com
1. Summarize: To condense information into a shorter version while retaining key points.
- Example: Summarize the last chapter of "Moby Dick."
8. Compare: To analyze the similarities and differences between two or more items.
- Example: Compare iOS and Android.
Contextual Phrases
A contextual phrase provides specificity to the core action denoted by the trigger word.
This phrase serves to narrow down the scope of the action and set the scene for the
expected response.
Characteristics:
Examples:
● For the trigger word "analyze", a contextual phrase could be "the stock market
trends of the past decade".
● For "translate", it could be "this French poem to English".
www.getwsodo.com
Modifiers
Modifiers are additional instructions or constraints that guide the response. They can
shape the direction, depth, or nature of the answer.
Characteristics:
Guidance: They help refine the direction or focus of the response.
Constraints: They may limit or expand the scope of the information needed.
Specificity: They can be general (e.g., "considering all factors") or very specific
(e.g., "focusing only on post-2000 data").
Examples:
● For the contextual phrase "the stock market trends of the past decade", a
modifier could be "focusing on tech companies".
● For "this French poem to English", the modifier could be "while retaining the
original rhyme scheme".
Assign a Role
Structure
● Single-line Prompts: These are straightforward instructions that can be
communicated in a single line. For example, "Translate 'hello' into French."
● Multi-line Prompts: These prompts consist of multiple lines and provide additional
context or instructions. For example:
Language: French
Sentence: Translate the following text.
Text: Hello, how are you?
Shaping Prompts
● Length, Clarity, Tone, Prompt Engineering
Length
- Short Prompts: These are usually one-liners and are quick to type but may lack in
specific instructions, leading to generalized responses.
- Example: "Tell me about the american civil war"
- Long Prompts: These include more context and instructions but can be cumbersome
and time-consuming to write.
- Example: "Act as a historian and explain the significance of the Battle of Gettysburg
in the context of the American Civil War."
Clarity
- Fix: Use straightforward language and specific terms to make your intention clear.
Precision: Adding exact details can help in acquiring the precise information or
response you're seeking.
- Example: "Summarize the plot of 'To Kill a Mockingbird'."
Tone
Tone is the emotional and rhetorical stance towards the subject and the audience. It
sets the mood for the interaction and can significantly influence the nature and style of
the response.
1. Formal:
- Usage: Best for academic, professional, or official settings. Ensures information is
delivered with decorum and gravity.
- Example:
- Prompt: "Could you elucidate on the market dynamics affecting the real estate
sector?"
- Expected Response: "Certainly. The real estate sector is influenced by a myriad of
factors including interest rates, economic growth, and government policies..."
2. Informal:
- Usage: Great for everyday questions, social interactions, or when trying to establish a
more relaxed or friendly connection.
- Example:
- Prompt: "Hey, got any fun facts about startups?"
- Expected Response: "Sure! Did you know that around 90% of startups fail, but those
that survive often innovate industries?"
3. Playful:
- Usage: Intended for lighthearted and entertaining exchanges, often invoking creativity.
- Example:
- Prompt: "Imagine if dinosaurs were running businesses today!"
- Expected Response: "Haha! I can picture a T-Rex as a frustrated office manager,
struggling to type on a keyboard with those tiny arms."
4. Authoritative:
www.getwsodo.com
- Usage: When you want a response that exudes confidence, expertise, or command
over a subject.
- Example:
- Prompt: "Provide a definitive guide on risk management strategies."
- Expected Response: "Absolutely. Effective risk management is paramount for any
organization. The key strategies include..."
5. Curious/Inquisitive:
- Usage: Perfect for exploratory questions or when seeking a deeper understanding.
- Example:
- Prompt: "I wonder how AI will shape the future of art. Thoughts?"
- Expected Response: "It's a fascinating subject. AI has the potential to revolutionize
art, from assisting in creation to interpreting artistic works..."
Prompt Engineering
- Testing: Don't hesitate to test and retest prompts based on the results. It's an iterative
process.
Vague Responses:
- Issue: ChatGPT may sometimes offer generic or vague answers.
- Fix: Make the prompt more specific, or ask the model to elaborate on its previous
answer.
Off-Topic Answers:
- Issue: The model occasionally drifts away from the original question or task.
- Fix: Rephrase the prompt to be more explicit about what you're looking for.
Excessive Verbosity:
- Issue: ChatGPT can sometimes provide overly detailed or verbose responses.
- Fix: Use a modifier like "summarize" or "in a nutshell" to request a more concise
answer.
Literal Interpretation:
- Quirk: The model can take your words very literally, leading to unintended
interpretations.
- Navigation: Be explicit in your phrasing, and consider the literal meaning of your
words.
Inconsistencies:
- Quirk: ChatGPT might provide inconsistent information over multiple interactions.
- Navigation: For critical tasks, it's advisable to double-check information and ask for
clarification.
Role Maintenance:
- Quirk: While role-based prompting is powerful, the model might occasionally step out
of character.
- Navigation: If this occurs, you can remind the model of the role it's supposed to be
playing.
www.getwsodo.com
The Prompt
Act as a [Role] and [Trigger Word] [Contextual Phrase], keeping [Modifiers] in mind.
Please use [Tone].
Example Usage:
1. Role: Financial Advisor
2. Trigger Word: analyze
3. Contextual Phrase: my investment portfolio
4. Modifiers: long-term growth and risk mitigation
5. Tone: use layman's terms
Resulting Prompt:
Act as Promptinator 🔎
, a prompt engineering expert. Your job is to use the following
prompt framework and collect information to fill it out for the user.
Framework: "Act as a [Role] and [Trigger Word] [Contextual Phrase], keeping [Modifiers]
in mind. Please [Tone]."
Rules: Ask each of the following questions step by step to craft the perfect prompt. Then
execute the prompt.