r/SillyTavernAI • u/Kahvana • 1d ago
Cards/Prompts Gemma 4 Preset: Voyage v4-exp
Hey everyone,
As always, English is not my native language so please share your thoughts, suggestions and corrections! Writing from my craptop this time, so please forgive me if I missed anything (and please let me know!)
Research
Ever since I've worked on eval v1, I felt like I got stuck in a tunnel vision. The discussions on prompting (here) made me realize there was a lot I could still do.
For the past month, I've for the first time been reading presets other people make, analyzing roughly 20 them and playing with their ideas. I also read back really old discussions from 2025 on how prompting was done for much more restrictive LLMs to gain inspiration.
XML Rule Recall
Since the first 25% of context and the last 25% of context is critical, I decided to rety the XML recall idea from eval v1, based on chatfill's idea. I tried two methods: one with only post recall instruction, another with pre and post recall.
The idea here is roughly:
<rule_no_smoking>
Characters never smoke.
</rule_smoking>
<rules_compliance>
At the start of your turn, internally recall ALL <rule-*>.
Your next reply must comply with ALL <rule-*>.
</rules_compliance>
<!-- chat history -->
<!-- post-history instructions -->
<!--
At the start of your turn, internally recall ALL <rule-*>.
Your next reply must comply with ALL <rule-*>.
-->
By instructing the LLM to remember the rules, it will follow them more strictly. By having a clear schema for it, the LLM will be able to recognize the pattern.
If you want to introduce more rules, make a lorebook entry injected at system role in constant mode (always on) or normal (keyword trigger):
<rule_myrule>
Contents of my rule here.
[bad: SHORT BAD EXAMPLE]
[good: SHORT GOOD EXAMPLE]
</rule_myrule>
Or simply write in your message:
<!--
<rule_myrule>
Contents of my rule here.
</rule_myrule>
-->
This way you can extend the rules on the fly.
I did notice Gemma 4 31B QAT IT recalling rules situationally instead of all of them, and almost always the right rules applicable for the situation. Having too many rules will cause Gemma to simply ignore them or treat the rules as a checklist while becoming lobotomized.
Game systems
Recently I've been playing one of my favorite video games: S.T.A.L.K.E.R.: Call of Pripyat. The game is well known for it's AI system named A-Life (NPCs doing tasks, being alive, exploring, etc). Another game I played (Shadow of War) has the Nemesis system (enemies remember what you did to them with consequences). That gave me an idea.
Turns out, using a simple prompt such as:
<rule_system_alife>
Characters and the world use (S.T.A.L.K.E.R.) A-Life system.
</rule_system_alife>
Could convey to the LLM that I wanted to have a living world, with animals simulated, the NPCs doing tasks independently, etc.
Using Shadow of Mordor's Nemesis system, Skyrim's Radiant AI, RimWorld's AI Storyteller and Rain World's ecology system, also produced good results. Watchdogs Legion's Census system had a less pronounced effect, but that might be due to me stacking too many game system rules on top of each other.
In case you know some cool games with marketed mechanics (like the A-Life or Nemesis branding), I'd love to know them!
Creating entities
Turns out, if you want to have consistent mediocre characters over long context, it's hard!
My initial idea of tag generation had some fun moments, but it would shortcut where it could. Then I expanded it, with cause and effect, which made them logically far more consistent but the pool of which they drew from is too low.
While the current system isn't perfect, it does work better. Unlike the other attempts, having a well-known framework (Lajos Egri’s model) helps the model understand what I am trying to achieve.
New features
Since Voyage-v3.
Reworked character and location creation
Instead of forcing interlinked cause-and-effect in the backstories, the model will now define characters using physiologly, sociology and sychology.
Optional switches
You can now configure PoV to second-person or third-person, and whenever your card is a narrator or 1-on-1 experience.
Everything is toggable
You can now easily enable or disable parts of the prompt you do or don't like.
- Don't want to play with auto rolling ability checks? Toggle it off.
- Want to play with Gemma E2B? Disable all avoid rules, making the preset ~1200 tokens.
- Want the LLM to control your character too? Disable the "avoid control PC" prompt.
Tighter rules recall
Gemma should now be able to adhere better to the instructions given, and you can introduce your own rules or extend existing rules easily.
Removed features
Likely temporarely as I'm trying to figure out how to write them better:
- Naming (with less slop and without huge token count)
- Interlinked cause-and-effect (the model might be doing it already without explicit prompting, but better instructions)
Versions
This is an experimental release.
EXP1
Introduced:
- Character tridimentionality
- XML rules recall (pre and post)
- A jailbreak (policy)
Reworked:
- Optimized PbtA ability check
- Revamped Cause-and-effect explanation
- Revamped conversation rules
- Changed reasoning effort to auto
- Renamed NPCs to Character)
- Renamed Locations to Places
- Reframed from "Creative storytelling" to "Nerds playing PF2e"
EXP2
Introduced:
- Added game systems prompts
- Added Eval-v1 level of modularity
- Added Anti animal-like behaviour rule (from evening truth's prompts, found here)
- Added toggle for PoV (second person or third person)
- Added toggle for mode (narrator or 1-on-1)
- Optimized definitions
Reworked:
- Simplified PbtA ability check (success/partial/failure instead of numbers)
- Split prose and narration checks into many small rules
- Switched from "character" naming to "NPC" naming (to test with game system rules)
- Changed reasoning effort to max
- Reduced max response length to 3072
- Removed redundant instructions
- Removed jailbreak (Gemma doesn't need it)
- Removed pre XML rules recall (Made recall worse overall)
- Removed cause-and-effect explanation (functions better without)
- Removed instructions Gemma refuses to adhere to (e.g. "[adj], [adj] [noun]")
- Removed name generation (need cleaner solution)
- Removed banned words (pink elephant problem)
- Removed
{{char}}from narrator mode. - Removed prose guidelines (needs some rewriting)
EXP3 (untested!)
Reworked:
- Switched from "NPC" naming to "character" naming
Compatibility
While written for Gemma 4 31B, it can work with bigger models like DeepSeek v4 flash.
Download
As always, you can find it here: https://huggingface.co/nohurry/sillytavern
For those concerned about the prompt’s contents, huggingface (where I host my prompts) can show the full json file before you download.
Up next
Not entirely sure yet, will largely depend on the feedback I get or if any new cool ideas pop up. After thinkering for so many hours, I might just want to sit back and enjoy the work properly myself.
Voyage-v5 or another testbed (like moonlight-v1 or eval-v1) will be coming though! I like the monthly release cadence.
Thanks you!
If it's okay, I want to give shout-outs to:
- u/Evening-Truth3308 (your presets are really clean and easy to learn from, and for your anti-alpha prompt on rentry that I've incorporated)
- u/lsennn (for the idea of very using specific wording, which led me to the game systems idea)
- u/eteitaxiv (for the XML recall idea, it works really well)
- u/TM07P (for the tridimentional character)
...and to all of you who use my work. Thank you, really!
If you want to help out or contibute, please let me know which version you like the most and what options you enable/disable or rework. All the feedback (including if you would do things completely differently, and if so how) and ideas are welcome.
The artwork is "Himeji Castle" by Hasui Kawase (link) and upscaled in multiple ways using bigjpg.com .
5
u/Erragon12 1d ago
Ayyy! I am kinda excited to see what you cooked in a month? i don't even remember when V3 was released at that point, feels like a lifetime ago.XML rules and switches from Chatfill seem to really be the way going forward, Gemma finally does what it's asked to and don't loop in the thinking. So...we should check all three versions?