Skip to Main Content
Libraries
askus Ask us
 

Prompt Design For Beginners

Make the robot work for you.

PRO TIPS: Use Delimiters

Delimiters logo.

Key Points Of The Pro Tip

  • This module introduces you to the concept of using delimiters in your prompts. 

  • Delimiters are user selected symbols (eg. curly brackets, {}) or a descriptive word (eg. Title:) that help the model understand the different sections of a prompt. 

Step 1: What Are Delimiters?

  • Delimiters are a sequence of characters or symbols that help ChatGPT understand where important places or distinct sections are located in your prompt. They play a crucial role in helping the model to understand your prompt's structure. 

  • You can choose the type of delimiter to use in your prompt. Here are five commonly used examples:

    • curly brackets, {}

    • double hashtags, ##

    • angle brackets, <>

    • triple dashes, ---

    • XML tags such as <tag> </tag>

  • Descriptive words or phrases can also be used as delimiters. Here are three examples:

    • Text:

    • Title:

    • My Examples:

Step 2: The Block Of Text

The block of text used in Steps 3 and 4 is quoted below.

While space travel can damage the body, the isolating nature of space travel can also have profound effects on the mind. Imagine having to live and work with the same small group of people, without being able to see your family or friends for months on end. To learn to manage extreme environments and maintain communication and leadership dynamics, astronauts first undergo team training on Earth. They spend weeks in either NASA’s Extreme Environment Mission Operations at the Aquarius Research Station, found underwater off the Florida Keys, or mapping and exploring caves with the European Space Agency’s CAVES program. These programs help astronauts build camaraderie with their teammates and learn how to manage stress and loneliness in a hostile, faraway environment. Researchers are studying how to best monitor and support behavioral mental health under these extreme and isolating conditions. While space travel comes with stressors and the potential for loneliness, astronauts describe experiencing an overview effect: a sense of awe and connectedness with all humankind. This often happens when viewing Earth from the International Space Station.

Reference

Seidler, R. (2023, September 19). Spending time in space can harm the human body − But scientists are working to mitigate these risks before sending people to Mars. The Conversation.
https://theconversation.com/spending-time-in-space-can-harm-the-human-body-but-scientists-are-working-to-mitigate-these-risks-before-sending-people-to-mars-210761

  • Dr. Siedler is at the University of Florida. 

Step 3: Isolate A Sentence In The Prompt

In this first example:

  • I am going to use curly brackets, {}, as my delimiter.
    • The brackets are bolded and in bright blue to help make them easier for you to spot in the prompt.
       
  • The curly brackets isolate a sentence in the prompt that I want ChatGPT to take a specific action on (ie. explain).

Prompt In ChatGPT-3.5: 

Laura:

Here is a sentence delimited using curly brackets, {}. Explain the meaning using simpler terms.

{While space travel comes with stressors and the potential for loneliness, astronauts describe experiencing an overview effect: a sense of awe and connectedness with all humankind.}

ChatGPT:

Certainly, Laura! In simpler terms, the sentence is saying that even though space travel can be challenging and lonely for astronauts, they often feel something called the "overview effect." This is a profound feeling of awe and connection with all of humanity. It's like a powerful realization of how interconnected we all are.

Step 4: Analyze A Block Of Text: Isolate Two Sentences

In Prompt 1:

In the first prompt, 

  • Curly brackets, {}, are used as the delimiter to isolate two specific sentences in a block of text. 
    • The brackets are bolded and in bright blue to help make them easier for you to spot in the prompt.
       
  • The block of text itself is isolated from the prompt by using the Text delimiter; that's why Text is capitalized in the prompt's instructions. 
     
  • Note that I provide the block of text and then ask the model to wait. Giving the model time to process a larger chunk of text helps prevent it from making reasoning errors. 

In Prompt 2:

