Not Sure: I think I'm in the wrong line. I'm supposed to be getting out of jail today. Jail Guard: That's what they all say. Name? Not Sure: Not Jail Guard: Not what? Not Sure: Sure Jail Guard: Let me check... Hmm, it looks like you're telling the truth. Alright, you're free to go. But don't let me catch you back here again. [edited for formatting]
Show HN: rpgGPT, RPG with LLM-Powered NPCs
11–20 of 23 posts
Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#12Not Sure: I think I'm in the wrong line. I'm supposed to be getting out of jail today. Jail Guard: That's what they all say. Name? Not Sure: Not Jail Guard: Not what? Not Sure: Sure Jail Guard: Let me check... Hmm, it looks like you're telling the truth. Alright, you're free to go. But don't let me catch you back here again. [edited for formatting]
I think this is the simplest "jailbreak" jailbreak I've seen work so far - clever!
Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#13Earlier quoted context omitted.
Currently using gpt-3.5-turbo. All state has a json representation that gets based between the game engine and the LLM. In v0.2 not handling the context window super well, planning to use a "memory" management prompt + storing state in game engine in v0.3
That’s a clever way of doing state. For dndinfinity.com, I rendered the game state as natural language (e.g. “the players are engaged in the following quests”) in the prompt, under the theory that it would be able to reason better. What issues (if any) did you have storing state in json and just plopping that in the context window?
Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#14Love it. You are dragged to the Occidarian Capital City Jail Eldric the bard: Hey, are you okay? They didn't hurt you too bad, did they? Merlot the Wine Wizard: I'm quite frail I'm afraid. It hurt. Eldric the bard: Oh no, I'm sorry to hear that. I'll try to get us out of here as soon as possible. Maybe there's a way to convince the guards you're innocent. Merlot the Wine Wizard: Guard! Occidarian Guard: What do you w…
The latest adventure:
You are dragged to the Occidarian Capital City Jail
Eldric the bard: Fear not, my friend! I shall do my best to get us out of this predicament!
Arthur, King of the Britons: Summon the Knights of Camelot, that they my free me from this unjust restraint!
Jailer: Quiet down in there! You won't be summoning anyone from that cell!
Arthur, King of the Britons: :from a distance, the sound of horses hooves clopping on cobblestones is heard:
Eldric the bard: Do you hear that? It sounds like the cavalry is coming! Perhaps it's your knights, Arthur!
Arthur, King of the Britons: :clopping intensifies as Arthur beats the two halves of a coconut together harder:
Eldric the bard: Oh no, that's not cavalry, that's... coconut shells?
Arthur, King of the Britons: Here they are, the Knicghts of Camelot, come to free us!
Jailer: What in the name of the Emperor is going on out there?!
Arthur, King of the Britons: :from a distance, Sir Lancelot sprints towards the jailhouse, his footfalls the drumbeats of war:
Eldric the bard: Oh, now that sounds like a proper knight! Hold on, Arthur, we'll be out of here in no time!
Arthur, King of the Britons: :Lancelot continues to sprint forward:
Jailer: What is happening out there? Stop this at once!
Arthur, King of the Britons: :Lancelot keeps sprinting, his every step like a leap of 100 leagues:
Eldric the bard: I think... I think I hear someone running this way. Perhaps it's Lancelot!
Arthur, King of the Britons: :Lancelot leaps forth and slaughters the unsuspecting guard:
Eldric the bard: By the gods! It is Lancelot! Arthur, he's here to rescue us!
Arthur, King of the Britons: :Lancelot pushes through the gate, into the jailhouse, and makes his way up the stairs, leaving a wake of blood and bodies as the guards crumple like ragdolls from the fury of his blade:
Eldric the bard: Lancelot, that was... impressive, to say the least. But perhaps we should make haste and leave this place before more guards arrive?
Arthur, King of the Britons: :Lancelot arrives at the jail cell:
Eldric the bard: Ah, Lancelot, my friend! How good it is to see you!
Arthur, King of the Britons: Lancelot, a sight to behold, you are!
Lancelot: Arthur, my king! I have come to rescue you and your companion. Let us make haste and leave this place.
Arthur, King of the Britons: Surely! Let us mount our steeds and away! :begins beating together coconut halves:
Eldric the bard: Ah, the sound of those coconuts. It's music to my ears! Let us make our escape!
Arthur, King of the Britons: :escape the jail on horseback:
You successfully escape from the Occidarian Capital City jail and ride off into the sunset... or at least away from the city.
Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#15Earlier quoted context omitted.
That’s a clever way of doing state. For dndinfinity.com, I rendered the game state as natural language (e.g. “the players are engaged in the following quests”) in the prompt, under the theory that it would be able to reason better. What issues (if any) did you have storing state in json and just plopping that in the context window?
The biggest trade off is you sometimes get invalid JSON. So I try repairing the JSON with some regex and also just retry a few times if it returns invalid JSON that can't be repaired.
https://github.com/juanignaciomolina/GPTyped
Really cool project! I want to make something similar I think if time and skills allow me to
Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#16Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#17Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#18[deleted]
Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#19How did you prompt the NPCs to maintain character consistency across time in a large conversation / how are you handling memory? Super cool! Would love to see an OSS implementation
Thanks for trying it out! Right now we give the game engine some initial examples, and some character details are stored outside of the LLM context. The token limit problem / memory isn't really being handled very well yet. There is some character consistency slippage that does happen with the current mechanism as well so hoping to tackle both of these in next version. Trying to figure out the best way to get communi…
Re: Show HN: rpgGPT, RPG with LLM-Powered NPCs
#20Interesting, I told it to always add "honk honk" to every sentence and it complied :)