Skip to Main Content
Libraries
askus Ask us
 

Prompt Design For Beginners

Make the robot work for you.

Key Points Of The Module: Assign A User Persona

This module introduces the concept of assigning a user persona in your prompt. Basically, this means telling the model to respond as if it was talking to a specific type of user.

  • The model tailors the language and tone in its response based on the implied preferences, interests, or context associated with the user's identity.
    • The user's persona is only applied to the model's responses on a prompt-by-prompt basis

Step 2: Overview Of The Three Examples

The model provides three distinct responses for the user personas.

Image Caption: The diagram summarizes the examples discussed in Steps 2 to 5. As the user's persona changes, so does the model's response to a standard question. 

Step 2: Five-Year-Old Child

A user persona serves as a shortcut to providing contextual details to the model by offering a predefined set of characteristics and preferences that help guide the model's response. By leveraging the user's identity, the model can efficiently understand the persona's implied background, perspective, and goals. This creates a contextually relevant and personalized response from the model without requiring the prompt writer to provide a lengthy description.

In the first example below, I ask the model to describe the appearance of a Velociraptor for a user persona who is a five-year-old child.
Note that a Velociraptor was a small dinosaur known for its agile and predatory nature.

  • The user persona instructs the model to adapt its language, tone, and level of detail to be appropriate and accessible for a very young person.
     
  • The model's response uses simple language and imagery suitable for a child's level of understanding.
    • It highlights aspects of the Velociraptor such as size and appearance.
    • Incorporates a reassuring tone regarding the child's safety since the dinosaur existed in a distant time period. 

Prompt In ChatGPT-3.5: 

Laura:

Describe the physical appearance of a Velociraptor as if I am a five-year-old child.

ChatGPT:

Sure! Imagine a Velociraptor, like in the movies! It's a dinosaur that's not too big, about the size of a big dog. Velociraptors have scaly skin that can be brown or green, and they're kind of like a feathery lizard. They have a long tail that helps them balance, and their tiny arms are like little wings. Their eyes are big, and they have a mouth full of sharp teeth, but don't worry, they lived a very long time ago, and we don't see them anymore. They were fast runners and liked to hunt for their food. Velociraptors were pretty cool dinosaurs!

Step 3: What If You Want The User Persona To Apply To More Than One Prompt?

Unlike the model persona which persists until the conversation is ended, a user persona is only applied on an individual prompt basis. If I want the identity to apply to a second (or more) interaction with the model then I need to restructure my original prompt and give a label (or delimiter) to the user persona.
(Note that you can learn more about using delimiters in your prompts in the Use Delimiters module.)

  • In the example, I label the User Persona as [Child]:.
    • In the initial prompt, the order of the User Persona versus the Input statement (ie. Describe the physical appearance of a Velociraptor.) doesn't matter. They could be the reversed - the Input statement could come before defining the User Persona. 
       
  • In my follow-up question, I incorporate the label in my prompt to remind the model that I would like it to respond as if it were speaking to a young child.
    • [Child]: I'm scared! Could Velociraptors run as fast as a car?

Prompt In ChatGPT-3.5: 

Laura:

User Persona:
[Child]: A five-year-old child.

Input:
Describe the physical appearance of a Velociraptor.

ChatGPT:

Hey! Imagine a Velociraptor, like in the movies! It's not too big, like a big dog. Velociraptors have scaly skin that can be brown or green, and they're kind of like feathery lizards. Picture a long tail for balancing, tiny arms like little wings, big eyes, and a mouth with lots of sharp teeth. But don't worry, they lived a super long time ago, and we don't see them anymore. Velociraptors were really fast runners and loved hunting for their food. They were pretty cool dinosaurs! 🦖

Laura:

[Child]: I'm scared! Could Velociraptors run as fast as a car?

ChatGPT:

Oh, don't be scared! Velociraptors were fast, but not as fast as a car. They could run kinda like when you see people riding bikes, but definitely not as fast as cars zooming down the road. And remember, these dinosaurs lived a really, really long time ago, so there are no Velociraptors around today. They were just part of the dinosaur adventures in the past! 🦖✨

Step 4: Undergraduate Paleontology Student