In the second prompt, ChatGPT is asked to analyze the block of text. 

  • The two sentences delimited using curly brackets in the prompt encourage the model to delve deeper into underlying themes and complexities of the astronaut experience. This process enhances the model's depth of analysis, contributing to a more comprehensive understanding of the text's content and themes.
     
  • The phrase in the prompt, "which explores the impact of space travel on the mental health of astronauts", is the central theme of the text. It directs the model to focus on exploring this theme, guiding the analysis towards understanding the effects of space travel on astronauts' mental health. This ensures a focused and relevant response by the model.

Prompt In ChatGPT-3.5: 

Prompt 1:

Laura: 

Here is a block of Text with two sentences delimited using curly brackets, {}. Please wait for instructions. 

Text: 

{While space travel can damage the body, the isolating nature of space travel can also have profound effects on the mind.} Imagine having to live and work with the same small group of people, without being able to see your family or friends for months on end. To learn to manage extreme environments and maintain communication and leadership dynamics, astronauts first undergo team training on Earth. They spend weeks in either NASA’s Extreme Environment Mission Operations at the Aquarius Research Station, found underwater off the Florida Keys, or mapping and exploring caves with the European Space Agency’s CAVES program. These programs help astronauts build camaraderie with their teammates and learn how to manage stress and loneliness in a hostile, faraway environment. Researchers are studying how to best monitor and support behavioral mental health under these extreme and isolating conditions. {While space travel comes with stressors and the potential for loneliness, astronauts describe experiencing an overview effect: a sense of awe and connectedness with all humankind.} This often happens when viewing Earth from the International Space Station.

ChatGPT:

Got it, Laura. I'm ready for your instructions regarding the provided block of text.

Prompt 2:

Laura:

Analyze the block of Text, which explores the impact of space travel on the mental health of astronauts. In your analysis, ensure you capture the main points while also providing additional explanations for the sentences delimited using {} to deepen understanding of the astronaut experience.

ChatGPT:

Certainly, Laura!

The provided block of text offers a comprehensive examination of the psychological effects of space travel on astronauts, highlighting both the challenges they face and the unique experiences they encounter:

Physical and Psychological Toll:

  • The initial sentence underscores the dual impact of space travel on astronauts, emphasizing not only the physical toll it takes on their bodies but also the profound psychological implications of the isolating environment they inhabit.

Isolation and Loneliness:

  • The text within curly brackets delves into the emotional toll of isolation, painting a vivid picture of the loneliness experienced by astronauts living and working in confined quarters with limited contact with loved ones. This portrayal underscores the psychological strain endured during extended missions, exacerbated by the vastness of space and the inability to connect with those back on Earth.

Preparation and Training:

  • Astronauts undergo rigorous team training on Earth to prepare for the challenges of space travel. Programs such as NASA's Extreme Environment Mission Operations and the European Space Agency's CAVES program simulate space conditions, enabling astronauts to develop coping mechanisms for stress and isolation while fostering teamwork and camaraderie among crew members.

Research and Support:

  • Ongoing efforts are evident in the text to understand and support astronauts' mental health during space missions. Researchers are dedicated to studying ways to monitor and address behavioral health under extreme conditions, demonstrating a commitment to safeguarding astronauts' well-being amidst the challenges of space travel.

The Overview Effect:

  • The second sentence within curly brackets introduces the concept of the "overview effect," wherein astronauts experience a profound sense of awe and interconnectedness when viewing Earth from space. This moment of transcendence offers a counterbalance to the stressors and loneliness of space travel, providing astronauts with a unique perspective that can positively influence their mental state.

In summary, the analysis illuminates the intricate interplay between physical and psychological challenges in space travel while emphasizing the importance of research, training, and support systems in safeguarding astronauts' mental health during their missions.

ACTIVITY: Your Turn!

Reference

The example used in the activity is derived from the following course lecture.

Phoenix, J. (2023). 21. Writing clear instructions - Delimiters [MOOC lecture]. In M. Taylor, & J. Phoenix, The complete prompt engineering for AI bootcamp (2023). Udemy. https://www.udemy.com/course/prompt-engineering-for-ai/

Creative Commons License
This work by The University of Victoria Libraries is licensed under a Creative Commons Attribution 4.0 International License unless otherwise indicated when material has been used from other sources.