Downloads · 30 days
0
sphiratrioth666/Lorebooks_as_ACTIVE_scenario_and_character_guidance_tool
Lorebooks_as_ACTIVE_scenario_and_character_guidance_tool is a machine learning model from sphiratrioth666. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-4.0.
Hey all. I was experimenting with Silly Tavern lorebooks and I found a great, non-obvious way of using them. I call it a procedural guided generation - following the idea of SillyTavern creators for what lorebooks cou…
Downloads · 30 days
0
Access
Public
Updated Jan 24, 2025
Repo size
—
Likes
37
Public
Click a slice to open those files.
.json24.6 KB · 75%
From the Hugging Face model README
Hey all. I was experimenting with Silly Tavern lorebooks and I found a great, non-obvious way of using them. I call it a procedural guided generation - following the idea of SillyTavern creators for what lorebooks could be in the future anyway, haha. It turns out that we are able to precisely guide our LLM during roleplay by triggering instructions from a lorebook - not inserting lore/info but influencing the actual {{char}} behavior, determining results of our actions, rolling different world states such as weather etc. It works like OOC (out of character instructions) but on steroids. With a properly prepared lorebook, we can automatically roll a positive/negative results of our actions, to combat a positive bias of the LLM but not only that. It's possible giving all kinds of auto-triggered instructions from a lorebook. Want a character to behave in a particular situation or to stick to its personality better? No problem. Want to add flavor or diversity to your roleplays? It all becomes possible.
![]() |
|---|
| Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License (https://www.goodfon.com/fantasy/wallpaper-the-lord-of-the-rings-sauron-dark-lord-metal-helm.html) |
<b>Example Lorebooks:</b>
<li>Navigate to the files depository of this post, download two exemplary lorebooks: "Busy at work" and "TTRPG - Resolution Mechanic". Try them out, check on how they are written and use them as a template to write your own!</li> <li>Lorebooks are located in (...)\SillyTavern\data\default-user\worlds. Just copy-paste my files or import them through SillyTavern import button.</li> <br> <h1><ins>How to write your own lorebooks:</ins></h1><b>1. Create a lorebook in Silly Tavern (I will not teach you in detail how to do that, my appologies - you need to find a guide online, there are many of them and it is actually super simple (for instance - read this: https://rentry.co/world-info-encyclopedia).
<b>2. Create the entries with your lorebook and put them in the same group - add multiple entries first, each representing a given instruction or anything you want to happen in a given situation (like table of results of dice rolls in TTRPG). So for instance: entry1: {{char}} is currently busy, entry2: {{char}} is currently free, entry3: {{char}} will not answer a phone because something happened, do not reveal the {{char}} circumstances yet.</b>
Each entry must have: a) the same trigger words, b) position = (System) (entries inserterted as system are will be sent to the LLM right with a message you type but automatically and they do not appear in a chat - so they work even if models do not understand OOC and if they do - it is still a more elegant, immersive and smooth experience, it does not eat up tokens because instructions will be deleted from a context automatically), c) depth = 1/0 (it determines if instruction is sent before your actual chat message or after, it does not seem to make a difference to LLM but if you want it to be more elegant in context inspection, use depth = 0), d) order = 100, e) trigger = 100, f) Prevent further recursion option: ON (entry will not activate other entries), g) group weight = 100/number of entries within your group (100 divided per total number of entries in a group) (it is super important since weight determines the probability of a given entry being randomly rolled, you can adjust probabilites for each entry but always keep the whole weights sum within the same group = 100), h) sticky = 4 or more/less (it makes the instruction for LLM remain active for a given number of the following messages - so it actually triggers logically within the scene, LLMs seem to understand it and do things under logical circumstances in the scene).</b>


<i>Remember, you can change the weights to trigger different events with different probabilities but do not leave them at 100 even if you want to roll from 2 entries in a group. Use 100 when you do not want to roll but trigger the entry through a trigger word, use 100/number of entries in a group (100 divided per total number of entries in a group) if you want to roll randomly which entry will be inserted.</i>
<b>3. Write instructions inside of the entries. They must be short, clear and include a specific phrase if you want something to happen now: "WILL INSTANTLY". Do not ask me why but otherwise different LLMs more often fail in following the instruction. I've tried Mistral, LLAMAs, Qwen, Gemma and other tunes - all behave in a very similar manner.</b>
Template: {{char}} will instantly [ACTION YOU WANT CHARACTER TO PERFORM] or [EVENT YOU WANT] will instantly [HAPPEN}. Something like: "enemies will instantly attack {{user}}" or "road ahead will instantly turn out to be blocked".
Again, it seems that a phrase "will instantly" is the best working trigger.


<b>TRICKS:</b>