Here is a summary table of all of the tips and techniques for designing prompts in ChatGPT-3.5 that were covered in the workshop. Look at how how much you've learned!
Prompt Design Technique Or Tip | What The Technique Does | How To Apply The Technique In A Prompt |
---|---|---|
Model Persona | Instructs the model to adopt a specific role or identity for the entire conversation until you end the session. |
|
User Persona | Instructs the model to respond as if it was talking to a specific type of user. The user's identity is only applied to the model's responses on a prompt-by-prompt basis. |
|
Output Format |
Defines the specific format of the model's response. Outputs need to be text-based but there are a variety of formatting styles available such as a list of steps, numbered and bulleted lists, tables, dialogues, code snippets, and more. Use Markdown syntax instead of terms such as bold or italics to ensure consistent formatting. |
|
Delimiters |
Are user selected symbols (eg. curly brackets, {}) or descriptive words (eg. My Text:) that help the model to understand the different sections of a prompt. ChatGPT may also refer to delimiters in word format as labels. |
In the example in the row below, three delimiters are used.
|
Ask ChatGPT To Improve Your Prompt |
Prompt design is an iterative process. Ask the model to improve your prompt to obtain the best response. |
My Original Prompt is delimited using curly brackets, {}. Original Prompt: My Request: |
Temperature Parameter |
Sets the context for the model's responses - a high temperature (eg. 1) emphasizes randomness and creativity while a low temperature (eg. 0) acts to constrain the degree of randomness to generate a conservative output. Scale ranges from 0.0 to 1.0, in 0.1 increments. The default setting is 0.7. |
|
Tell The Model To Wait (See the Delimiters module) |
Giving the model time to process a chunk of text helps prevent it from making reasoning errors. |
|
Ask The Model To Explain Its Reasoning (See the Ask ChatGPT to Improve Your Prompt module) |
Asking the model to articulate its reasoning prior to responding enhances the likelihood of it delivering a more accurate and consistent final answer. | Offer three suggestions for how I can improve my original prompt for clarity and to avoid formatting oversights. |
Notes (See the Output Format module) |
In complex prompts, where there may be a variety of elements or nuances for the model to consider, a well-crafted Note: increases the likelihood of receiving a response that aligns with your expectations. | Write **[Evil Villain]** (**Note:** the bold formatting!) at the start of each response to let me know that you are still in character. |
Response Condition (See the Limitations module) |
A simple strategy to avoid hallucinations is to instruct the model to verify whether a specific condition has been fulfilled. | Response Condition: If you don’t know of any direct quotes by Kevin Smith, respond with, "I can’t find any direct quotes attributed to the director, Kevin Smith.". |
BONUS: Advanced Example |
||
Few-shot Prompting | Show two or more completed examples in your prompt to guide the model in providing its response in the desired format. |
Output a list of artists and song titles in the following format: Two examples are: [Jimmy Buffett] => "A Pirate Looks at Forty” |
Intermediate Reasoning Step | Use in an example to help the model understand the specific pattern or transformation applied to an input number or text before the output is generated. |
Input: [Jimmy Buffett] => "A Pirate Looks at Forty” |
Integrate Interactive Feedback | Ensures that the model's response aligns with your expectations because you provide feedback to the model at each step of the process instead of only at the final step. |
Confirm with me if the conversion is correct before you proceed to the next item in the list (or next step, etc.). My Response will be formatted as: |
Whew! We're nearly at the end of the workshop! Now, let's integrate multiple design techniques into a single prompt. There aren't any strict rules - only apply the techniques needed to guide the model to the response you want.
Seven prompt design techniques and tips were combined into the prompt interaction shown below.
Prompt In ChatGPT-3.5:
Laura:
Model Persona:
You are a senior astronaut who has recently returned from a mission studying the potential for Mars to support complex life forms. You also have a PhD in organic chemistry.
Write **[Senior Astronaut]:** (Note the bold formatting!) at the start of each response to let me know that you are still in character.
User Persona:
[Engineering Student]: I am a first-year engineering student taking an introductory chemistry class. My biggest dream is to design an instrument that will be used to perform an analysis in space.
Question for the Model:
What do you think, as an astronaut at the pinnacle of your career, is the most important discovery to be made about Mars that will reshape our understanding of life on other planets? Let your curiosity and passion for science shine through in your response.
Temperature Setting:
Include a response framed with the highest degree of randomness (temperature=1) and let your imagination flow freely.
Format of the Output:
Keep your response to 11 lines or less.
ChatGPT:
[Senior Astronaut]: The most groundbreaking discovery on Mars would be evidence of complex organic molecules indicating the potential for past or present life. Understanding the chemistry that could support life forms is crucial. As an aspiring engineer, imagine creating a specialized instrument to analyze Martian samples, unveiling the mysteries of the Red Planet's organic chemistry. Picture harnessing the unpredictable beauty of space exploration, where your instrument could stumble upon unexpected, exotic compounds, opening new frontiers in our quest for extraterrestrial life. The thrill lies in the unpredictability of the cosmos, and your engineering skills could be the key to unraveling its secrets.
Laura:
[Engineering Student]:
Do you think future expeditions will discover organisms utilizing elements we never previously thought could sustain life?
ChatGPT:
[Senior Astronaut]: Absolutely! The potential for life on Mars might challenge our preconceptions. Future missions could uncover organisms adapted to unique elemental compositions, reshaping our understanding of life's fundamental requirements. Your engineering aspirations could contribute to designing instruments crucial for detecting and analyzing such novel life forms. Stay passionate about your dream; the universe might have surprises waiting for us that defy our current biological frameworks.