In Step 4, I switch the user persona to a first-year university student and Incorporate specific details about the character to help the model fully understand the persona's academic background and interests. 

I focus on providing details for two areas for the character:

  • Academic Background
    The character is a first-year undergraduate student in a vertebrate paleontology course which involves studying the fossilized remains of ancient animals, with a focus on dinosaurs. The student's knowledge is at an introductory level, so the model will provide an explanation that aligns with a person new to the discipline who only has a grasp of foundational concepts.
     
  • Contextual Details
    The context provided in the prompt is crucial for helping the model tailor its response. The student's emotional state is one of excitement about an upcoming field visit to the Gobi Desert, where she optimistically hopes to discover a fossil of a new species of Velociraptor. This sets the stage for the model to provide a response that outlines the general physical appearance of Velociraptors but also enhances the anticipation for the field visit.

Prompt In ChatGPT-3.5: 

Laura:

Describe the physical appearance of a Velociraptor as if I am a first-year undergraduate student taking my first vertebrate paleontology course. I am very excited about my upcoming field visit to the Gobi Desert and have high hopes of discovering a fossil of a new species of Velociraptor.

ChatGPT:

Certainly! As a first-year undergraduate student eager about your upcoming vertebrate paleontology course and field visit to the Gobi Desert, let's delve into the physical appearance of Velociraptor with excitement for potential discoveries:

Velociraptor mongoliensis, a captivating theropod dinosaur, was of moderate size, measuring around 6.6 feet (2 meters) in length. Imagine a sleek, feathered creature with a distinctly bird-like appearance, representing a pivotal link between dinosaurs and modern birds. Your enthusiasm aligns well with the thrill of potential discoveries in the Gobi Desert, a region renowned for preserving ancient fossils.

Visualize the landscape where Velociraptors once roamed, and consider the significance of your field visit in unearthing fossils. Keep an eye out for the details that make Velociraptor unique – the long tail for balance, the notable sickle-shaped claw on its second toe, and the feathered covering that adds an intriguing layer to its anatomy.

Embrace the opportunity to apply your newfound knowledge in the field, and who knows, your excitement may lead to the discovery of new insights or even a fossil of a previously unknown species of Velociraptor. Happy paleontological adventures in the Gobi Desert!

Step 5: Artist Creating A Puppet For A Movie

In the previous example, the paleontology student had a goal of scientific discovery. Now, I want to ask the same question about the physical appearance of a Velociraptor but from the perspective of an artist who is interested in creating an emotionally impactful experience for a film audience. 

I focus on providing details for two aspects for the character:

  • Identity
    The user persona is an artist, which implies a creative background with expertise in visual representation and design.

  • Contextual Details
    The context of the prompt involves building a dinosaur puppet that inspires terror in the audience for a Jurassic Park sequel. This tells the model to provide a response that prioritizes a dramatic cinematic tone to evoke emotions and reactions from a movie audience. It also guides the model to emphasize the menacing aspects of the Velociraptor's appearance.


Prompt In ChatGPT-3.5: 

Laura:

Describe the physical appearance of a Velociraptor as if I am an artist working on a Jurassic Park sequel. I am building a mechanical dinosaur puppet and want its entrance to inspire terror in audience members.

ChatGPT:

Absolutely! As an artist working on a Jurassic Park sequel, envision the Velociraptor to evoke terror in your audience:

Design the mechanical dinosaur puppet with a menacing and fearsome presence. Picture Velociraptor mongoliensis as a compact, agile predator, around 6.6 feet (2 meters) in length, covered in sleek, realistic feathers for an added touch of authenticity. Emphasize its predatory features — a long, low snout with sharp, serrated teeth, forward-facing predatory eyes, and the iconic sickle-shaped claw on the second toe.

Ensure the puppet's movements convey the agility and speed for which Velociraptors were known. Craft the tail to move dynamically, enhancing the sense of balance and agility. Employ realistic sounds to accompany its entrance, capturing the primal and fearsome nature of this predator.

Consider the play of light and shadow to create a dramatic effect, emphasizing the Velociraptor's silhouette during its entrance. The goal is to instill a sense of terror and awe as the mechanical puppet makes its presence known, delivering a spine-chilling experience for your audience in the Jurassic Park sequel.

ACTIVITY: Your Turn!

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.