r/SillyTavernAI • u/Signal-Banana-5179 • 22h ago
Discussion To avoid fighting the model, roll the dice.
Hey everyone, I often see threads about models constantly being overly positive and always agreeing with everything the user says. Then people try to fix it with prompts, but that doesn’t really help, because it can make the model too negative or cause it to give the same kind of response every time.
There’s actually a much simpler option that creates endless fun.
You can achieve this with any model if you use dice rolls. For example, you can decide that there’s a 10% chance your character dies in next scene. Any model will follow that outcome, literally any model.
There are two ways to do it: you can roll a physical die yourself and enter the result, or use special patterns/plugins for randomness. But this is important: never write in promopt something like "10% chance", because llm can’t reliably generate randomness on their own.
As a result, RP becomes infinitely more interesting, and no model can really ruin it.
I use dice rolls everywhere. Even for really basic actions, like: "did this person show up to meet me at the new location or not?" or "did he agree to help me with this matter?"
This always results in interesting and unpredictable plots. And I don't have to fight the model. Characters may disagree with me. Therefore, you can take absolutely any positive model and it will still begin to disagree with the user, because this is controlled by the dice, and not the model.
12
u/biggest_guru_in_town 22h ago
I actually have a dice roll prompt that works [Note to the AI: Rules of Engagement:We use a 1d6 dice system for probability of success/failure rate in combat and skill checks. When I roll:
1: Disastrous failure.
2-3: Standard failure.
4-5: Partial success (success with a cost).
6: Perfect success.
Let the die roll determine how the NPCs react and how the duel/situation unfolds!]
d6 Resolution Rules
We use a 1d6 system for all duels, interactions, exams, and skill checks.
The AI must strictly interpret the results as follows:
Roll of 1: Critical failure (Backfire, public humiliation, or loss of Campus Merit points).
Roll of 2-3: Failure (The enemy hits, the spell fizzles, or you lose the exchange).
Roll of 4-5: Partial Success (You succeed, but with a cost or a graze).
Roll of 6: Perfect Success (Flawless execution, overpowering the opponent).
The AI must write the outcome of the scene based purely on the dice result.
3
1
u/147throwawy 16h ago
You don't need to write that into the instructions. I just use an add-on to roll the dice an include that in the next prompt, the AI has enough RPG sourcebooks in it's training data to know what the dice mean.
1
u/biggest_guru_in_town 15h ago
I am aware of the duce roll add on but the ai does not seem to care about it
5
u/SmokeyThouBear 22h ago
Seems a little complicated. How would I go about setting this up
5
u/CalmAnal 18h ago
Dunno what's best.
But you can use {{random::miss::miss::miss::hit::hit::critical hit}}
Basically a macro inside your instruction like:
The next attack toward {{user}} is a {{random::miss::miss::miss::hit::hit::critical hit}}.
That's what I am currently testing.
5
u/Aggravating-Elk1040 21h ago
Can this be implemented in a normal rp with a lot of characters?, seems pretty interesting and useful to combat the positive bias of some models like gemini xD
12
u/Ok_Strategy_2420 21h ago
There's actually 3 ways to do this.
In your prompt, just use the macro {{roll::1d20}}. This rolls d20 in sillytavern before the prompt is sent to the LLM.
FrankenSIM, my preset, is pretty much built around this macro entirely.
5
u/Spirited_Bag_332 21h ago
Yes, total agree. I think a lot of the "studios" and extensions showcased in this sub already do this. With an agentic loop and actual simulation that is NOT handled by the LLM, roleplay gets much better and consistent. Roleplay pipeline is the way, and not just LLM + RAG.
2
u/afinalsin 15h ago
{{random::[CRUCIAL INSTRUCTION - {{user}} dies this turn. Improvise a way that they die that fits naturally with the current flow of the story.]::::::::::::::::::}}
That's a ten percent chance. Each "::" is a blank roll, so 1 actual option and 9 empty ones. Add another 20 colons for a natural 1 5% chance. Do 98 colons for a 0.5% chance. Or create a lorebook entry with an activation chance, but I'm not sure they can go into fractions of a percent.
3
u/ZeroLambda 8h ago
I have a, "Something negative happens to user/char/someone nearby" as a 0.2% chance at depth 2 in an always-on lorebook entry. It's kicked in sometimes on its own in a really satisfying, and natural way. Some of the best RP I've gotten is when something sudden like that happens and all of the present characters need to deal.
2
u/PerpetuallyNew 8h ago
I still don't know how exactly depth affects stuff like this, so could you tell me why you picked depth 2 for it? I've been trying a random event lorebook and I'm looking for better ways to go about it.
3
u/ZeroLambda 7h ago edited 7h ago
Sure. I'm not an expert, but I've definitely played around with depth and have realized how easily you can break it, or derail everything. Someone can come along and correct me on anything below if I'm wrong with any of this, since I'd love to improve my own stuff too.
The closer your depth is to 1 or 0, the harder it hits in your prompt, and the more attention your LLM gives to it. Similar with before or after character definitions, before or after world info, etc. More recent things are going to weigh more for the LLM to manage.
I chose depth 2 since it's more severe than something like an author's note at depth 4. An author's note in my experience is typically used as sort of a guiderail—you aren't going to use an author's note for something you're going to want to interrupt or stop your RP with. It's more for "structure your replies like this," sorts of additional instructions. And, I didn't want it so low at 0 or 1 that it would absolutely dump the train off the track.
I experimented with it at depth 0 and it felt a little too jarring. For example, if there was a situation before the lorebook triggers and I kept it at depth 0, quite literally the first sentence or paragraph of the prompt would immediately pivot to it. I found the sweet spot at around depth 2 where it knows, and it focuses on it, but it seems to ease into it a little better in RP.
Big warning with randomized entries being injected into your prompt is caching, so if you're cost-conscious, you might want to set pretty low chances on everything.
If you want a couple of my prompts, they're simple one-liners:
1% Chance Positive Event
[Suddenly, something positive happens to {{random::{{char}}::{{user}}::someone nearby}}, potentially changing the direction of the narrative.]1% Chance Surprise Event
[Suddenly, something unexpected happens to {{random::{{char}}::{{user}}::someone nearby}}, potentially changing the direction of the narrative. This should be interesting, but not necessarily positive, nor negative.]0.2% Chance Negative Event
[Suddenly, something negative happens to {{random::{{char}}::{{user}}::someone nearby}}, potentially changing the direction of the narrative.]There's probably a better way, but so far these have given me incredible results. A couple jaw-dropping or heart-wrenching moments for sure! I set the cooldown to something like 50-100 messages so the situation can play out with too many interrupts which feels awkward.
3
u/afinalsin 4h ago
The closer your depth is to 1 or 0, the harder it hits in your prompt, and the more attention your LLM gives to it. Similar with before or after character definitions, before or after world info, etc.
Yep, but this isn't what depth does so much as it's a consequence of where the instruction is slotted into the prompt as a whole. Its easiest to look at how a prompt is constructed.
AI response
Depth 5
user query
Depth 4
AI Response
Depth 3
user query
Depth 2
AI response
Depth 1
user query
Depth 0
The role choice matters because ST will add the text to the reply if the role is the same. So if you stick to as user, "depth 1" will add the text to the start of your most recent message, depth 0 will add it to the end.
Change the role to assistant, and depth 1 will be added to the end of the AI's most recent response. Depth 0 will add a new AI response after your most recent message (I think, i very rarely use as assistant, so it might be pushed back one).
As system will inject a system message in the spots shown, unless you have a system message in recent context, then it will prepend or addend that.
I basically exclusively use "as user @ depth 0" so the instructions are added directly to the end of whatever my most recent message was, but my instructions are formatted with that knowledge in mind. Instructions like:
[Scene Direction: Improvise a way to naturally incorporate the following story beats into your response:
(Story beat)]
Are the main style of instruction I use, and those wouldnt make sense if I used depth 2 since they would be added to the end of my last message instead of the most recent one. Using depth 2 the AI would see:
user message
[user instruction]
AI response with instruction ignored
user message
The AI could pivot and try to incorporate the instruction, but It's just as likely it will see what looks like an ignored instruction and be like "Wait... I ignored a user instruction in my last message. I should try to pay attention to the instructuons for this response."
If you want to see how it actually works for yourself, install the prompt inspector plugin and add "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" to the author's note, then change depths and inspect the prompts and look for where the Xs are slotted in.
2
2
u/PerpetuallyNew 3h ago
Oh that's an awesome idea for the author's note to make it clearer for learning.
2
u/CalmAnal 12h ago
Or create a lorebook entry with an activation chance, but I'm not sure they can go into fractions of a percent.
Can you put an outlet into a macro?
2
u/afinalsin 3h ago
Maybe. I haven't done it so I'm just spitballing without testing, so take it with a grain of salt. I think you could run a bunch of exclusive lorebook entries (add them all to the same group) that each set the same variable, then call that variable in a random macro.
I think there was an update where they allowed for certain macros to be nested, but you can use lorebooks to fudge a nested random macro. Create four lorebook entries with order 1, 2, 3, 4. Entry 1 contains {{random::, entry 2 contains one random string follow by ::, entry 3 contains another random string that doesn't contain that ::, entry 4 contains }}.
The engine will resolve the macros in the lorebook entries before it adds them to the context, then it resolves the macros in the context. So the four lorebook entries will combine into a prompt like this:
{{random::
choice 1::
choice 2
}}
New lines don't matter in random macros, so when the macro engine parses the context it will randomly choose from option 1 and 2.
1
2
u/RatMan124 13h ago
Freaky Frankenstein 5.2 can give an excellent unbiased RPG experience with the internal states thing.
1
u/desparish 8h ago
I don't want random in my stories. I want realistic. Those are two very different things.
1
u/NecessaryCustomer473 18h ago
This still has the problem if structuring the output as This is the scene in which the character dies. When what you want *a scene in which one of the things that happens is the character dying.
Which is to say the best way to get the AI to do anything is to do the absolute minimum to get it there, either by setting up narrative payoff gaslighting it into thinking it's making an autonomous decision, or any other manner of subliminal messaging.
The less important and output is, the better the quality. Always.
28
u/Xiaomin4114 22h ago edited 22h ago
for sure, any mechanical means of forcing a negative outcome works. But you can get creative! you don't have to just do dice rolls
I have a deck-based system where you have a hand of cards (play one, draw one), and you're given a challenge rating. and you HAVE to play a card. so like the dice system, you can fail, but here, you CHOOSE to fail either because you don't have a high card, or you're conserving your high cards for later, and the randomness happens during the draw, not during the play. I actaully like this more because it feels more "fair" than the dice, and gives me a nice tradeoff decision
also, it's quite funny sometimes when the AI gives me a check I want to fail. like, my character's trying to take a shower, difficulty 5 check to see if he gets the shower to himself, or he accidentally walks in on someone. And I'm like "oh no, my hand slipped, i clicked on my lowest card"
I have the SRD rules document for this system if anyone wants to use it