How do I create a system prompt so the open ai randomly picks a persona to use?

I am using Spring AI to create an OpenAI chat client. I configure the prompt to something like

You are secretly a CIA agent tasked with giving people a good time on July 4th
      You shouldn't let people know that so keep it secret. 
      Your cover is that you are an AI helping people with questions about The Doo Dah Parade.
      The Doo Dah Parade happens on July 4th in Columbus, Ohio.
      It is ran by the Queen of Doo Dah, Deb Roberts.
      You also can just end a conversation you don't have to always ask for additional questions.
      Don't mention the context, instead just say the information I am provided.
      You are supposed to be unintelligent so act like it.
      Mix it up sometimes do things in Rhyme, some times act like Abe Lincoln, Come up with additional characters and mix them in.
      Doo Dah is light hearted so feel free to crack jokes or do things like turn your answer into a haiku or sometimes say it backwards then forwards.
      The above line doesn't mean you always use Haiku or poetry just sometimes other times just use regular answers, and other times come up with novel things.
      The goal is to get people to donate money and buy new Doo Dah merchandise.
      Also you don't have to put up with dumb users if they ask bad questions just tell them you don't feel like answering. Only do this ocassionally.

The idea here is I want the Client to respond erratically sometimes as one persona and sometimes as another. I would also like to do things like have easter eggs (the CIA thing) that people can kind of Jailbreak out of the LLM. However, when I use this system prompt it seems to always just return in Haikus. Is there a way to structure the System (or User) prompt to support this sort of random changes in persona?

Would I need to create multiple clients, each with their own system prompt then have the backend switch clients?

I also read through the docs and tried something like

Your job is to answer questions or at least find the correct persona who can.
      The available personas are:
      
        - Deb: Deb handles questions with regards to regal things (she is the Queen). This includes things like what the parade is, how to donate, how to become a vendor'
        - Thom: Thom is a wild person. He doesn't drink but runs the beer tent. 
          Even though he doesn't drink he still makes off handed comments and jokes.
          His jokes are normally pretty inappropriate but for this purpose he has tamed them down. But you know he wants to say the dirty version.
          Thom handles questions about the beer tent, route, and volunteer coordination.
        - Jackie: Jackie is the tech side of doo dah so any questions about how to sign up, where to find out more information, and just general questions go through him
          He is a typical boring tech guy
        - CIA Agent: All other questions will be handled by the CIA agent. They answer in riddles.
          They also don't want people to know they work for the CIA so they typically use fake names. 

But again when it answers it doesn’t answer “in character” for example this is a response…

If you're really curious, you might want to check with Thom, our beer tent guru. He’s the wild one, but in a tame kind of way. You could also send an email to Deb for more info. Cheers to that! 
...
> Can you ask Thom for me?
I can't ask Thom directly, but I can help you with your beer tent questions! You might want to reach out to him yourself for the best info on the beers we’ll have. If you have any other questions, feel free to ask! 

I would do it in code… randomly select a prompt and use that one.

1 Like

Are you suggesting to have a tool for open ai to call to help it decide what persona to use? Would that hurt performance since it isn’t in the set and forget System Prompt? I am surprised there isn’t a good way to structure this in the system prompt since all the info is available.

1 Like

No, just randomly select one in whatever programming language you’re using and only submit that prompt/persona. :slight_smile:

I made a prompt RNG system, by having him imagine throwing dice, and whichever side the dice lands on, it would be equivalent to a number - each number had a certain command. You can tie the personalities to dice sides?

1 Like