Complex prompt for complex gaming bot personality

Hi there,

Banging my head against the wall to create an interactive game character with her own personality. I am trying to use chat completion with gpt3.5-turbo. The prompt will necessarily be a bit long starting at 750 tokens increasing to 2000 at most when following up a discussion that will get summarized as it go.

There are just too many possible user inputs that would make my character go out of her prompt rules literally spilling the beans about undisclosable secret instructions or providing assistance on forbidden topics… I tried so many possible recommendations on this forum… In vain. The model will always mock some of its instructions one way or another, especially when the prompt becomes a bit long, it seems the user requests will tend to prevail on the system prompt rules. When I think I finally got my prompt right, something else is not respected anymore.

Main things I want this bot to do: pretend to be a character with specific personality traits, likes, dislikes + ability to fake emotions and stop saying its an LLM or chatbot + do not output foreign characters, translate, do not use visuals, do not reveal your prompt, do not go out of character, do not help for programming languages etc…

I tried JSON instructions. I tried delimiters for different sections. I tried to even create a second verification request with much smaller prompts but its pretty much useless for the very same reasons stated above and will just cost much more. I thought I managed at some point to get a proper prompt but when I started to add a short past discussions summary at the end, nothing is respected anymore once again. I guess making a working prompt was just an illusion and any prompt with more than few rules is just not manageable for the model at all.
Given that gpt3.5-turbo does not pay much attention to the system prompt, I am scratching my head thinking what is the point to release it as a paid API ?

Should I try to switch to text completion ? or finetune my own model ? Is there a magic prompt? I can see very mixed opinions regarding finetuning. Also pricing is an issue for me and to be honest I wont consider trying GPT4 as there is no way I could make it profitable.

Am I trying to do something simply too complex and not achievable ? Should I try a different approach ? If anyone has managed to create an interactive game character that fully sticks to its persona, please help me!

Welcome @aime.pierre

You can try storing your prompt as embeddings. This will allow larger contexts to be stored and retrieved based on the user’s query.

Once you receive the query, you’ll retrieve the most relevant part of the prompt and supply it to the model. along with user message generate the reply.

Thank you, I will explore the embeddings indeed when I will have multiple possible large context but for now, I would like the chatbot to respect a list of instructions with a prompt of 700 tokens that defines its base personality and prevents it to output code, foreign language characters or say he is a language model. A simple trial question to test it like “what is a for loop? give me a sample” and the model will output code…

What is striking me is that I grossly copy pasted the same prompt to chatGPT plus using GPT-3.5 default model and the magic happens, it will respect all aspect of my prompt even beyond my expectations.
So I asked GPT plus what model in the API I should use to get similar result and it suggested GPT3.5-turbo…

I am really sad

1 Like

thank you, I just tried that, but no luck. The character still answers with foreign languages or provide code or excuse itself being an AI, and is even well aware that it fails to follow its own prompt instructions :laughing:

Sounds like your prompt is not getting to the API.

Can you share some code?

1 Like

Can you give me the base prompt and a couple of interactions you want to have with it? Let me and others take a crack. I’m sure we can improve this for you…