Skip to Main Content
Libraries
askus Ask us
 

Prompt Design For Beginners

Make the robot work for you.

Recall: What Is A Prompt?

A prompt is the input you provide to ChatGPT, whether it's a question or a command. It instructs the model on what action to take or what information to provide during your conversation.

Context Is Crucial: Introduction To Assigning Personas

When writing prompts, context is crucial for facilitating meaningful interactions with ChatGPT (or model). Your prompt needs to include specific instructions, details, or examples to ensure that the model understands the nuances of your question. Let's look at a simple example to illustrate what adding context to your inquiry looks like.

  • Vague Prompt:
    • Explain why dinosaurs went extinct. 
    • Model's response will be general in nature. 
       
  • Prompt With Context: 
    • Explain why dinosaurs went extinct like I am writing a script for the next Jurassic Park movie sequel.
    • Model's response will be written from a cinematic and creative perspective.

The "prompt with context" incorporates the use of a script writing persona to add context to guide the model's response. Personas are powerful tools for adding clarity and context to your prompts. By assigning a persona, you provide the model with a specific lens through which to interpret and respond to your inquiries. They guide the tone and style of the conversation and ensure that the model understands the required perspective for its response. 

There are two types of personas:

  1. Model or ChatGPT Persona
  • When you assign a persona to ChatGPT, you are instructing the model to adopt a specific role or identity for the entire conversation until you end the session. For example, if I tell the model that "you are an astronaut", then the model will respond in character as it were an astronaut. This identity sets the overall tone and context for the entire conversation with ChatGPT. Furthermore, the astronaut persona has a scientific perspective so specific terminology and relevant knowledge will be incorporated into the model's responses. 
     
  • You can learn more about this topic by completing the Assign A Model Persona module. 
  1. User Persona
  • Assigning a user persona defines the user's role or perspective, thus shaping the tone and context of the model's response on a prompt by prompt basis. The model will respond as if it was talking to a specific type of user. For example, if the user persona is "like I am a five year old child," then the model adapts its language, tone, and level of detail to be accessible for a very young person.
     
  • You can learn more about this topic by completing the Assign A User Persona module. 

Can You Have Both A Model And A User Persona In The Same Prompt?

You can include both a model and a user persona in the same prompt. However, the two personas may create potential conflicts in the model's response.

  • The user persona directs the model to understand the characteristics of a specific user's character, tailoring the response based on those attributes.
  • Simultaneously, the model persona represents the default behaviour of the large language model.

ChatGPT tries to balance the needs of the user persona with its understanding of the model's identity. How well these two identities align or contrast will determine the impact on the response.

Example of Conflicting Personas

The characteristics and preferences of these two personas are fundamentally at odds:

  • User Persona: An amateur children's entertainer who enjoys silly jokes and uses playful, informal language.
     
  • Model Persona: A grim British aristocrat who uses highly formal language. 

The user's preference for silly jokes clashes with the model's formal demeanor; thus, creating a challenge for the model to craft a response that aligns with both personas.

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.