Persona prompting

In a recent post on using ChatGPT, I covered four prompt patterns I’d used for a specific task. Today, I want to elaborate on one of them. The persona prompt pattern is enormously useful, and I’ll take a deeper look into how to use it.

What is it?

The persona pattern is named for what it does: it instructs ChatGPT to respond as a specific person or type of person. ChatGPT’s training data is vast. As a result, it can be difficult to get it to focus on what you want. The persona prompt channels ChatGPT to select the kinds of details it should focus on as it generates its output. Focusing the output also helps when you aren’t sure what type of output you want, but you do know the kind of person you might ask for those details. For example, you might not be sure what to describe at a murder scene, but you know that a homicide detective could tell you what’s important and what’s not.

Pattern Structure

The structure is simple: “Act as a {persona name},” replacing the curly bracket text with whatever you need. “Act as a homicide detective…” in the example above. Then you follow it with the body of the prompt. Here’s an example:

Act as a medical historian and outline the important events in 17th century Europe.

You’ll get information about the Great Plague of London, the development of microscopy, and advancement in understanding human anatomy, among other topics. Omitting the persona produces output that describes events pertaining to wars, politics, and arts in addition to mentioning the effects of the Great Plague.

You can also append a prompt with this structure. For example:

The protagonist in my novel is a gambling addict. What are some things she might do to hide her problem from her family? Respond as a behavioral psychologist.

The last statement executes the persona pattern.

Variation: Outputs

A variation on the Persona pattern can help you narrow your scope, especially if you’re not sure what you want. The variation looks like this: “Provide outputs that {persona} would create.” Here’s an example:

My character wants to help a struggling student improve her grades. Provide outputs that a teacher would suggest.

I’m not a teacher, so I might use this prompt to know what kinds of assignments, exercises, or other tools a teacher might provide to the student. Then I could focus on the ones that support your story.

Uses

You can use the persona pattern to support your writing in many ways. Here are some things I’ve done with it:

  • Research assistant. While working out what a fictional Florida city might look like, I didn’t know how to start. I prompted ChatGPT to answer as an Urban Anthropologist and tell me factors I ought to consider.
  • Sounding board. “I’m having trouble coming up with a red herring for a mystery novel. Ask me questions about my plot from the perspective of a mystery reader until you can suggest some options for me.” That combines the persona with another kind prompt pattern, flipped interaction. ChatGPT probed what I already had in the way of plot twists before suggesting options that got my thinking started again.
  • Character development. I’ve provided the LLM with some details of the character’s background and psychology and then asked it to respond to questions as that character. That has helped me generate new ideas to deepen backgrounds, suggest motivations, and dilemmas the character might face.

You can combine multiple personas to examine a question from different perspectives. In the city-building example, I didn’t stop at Urban Anthropology. I also asked about the city from the perspective of the 19th century robber baron who founded it, a 1970s civil rights activist, and a teen who lives there today. Those outputs gave me fresh ideas to pursue.

These three ideas only scratch the surface of what you can do with the persona prompt pattern. Try it out, and please leave a comment telling me how it worked out for you.