A Choose Your Own Adventure with ChatGPT

The forge in the Jeweled Halls thrummed like a heartbeat, heat rolling in waves over Moin’s brow. His hammer struck the rocket’s outer casing in a rhythmic dance—clang, pause, adjust, clang—each blow coaxing the metal toward a polish so flawless it might blind the first onlooker at launch. Sparks leapt like golden fish in a stream, and he smiled at the thought of the rocket gleaming against the dawn sky.

So begins the story I’m designing with ChatGPT, a story about Middle Earth 1500 years after the fall of Sauron and the beginning of the Fourth Age. Men are about to launch a rocket into space, but the elves are afraid it’ll reveal a secret they’ve long held.

What’s more this story is a choose your own adventure, dynamically changing based on the user responses to decision points. 

How you might ask?

While there are sophisticated techniques using a series of AI agents, such as this one outlined by IBM. I wanted something simpler. Something I could create without code or server processing power. Just something me and my ChatGPT Plus license could manage. 

What I came up with… well it wasn’t just me. Developing this GPT required a back and forth with ChatGPT. A lot of back and forth. By leaning heavily on the new model 5 capabilities, I sped up my process so I could focus on what I enjoyed most, the creation of the world and the characters. 

 Here’s some lessons I learned.

Instructions versus Reference

For those of you unfamiliar with custom GPT’s, you have the ability of adding instructions that act like extended prompts each time a user types something. In these instructions, you can specify how the GPT should react for each and every prompt. For example, for my story telling GPT, I added instructions for the Story role and scope of the interactions (see image).

Besides the instructions, I can also add reference documents for the GPT to consider when its necessary. When is it necessary? That’s for it to decide. However, you can think about reference documents as just long term memory of things needed occasionally, but not each and every interaction. For my reference documents, I included a character sheet, where I defined the main characters, the secondary characters, and any bit characters I though might be interesting to include. The custom GPT references that character sheet occasionally as it changes scenes. I also include a “History of Fourth Age” document to help establish the context of the story. 
With these two features, I have a fair amount of control over the story telling. However, it was missing one last thing. 

Short term memory

If you think of a normal computer, there’s a similar architecture for all of them. Input goes into processing, which results in an output. Some of that output goes into long-term memory. And processing needs access to working memory. 

The working memory is necessary for maintaining the story over the long term. Without this feature, decisions made earlier might contradict what happens later in the story. That wouldn’t do. 

After some discussion with ChatGPT about memory, I discovered the limitations of these custom GPTs. For “memory” there are three options: 

  1. Knowledge items. The GPT cannot edit the knowledge references. Those documents are read only. 
  2. Memory feature. Persists with just the user. The creator of a GPT has no access to it and cannot modify a GPT to work with that memory. 
  3. In-line chat log. A log of character interactions could be included with the chat that is returned to the user. The user would be able to see that log. 

None of these options are ideal. Obviously, the first is read only. A problem with a dynamic story. The second does not capture details of the story, only that the user is in a story. The third ruins immersion with the story. 

But alas, those are my options. 

For now I’ve opted for the third option. It hasn’t been horrible in a couple playthroughs I’ve done. But see for yourself:

The Shattered Realms of Middle Earth

But the process of building this tool has helped me learn a lot about the limitations of custom GPTs. 

You may also like...