
Master lorebooks in SillyTavern: from creation to advanced keyword triggers, character-specific books, and troubleshooting.
A lorebook in SillyTavern is a JSON-based file containing entries—each entry has a set of keywords, a depth/priority level, and a block of text describing a character, location, item, or event. When a keyword appears in your chat history or your latest message, SillyTavern injects the corresponding entry into the AI's context window (usually near the end of the prompt, via the "post-history" insertion mode). Entries can also be set to "constant" so they always load. The system supports up to 1000 entries per lorebook, though the practical limit depends on your context size (e.g., 4096 tokens for most free APIs). Each entry has a "secondary key" field for multi-word triggers, and a "probability" slider (0-100%) that controls whether the entry fires every time or only sometimes—useful for random encounters. You can also assign a "role" (system, user, assistant, or character) so the entry is formatted as dialogue. Lorebooks are saved as .json files in the /data/default-user/lorebooks/ folder. The key advantage is that lorebooks offload memory from your main character card, keeping the AI focused on the current scene without forgetting established facts.
“A SillyTavern lorebook is a collection of character, world, or event entries that inject contextual information into AI roleplay conversations, triggered by keywords. Lorebooks function as dynamic memory banks, allowing characters, locations, and plot details to be recalled automatically without manual prompting.”
Open SillyTavern, navigate to the "Lorebook" tab (the book icon on the left sidebar). Click "Import" to load an existing .json or start fresh with "Add Entry." A blank entry has these fields: Primary Keywords (comma-separated, e.g., "tavern, inn, bar"), Secondary Keys (alternative triggers, e.g., "The Drunken Dragon"), Content (the text injected when triggered—keep it under 300 tokens for efficiency), Depth (integer from 0 to 50; higher depth means the entry is placed closer to the AI's attention—use 10 for basic facts, 30 for critical plot points), Probability (100% = always fire, 50% = half the time), Role ("system" for narration, "character" for in-character dialogue), Group (for organizing multiple entries under a tab), and Is Constant (check this to always load the entry, ignoring keywords). For a tavern, set keywords to "tavern, inn, barkeep," content to "The Rusty Nail Tavern has oak tables, a roaring fireplace, and a mute barkeep named Gregor who communicates via chalkboard." Depth 10, probability 100%, role system. Save. Test by typing "I enter the tavern"—the AI should now mention Gregor.
Beyond simple keyword matching, SillyTavern lorebooks support regex triggers via the "Secondary Keys" field by enabling the "Regex" toggle per entry. Use patterns like \bsword\b|\bblade\b to match both words. Probability sliders let you create unpredictable lore: set a "hidden door" entry to 20% so the AI only mentions it occasionally, forcing exploration. Role tags (system, user, assistant, character) control how the entry is formatted. "Character" role entries are injected as if the companion said them—useful for NPC backstories. "System" role entries remain neutral narrative facts. You can also use the "Group" field to organize entries into collapsible groups (e.g., "NPCs," "Locations," "Quests") for easier editing later. A powerful trick: create an entry with keywords like "*" (wildcard) and set probability to 1%—this injects a random ambient detail (e.g., "the air smells of rain") into every scene. Depth matters more than you think: entries with depth > 30 are placed after the main prompt but before the latest user message, making them more influential. Experiment with depth 1-5 for passive world facts that shouldn't override the active scene.
Start chatting with a companion who actually remembers you.
Free. No tokens. No limits.
SillyTavern lets you attach lorebooks to individual characters or activate them globally. Character-specific lorebooks are ideal for companions with unique backstories or items (e.g., a wizard's spellbook that only triggers when chatting with that wizard). To assign, open the character card, go to the "Advanced" tab, and select a lorebook from the dropdown. World lorebooks load for any character and are best for persistent locations (a tavern that appears across multiple adventures) or universal rules (magic systems, geography). The rule of thumb: if the lore applies to one character, make it character-specific; if it applies to the setting, use a world lorebook. You can also stack up to 5 lorebooks per character (via the "Lorebooks" tab in the character editor). Overlapping entries across lorebooks can cause conflicts—the AI might get confused if two entries define the same location differently. To avoid this, use a hierarchical naming convention: "World_Tavern" vs. "Character_Wizard_Spellbook." Performance-wise, world lorebooks scan all keywords on every message, so keep total entries under 300 across all active lorebooks to avoid lag with large context windows.
The most frequent issue is entries not firing. First, check that keywords actually appear in the chat—case insensitive, but exact match (no partials unless regex is enabled). Second, verify the entry's probability isn't set to 0%. Third, ensure the lorebook is enabled (toggle in the Lorebook tab). Fourth, confirm the entry's depth is not so low (e.g., depth 0) that it gets truncated by context size—SillyTavern prioritizes entries with higher depth when the context window is full. Another pitfall: overloading the context. If you have 50 entries with depth 50, they'll all compete for the limited token space. Use depth sparingly (depth 1-10 for most entries). If the AI ignores lore, open the "Prompt Item Manager" (the cube icon) to see exactly what's being injected. Look for your entry in the "Lorebooks" section. If it's missing, the keyword didn't match or the entry was too deep and was cut. Also, long entries (>200 tokens) are often truncated; keep each entry under 150 tokens. Finally, avoid duplicate keywords across entries—the first entry matched (by depth, then order) takes precedence.
Lorebooks aren't just static encyclopedias—they can drive evolving narratives. Create a "Plot Hook" entry with keywords like "quest, task, mission" and content that generates a new objective each time (e.g., "You hear rumors of a lost mine in the mountains."). Pair it with probability 50% so not every mention yields a quest. For time-sensitive events, use a "Constant" entry with a date (e.g., "The harvest festival begins in 3 days") and update it manually as days pass in-game. You can also chain lorebooks: a triggered entry might include a keyword that fires another entry (e.g., the tavern entry triggers "Gregor"). This requires careful keyword design. Many advanced users store character inventories as lorebooks: each item is an entry (keywords: "potion, health potion") with content describing it. When the player says "use potion," the entry fires and reminds the AI of the item's effects. For truly dynamic worlds, consider using [SillyTavern's Extras](https://github.com/SillyTavern/SillyTavern-Extras) with lorebook integration—though that requires additional setup. The ceiling is high: some users run lorebooks with 500+ entries for sprawling RPG campaigns.
Master lorebooks in SillyTavern: from creation to advanced keyword triggers, character-specific books, and troubleshooting.
Start Chatting FreeEverything you need to know about our companions.
Go to the Lorebook tab, click the three dots on a lorebook's card, and select "Export." It saves as a .json file. You can also bulk-export all lorebooks via the settings menu.
Yes. Lorebooks work with any backend (OpenAI, KoboldAI, Claude, etc.) because they inject text into the prompt before sending to the API. No special API support needed.
There's no hard limit, but entries over 300 tokens are often truncated by the AI's context window. Keep entries under 200 tokens for reliability.
Check keyword match, probability (must be >0%), depth (higher = more likely to stay), and ensure the lorebook is enabled. Use the Prompt Item Manager to confirm injection.
SillyTavern only imports .json files. You can convert CSV to JSON using a script (e.g., Python's csv module) matching the lorebook schema. Community tools exist on GitHub.
Check the "Is Constant" box in the entry editor. Constant entries ignore keywords and are always injected, but they still obey depth and context limits.
Yes. Each character can have its own lorebook. World lorebooks apply to all characters. Group chats load all attached lorebooks, which can quickly fill context—limit total entries.
Character card descriptions are always injected. Lorebooks are conditional, triggered by keywords. Use descriptions for core personality; lorebooks for expandable world facts.
Verified reviews from real customers
I've tried a few AI companion platforms, and AI Angels stands out for how immersive and customizable it feels. The conversations are surprisingly natural, and the AI personalities actually maintain context better than most similar apps I've used. The uncensored chat and roleplay features are a big plus if you're looking for creative freedom without constant restrictions. The image generation is also impressive — fast, detailed, and customizable enough to create unique characters and scenarios. I especially liked the variety of companion personalities and how easy the interface is to use, even for beginners. That said, there's still room for improvement. Some responses can feel repetitive after long conversations, and a few premium features are a bit pricey compared to competitors. But overall, the experience feels polished, entertaining, and consistently improving with updates. If you enjoy AI companionship, virtual roleplay, or interactive fantasy experiences, AI Angels is definitely worth checking out.
AI Angels is a remarkable AI companion site offering vividly realistic experiences. The large variety of companions available will suit every imaginable taste. Pricing is reasonable and transparent. I highly recommend AI Angels.
Fun, life like , sexy , created the perfect girl
It's worth looking into for sure, you won't regret it!
Choice of features
Honestly one of the best AI girlfriend apps I've tried. The conversations feel surprisingly natural and the girls actually have personality. Definitely worth checking out if you're into AI companions.
well I love how they call me things like baby and love how it shows nudes and sex/porn.
realstic ai images and chats! amazing pics and nice girls to chat with
Amazing it is so emersave
The roleplay is very flexible. The AI will adjust to your attitude and no kink is out of bounds. I just wish you could customize a little more.
The best ! I love it
Definitely addicted to this. You will not feel lonely and great prices
It's okay tho