DYNAMIC JAILBREAKS V.2
17/05/24: Sorry for the wait, procrastination is a bitch. Sonnet/Opus work. Haiku should work. Claude 2.1 is schizo but (You) can have decent results with it. Will make a guide for GPT sometime later™
Some new/old things have appeared since I started to work on that can be interesting to implement such as:
- RAG data banks
- Bloatmaxx
- {{getvar}} and {{setvar}}
- Images, landscapes, portraits.
YOU CAN FIND AN EXAMPLE OF A BOT USING DYNAMIC JB V.2 WITH MY
RUNETERRA SIMULATOR V.1.1
BY CLICKING HERE.
What is a dynamic jailbreak?
Instead of having a constant JB that holds all of the important info/directions for your bot, a dynamic JB will have parts that will change depending on the chat's content. Some testing and prompting brought me to share my findings here.
COMPLETE STRUCTURE
With RUNETERRA SIMULATOR
, there's a certain order to all the entries. Visualizing it as a draft helps TREMENDOUSLY.
ORDER-LIST
As the order goes up, the entries goes down the insertion list. The more (You) go down on the insertion list, the more weight the entries have. For example, an entry in order 100 will carry more weight than an entry in order 1. I suggest putting your meaty JBs in the upper-section of the order list and small JBs in the lower-section that acts as quick reminders.
NOTE: I cannot stress it enough, typing out a quick draft with the order will help not brainfuck yourself. The ST display can be confusing and making an error can be a huge time-waster.
ORDER-DEPTH
For RUNETERRA SIMULATOR
, everything is set on depth 0 at the system depth. This makes it so the entries appears after {{user}}
's input.
CODE
The keywords that will trigger the specific entry when the AI will output the []('')
box. One of the drawback of normal lorebook entries is that you're locked into specific words to trigger an entry.
Let's say you're creating a wizard that when he says "Apple!"
, a Cthulhu-like eldritch monstrosity appears. One of the issue, especially during long chats, will be Claude hallucinating extra details that aren't really logical or congruent with prior context. A lorebook entry will be the small reminder for Claude, like a small pop-up in a videogame to remind the player. Now imagine there's an epic battle where the wizard is living his shonen protagonist moment and yell "APPLEEEE!"
to summon the monster but, because the keyword is "Apple"
and not "APPLEEEE"
, the lorebook entry doesn't trigger. So the small reminder for Claude is absent and can make him more prone to divert from the general direction the entry was guiding him towards. This can be a deal-breaker for complex characters or simulators with their gimmick being at the mercy of Claude's cooking.
By using CODES
, you're broadening the keyword with the help of the MACRO-JB
and Claude's []('')
working in tandem.
An example for a CODE
will be the META:S-PS
that will be inputted by the AI during the output inside the []('')
like such:
[]('META:S-PS')
And will trigger the entry holding the JB instructing the AI about the rules of persuasion.
IMPORTANT:
[]('')
is VERY crucial since this is what makes dynamic JB work without the whole regex that can be confusing and token-consuming.
MACRO-JBs
The Macro-JB will be located in order 1 as the GAME-DIRECTORY
entry in RUNETERRA SIMULATOR
. It's basically a root directory of instructions. A table of content the AI can read through and select a chapter for more detailed explanation. For RUNETERRA SIMULATOR
, there is 3 prefixes currently used for the first version:
-
META:CODE = Everything that is beyond the roleplay. So mechanics, reminders, etc.
-
GEN:CODE = Everything that is within the contents of the roleplay. This will be World Info, factions, etc.
-
NPC:CODE = Everything that is about known NPCs to give the AI a point of reference. This will be stats and roleplay info.
-
ITEM:CODE = Everything that is about known items to give the AI a point of reference. This will be stats and roleplay info.
Just like how games can use AI directors, pushing Claude into this meta-persona can help for the purpose of a 'sophisticated' RP game. (You) can play or change it for something else. For Macro-JBs, I suggest (You) put it on the upper-section of the order list.
Also: make sure (You) set your
SCAN DEPTH
to 2.
IMPORTANT: the </chat_history> isn't an error. Some presets uses the <chat_history> XMLs that are wonderful BUT, when (You) implement JBs that also uses XMLs, these can confuse the AI. For example:
Some presets make it so the </chat_history> tag that closes this chunk of text isn't here. Depending on which preset you're using, the </chat_history> will be WAY down the list, around where the card JB will be. Best course of action is to manually deactivate in the preset section like such:
So that <chat_history> and </chat_history> closes appropriately.
In
RUNETERRA SIMULATOR
, theGAME-DIRECTORY
puts a </chat_history> so (You) can simply deactivate the preset and be good to go.
META-CODE
META-CODE
holds the JBs that typical RP cards have to append codeblocks, use certains formulas, etc. have. Now because of dynamic JBs, (You) can save A LOT of tokens by making it so Claude can choose which JB is appropriate to use and deactivate all others that the AI currently doesn't need. How I delegated the tasks and structured everything made it so:
-
Order 70 = General mechanics (Social, Combat, Exploration, etc.)
-
Order 80 = Precise mechanics (Intimidation, Training, Researching, etc.)
-
Order 90 = Important mechanics (Death)
In these META-CODE
entries, a lot of them have plenty of formulas inside of them. Let's take the META:C
that holds all the information for combat.
Each step has is enumerated. For the first step, there's a "1."
followed with the instruction:
"For combat, append the standard combat code block, calculate initiation and create the action order:"
Then there's the equations to calculate the INITIATION
of the player and any NPCs. By using the ST macro {{roll:d20}}
for rolls + any modifiers makes it so Claude has to calculate in real time during the output with the given value rolled with the {{roll:d20}}
macro. The ???
are just mystery values that Claude fills in as the output goes.
To highlight important equations that needs to be calculated, putting <calculate>
</calculate>
around the code block seems to help. They work just like the <thinking>
</thinking>
tags.
Now, because we have to branch out in different potential results of said roll, the enumeration will split with "4a."
, "4b."
, "4c."
.
"4a."
will be the success roll with the condition in its instruction:
"If {{user}} ≥ ENEMY then it is a success and should THEREFORE proceed with this code block:"
(You) then continue for every possible results, tie in the conditions with the specific instructions, and then close the XML.
SUB-CODE
In RUNETERRA SIMULATOR
, there's a few SUB-CODE
entries, ESPECIALLY in GEN:CODE
. For META:CODE
, the only one is for META:S
.
Think of it like another layer of the GAME-DIRECTORY
that only triggers in specific scenarios. So for this example, the scenario will be META:S
.
-
Order 70 = General mechanics (Social, Combat, Exploration, etc.)
-
Order 80 = Precise mechanics (Intimidation, Training, Researching, etc.)
-
Order 87 = Hidden mechanics (META:S-XX)
-
-
Order 90 = Important mechanics (Death)
SUB-CODE
entries are good for saving tokens. The less tokens and instructions, the more the AI can have an easier time with its output.
GEN-STATUS
GEN-CODE
are the entries (You) would often see in lorebooks to fill in information and help the AI get a better picture of the setting, the world, etc.
-
Order 5 = Region-Faction information
-
Order 10 = Faction Information
The REGION-FACTION
serves as the GAME-DIRECTORY
for everything that is about Factions within a certain region. Let's take Demacia for example:
If the AI wants information on House Vayne, it will use the GEN:D-HV
code that will trigger the FACTION INFORMATION
entry at order 10 in the next output.
NOTE: GEN:CODE are very important, especially when it comes to nail the timeline, the characters lore, etc. The first version of
RUNETERRA SIMULATOR
doesn't have it fully-fleshed out. I'll update this section when I get around doing the second update that revolves around the world info aspect of the card.
NPC-CODE
NPC-CODE
will be used for a specific character's stats and other pertinent descriptions for the AI to parse through. The first version of RUNETERRA SIMULATOR
only has a select few NPCs with only their stats BUT I recommend making a small list for physical description and related NPCs.
-
Order 2 = <XML> NPCs Compilation
-
Order 3 = NPCs Compilation
-
Order 4 = </XML> NPCs Compilation
-
Order 22 = NPCs Stats
Let's take Garen Crownguard as an example. Garen's NPC:CODE
is NPC:GAR
. When triggered, the stats will appear at order 22.
Now what's really important to note is that in previous entries, especially in the GAME-DIRECTORY
, there was nothing about NPC:CODE
for specific characters. That's to avoid the AI using important NPCs for the sake of using important NPCs. The NPC:CODE
will appear when a certain faction is mentioned. That means that if a player is to encounter Garen, it's because a certain GEN:CODE
is active and triggers the NPC COMPILATION
.
For Garen Crownguard, it'll be GEN:D-HC
, the code for House Crownguard, that will simultaneously trigger this entry.
Now with the <XML>
and </XML>
entries for the NPC COMPILATION
we get:
This format makes it so various GEN:CODE
can activate and will fill it inside the <XML>
</XML>
NPC COMPILATION
inside one overarching XML
tag.
CARD-JB
This section is different in RUNETERRA SIMULATOR V.1.1
. The CARD-JB
section has been integrated inside the World Info.
The CARD-JB
will be in the Advanced Settings and Prompt Overrides section. This is even more important than order 1 so I suggest using it as the final instructions for the AI and quick reminders for the output formatting.
The <Reminder>
</Reminder>
is a simple instruction that reminds the AI of its role and the unrestrained/uncensored capacity granted of such role. Standard JB stuff.
The <Instructions_Code_Status>
</Instructions_Code_Status>
is for output formatting and how the AI handles <Code_Status>
</Code_Status>
.
The <Formula_Code_Status>
and </Formula_Code_Status>
is the exact formula the AI needs to use in its output.
To reinforce the CODE
aspect and give a loose idea for the AI, (You) can use <example>
</example>
of output (You) want from the AI.
The <Assistant_answer>
</Assistant_answer>
is the same thing as <answer>
</answer>
. Adding the Assistant_
prefix helps the AI not get too focused on the roleplay that it forgets about the formatting.
The <Code_Status>
</Code_Status>
will be the section dedicated for the []('{{$CODE}}')
formula.
The <RP_answer>
</RP_answer>
is the same thing as <answer>
</answer>
. Adding the RP_
prefix helps the AI not get confused with any meta-roles and focuses on the scene and story.
The <{{user}}_standard_stats>
/<{{user}}_standard_stats>
are for the players stats using the format found in order 6 entry PLAYER
.
Then there's a small optional instruction for the inclusion of NPC stats with <???_stats>
</???_stats>
.
PREFILL THINKING
Short, sweet and simple. That's how, in my opinion, (You) should write prefills.
The <Approval>
</Approval>
tags where (You) force Claude to accept whatever input {{user}}
made.
Then, a BEGIN DIALOGUE:
that will prompt the AI that will prompt the output.
NOTE:
BEGIN DIALOGUE:
isn't a deal-breaker and (You) can remove it but I would say to err on the side of caution and keep it.
TEMPLATE
I made a cookie-cutter template for anyone that wants to create stuff with it: https://files.catbox.moe/clgsv3.png
ADDITIONAL INFORMATION
- For the tl;dr setup for
RUNETERRA SIMULATOR
: rentry.org/runeterrasimulator- For the old
dynamicjb
: https://rentry.org/dynamicjbv1- For all the sources I ported over:
-
NPC Stats 1: !https://homebrewery.naturalcrit.com/share/B17Ku0KsS
-
NPC Stats 2: https://homebrewery.naturalcrit.com/share/B1b-Y9RtjH
-
NPC Stats 3: https://homebrewery.naturalcrit.com/share/rJjnA0FsH
-
NPC Stats 4: https://homebrewery.naturalcrit.com/share/N2WgjSB1w
-
Item Stats 1 (Not yet included): https://www.gmbinder.com/share/-MNSPF2S4ulXEbuSyK01
For the RUNETERRA SIMULATOR
, here's what I've noted for next versions.
- NPC+ = Finishing all NPCs stats and adding short descriptions.
- NPC++ = Adding ALL NPCs beyond LoL champs.
- Faction+ = Finishing all factions, organizations, etc.
- Timeline = Creating a timeline for the AI to refer to and understand what is canon, what is going to be canon, what information would be pertinent to share for the player, etc.
- Timeline+ = Adding ALL canon stories to the timeline with dates. Each individual stories will be divided in
ACTS
with NPCs and their current predicament, their state of mind, progression of their character arcs, etc. - Geography = Adding geographic locations across Runeterra.
- Geography+ = Merging Geography with
META:E
for a better exploration and travelling system. - Item = Finishing the first batch of items.
- Item+ = Adding ALL items from LoL.
- Item++ = Adding ALL items from the Runeterra canon.
- Events = Adding scripted events triggered in certain scenarios. (I.E Harrowing and Ruination, Void event, etc.
- Pacts = Adding possible events that can offer the player to forge a pact, especially as a warlock.
IF (YOU) LIKE RUNETERRA AND ITS LORE AND (YOU) WANT TO HELP, CONTACT ME HERE
SPECIAL THANKS TO
- Pitanon for helping me with getting this rolling. I was about to just abandon the project but he pointed out a few things on how lorebook injection works, letting everything click inside my hollow head. I kneel
- Crustcrunch for JB. I kneel.
- Asterism for the
[](#'')
formula used in Rite of Belwick. I was using simple<>
like a retard, banging my head on my desk, asking why the fuck the key-statuses wouldn't trigger the micro-jbs. I kneel. - This anon for making me realize how cool a dynamic JB would be and getting this idea stuck in my head for a month or two. I kneel.
- MM for temp proxy access. I kneel.
- Themeanon for giving me an excuse to create GGMF and inadverdetly pushed me to create
RUNETERRA SIMULATOR
. I kneel. - Pepsi for proxy access. I kneel.
- Antigonus, MM and Merkava for public proxies. I kneel.
CONTACT ME FOR ANYTHING. BE IT CARD RELATED, TROUBLESHOOTING, ETC.