So I’m currently working on building a GPT that acts as a game master for a text adventure game. I do not have much experience in coding or JSON files, so I have been using word document files in the knowledge base to give the AI specific instructions on how each interaction needs to be for the player.
What I want to achieve is have the AI reject player written responses and make the player choose from the options provided. It works in the beginning but after a few messages it starts to forget that and then it allows player input. Is there a way to force it to reference the files with every interaction?. I’ve tried putting it in the instructions but I don’t think it’s working out clearly.
Interesting project!
What I understand is that you want to limit the possible inputs to the model inside ChatGPT, and your custom GPT to be more precise.
I found a example where a GPT is instructed to always behave in a certain way. And this example is the GPT builder itself.
My suggestion is to reference it and adapt the solution by OpenAI itself for your use case.
Here is the link:
https://help.openai.com/en/articles/8770868-gpt-builder
Thank you for this. I’ll definitely look at restructuring everything based of this article. I kinda went into this whole thing blind and I’ve been messing around with chatgpt to write stories for me that are interactive which is almost like writing a book. It’s fun. And then it developed into what I’m making.
If you wanna check it out as is, it’s called Omniverse in the gpt library.
I’m so completely fascinated by this that I may never read another fictional book again.
For me the interesting part is that you are deliberately trying to restrict the input space during a conversation with the model.
The challenge you are trying to solve is particularly tricky when using the GPT interface. If all you want is for the model to display a limited set of options and only respond to these then you have to manage the fact that ChatGPT is a chat interface. And, as of today, we have limited options to change or restrict this interface. Ultimately the user will always have a textbox and can enter whatever they want. And the LLM is trained to response to these inputs.
Consider the implications: if instead of reacting to a large set of inputs the app should only react to a limited set of these then you are effectively taking away a large part of what makes a LLM fascinating from the perspective of the user interaction. The experience would resemble a classical point and click adventure and not a interactive adventure that writes itself on the fly based on the choices of the players.
It boils down to a large tree of decisions and I assume you could create all of the story progression in advance, simply prompting the model to follow the tree. For example:
If user choices were AABABB AND user selects A then A else B. And so forth.
This perspective pretty much translates to invoking an action every turn of the conversation. The previous user choices become the parameters for the function call and in the back you retrieve the next part of the story until the end.
The big question is: would you still need a LLM fot this design? While you and the model write the whole story and the various progressions, during gametime a simple UI with two buttons would perfectly suffice.
From this perspective, if you always restrict the inputs to a limited set of choices the app will likely be better, faster, cheaper and more robust if you create a classical game UI and use the generated contents as fixed assets.
If you can design a game that allows for free choices and restricted choice in alternation the game will fit a lot better into the ChatGPT environment.
Thanks for all the information, this project had to be tabled for a bit but I did make some of my own breakthroughs. Learned how to script instructions essentially.
I have a set of parameters for it to follow at every interaction with the user and so far it seems to work, though like you said people always have the option to type what they want. But I do disclose in the introduction withe the chat that the best results are choosing from available options opposed to user defined.
I’m also cooking up a method for improving the chats memories with the session at hand, not saving anything but a way for it to read the conversation constantly by rereading "checkpoints that it creates. Still a work in progress but I have learned a lot in the past few weeks.
Thanks for keeping us updated!
If at any point in time you want to share your game with the community we can also update the topic title and make this your development diary.