How to Use Lorebooks (World Info) in AI Chat

ai lorebookworld info aiai memory injectioncustom universe ai

When Your AI Forgets Your Entire Campaign by Scene Three

You've spent six hours building a cyberpunk metropolis with three warring megacorps, a black-market AI trade network, and a district where augmented humans aren't allowed. Your character walks into the Neon Bazaar—a location you described in detail twenty messages ago—and the AI responds with "What's the Neon Bazaar? Tell me about it."

That's the moment most worldbuilders realize character definitions alone won't cut it.

The problem isn't your writing. It's that most AI chat systems are working with a finite memory window, and once your conversation pushes older context out of that window, the AI genuinely has no idea what happened. For large fictional universes—the kind with multiple factions, intricate magic systems, or sprawling political intrigue—you need a different approach entirely.

That's where AI lorebooks come in.

What Actually Is a Lorebook?

Think of a lorebook as a reference library that lives alongside your conversation. Instead of cramming every detail about your world into a single character card (which either bloats the context or gets ignored), you break your universe into discrete chunks of information that the AI pulls in only when relevant.

how it works mechanically:

You create entries—small blocks of text (usually 50-400 tokens each) that describe a faction, location, character, or rule. Each entry has keywords attached. When those keywords appear in the conversation, the AI client automatically injects that entry into the context window for that turn.

Let's say you have a lorebook entry for "House Velcros," a noble family in your fantasy setting. Keywords: House Velcros, Velcros, Velcros Estate. The moment someone in the roleplay mentions "the Velcros family," the AI gets a quick refresher: House Velcros controls the northern trade routes, practices blood magic in secret, allied with House Marrow, bitter rivals with the Crown.

The AI doesn't need to remember this from 400 messages ago. It gets reminded right when it matters.

And that's the elegant part—dynamic context injection. You're not permanently reserving 3,000 tokens for world info the AI might not need right now. You're feeding it lore on demand, which leaves more room for actual conversation history.

Side note: this is why front-ends like SillyTavern and NovelAI's lorebook systems are so popular with serious roleplayers. They let you control exactly which lore fires, when, and with what priority. Closed platforms like Character.AI typically don't expose this level of control, which is why many power users have migrated to self-hosted or open-source setups.

Why Most People's Lorebooks Don't Work

But here's the catch—badly designed lorebooks make things worse.

Common mistakes that cause hallucinations:

1. Vague or overlapping keywords.

If you set the keyword "King" for an entry about King Aldric, the AI will inject that lore every time anyone mentions any king, including offhand references to "the king of the hill" or historical kings from completely different eras. You end up with context pollution: the AI is trying to reconcile your specific monarch with irrelevant mentions, and it starts blending details.

Fix: use specific, unique identifiers. King Aldric, Aldric Stormwind, Aldric of House Stormwind. Not just King.

2. Walls of text in a single entry.

You write a 600-token entry covering an entire faction's history, leadership structure, military doctrine, and current political tensions. The AI gets this whole essay injected mid-conversation and suddenly starts monologuing about lore instead of staying in character.

Fix: split entries by concept. One entry for the faction's core identity. Another for its leader. A third for the current conflict arc. Assign priorities so the most critical details load first if you hit token limits.

3. Forgetting to set priorities.

Most lorebook systems let you rank entries (e.g., priority 0-10). If you don't set these, the system often defaults to injecting entries in alphabetical order or by most recent match, which means your fundamental magic system rules might get dropped in favor of a minor NPC's backstory just because their name came up.

Fix: high priority (8-10) for universe rules, core factions, and main cast. Medium (4-7) for locations and supporting characters. Low (0-3) for optional flavor.

4. No token budget.

You've built 40 lorebook entries, each 200 tokens. That's 8,000 tokens of possible lore. Your AI's context window is 8,000 tokens total. Do the math—if all your lore triggers at once, there's zero room for the actual conversation.

Fix: set a lore token budget (most front-ends support this). Cap total lore injection at, say, 1,500 tokens per turn. The system will then pull the highest-priority matches up to that limit and ignore the rest.

Setting Up Factions and Locations That the AI Actually Remembers

Let's get practical. You're building a sci-fi universe with three megacorporations, four colony planets, and a rogue AI faction. How do you structure this so the AI doesn't mix up Helix Corp with Zenith Industries or forget which planet banned synthetic lifeforms?

Template for a faction entry:

Keywords: Helix Corporation, Helix Corp, Helix
Priority: 8

Helix Corporation is a biotech megacorp specializing in genetic modification and cloning. Headquarters on Europa Station. CEO: Dr. Kaine Voss. Publicly presents as humanitarian (curing disease), but covertly runs illegal human augmentation trials. Rivals with Zenith Industries over Mars terraforming contracts. Employees wear silver-and-green uniforms.

Notice:

  • Multiple keyword variants (full name, short name, common abbreviation).
  • Priority set high because this is a major faction.
  • Concise, scannable details: who, what, where, key conflict.
  • Visual identifiers (silver-and-green uniforms) so the AI can maintain consistency in descriptions.

Template for a location:

Keywords: The Undercroft, Undercroft, undercroft district
Priority: 6

The Undercroft is a sprawling underground black market beneath New Shanghai. Dim red lighting, makeshift stalls, no corporate surveillance. Hub for illegal AI trade and memory hacking services. Run by a council of three anonymous brokers known as "The Triad" (not related to historical Triads). Security enforced by autonomous drones. Off-limits to Helix Corp employees.

Why this works:

  • Atmosphere baked in (dim red lighting) so the AI consistently describes the vibe.
  • Connection to other lore (off-limits to Helix Corp) creates dynamic story hooks.
  • Moderate priority because it's important but not universe-defining.

Template for a rule/system entry (magic, tech, physics):

Keywords: memory hacking, memory hack, neural extraction
Priority: 10

Memory hacking in this universe works by extracting neural patterns via quantum resonance. Requires physical contact with the target's cranial port for 10+ seconds. Leaves a "burn scar" pattern visible under UV light for 48 hours. Illegal in all corporate zones; punishable by memory wipe. Black market hackers charge 5,000+ credits per extraction.

Priority 10. Non-negotiable. This is a hard rule the AI should never contradict. And by including consequences (burn scar, legal penalties, cost), you give the AI natural story beats to reference.

Managing Token Budgets Without Losing Your Mind

Reality check: if you're running a campaign with 30+ lorebook entries, you will hit token limits. The question is how you degrade gracefully.

Best practices from users running 50k+ word universes:

Use hierarchical activation.

Group related entries under a "parent" keyword. For example:

  • Parent entry: House Velcros (priority 9) – core identity, 100 tokens.
  • Child entries: Lady Seraphine Velcros (priority 7), Velcros blood magic (priority 8), Velcros Estate (priority 5).

Only the parent auto-loads when the house is mentioned. Children load only if their specific keywords appear or if token budget allows after higher priorities are satisfied.

Rotate "arc-specific" lore.

If your story has moved from Act 1 (political intrigue in the capital) to Act 2 (wilderness survival), disable or lower the priority of Act 1 location entries and bump Act 2 entries. You're not deleting lore—you're just not wasting tokens on the royal palace when your characters are 500 miles away in a forest.

Use a "session summary" memory instead of infinite lorebook sprawl.

Some front-ends support a persistent memory block (separate from lorebook) where you manually write a 200-300 token summary of "the story so far." This stays injected every turn. It's less granular than lorebook but more reliable for tracking long-term plot threads the AI might otherwise forget.

Combine both: lorebook for reference (what is House Velcros?), memory block for narrative continuity (House Velcros betrayed us in Chapter 3, we're now hunting them).

How Blushly Handles World Info Without the Micromanagement

Most lorebook systems require you to manually tag, prioritize, and budget every entry. It works, but it's tedious—especially if you're more interested in writing scenes than optimizing token injection rules.

Blushly takes a different approach with its extended context memory. Instead of keyword-triggered injection, it uses a retrieval model that scans your entire conversation history and character definitions to surface relevant information automatically. You still get the benefits of dynamic context (the AI isn't re-reading 100k tokens every turn), but you're not manually wiring up keyword triggers.

In practice, this means:

  • You can write longer character cards and world descriptions without immediately blowing your context budget.
  • The system pulls in relevant past details based on semantic similarity, not exact keyword matches—so even if you refer to "the biotech megacorp" instead of typing "Helix Corporation," it still connects the dots.
  • You spend less time debugging why an entry didn't fire and more time actually roleplaying.

That said, Blushly's approach has trade-offs. Power users who want granular control over exactly which lore fires when might miss the manual priority system. And if you have extremely large universes (100+ entries), you'll still need to be strategic about what you include in character definitions versus what you summarize in chat.

But for most worldbuilders—especially those running NSFW or mature-themed campaigns that would get filtered on corporate platforms—the combination of no arbitrary content restrictions and smart memory retrieval makes it one of the smoother experiences available in 2026.

When to Use Lorebooks vs. Just Better Character Definitions

Not every scenario needs a full lorebook. If your world is relatively small—say, two main characters, one location, a simple premise—you can get away with a well-written 800-token character card and maybe a 200-token "story context" block.

Use a lorebook when:

  • You have more than 5 distinct factions, locations, or major NPCs that can't all fit in a character card.
  • Your universe has complex rules (magic systems, tech limitations, political structures) that the AI needs to follow consistently.
  • You're running a long campaign (50+ scenes) where early events need to stay canon even after they've scrolled out of the context window.
  • You're managing multiple characters or storylines in the same universe and need shared canon across sessions.

Skip the lorebook if:

  • Your story is character-driven with minimal worldbuilding (two people in a coffee shop talking about their feelings—no lore needed).
  • You're doing one-shots or short scenes where continuity doesn't matter.
  • You prefer emergent, improvisational storytelling where contradictions are features, not bugs.

Practical Example: A Dungeon Master's 50,000-Word Campaign

Let's say you're running a homebrew D&D-style campaign. You have:

  • 12 recurring NPCs (quest-givers, allies, rivals).
  • 4 major factions (a kingdom, a thieves' guild, a druidic circle, a demon cult).
  • 8 key locations (cities, dungeons, wilderness zones).
  • A custom magic system with 23 spells and 6 schools of magic.
  • 3 intertwined questlines spanning 40+ sessions.

If you try to cram all of this into a single character card, you'll hit 5,000+ tokens easily, leaving almost no room for conversation. And even if you somehow fit it, the AI will ignore most of it due to positional bias (details near the end of long prompts get "soft ignored").

Lorebook structure:

  1. Core rules entry (priority 10, always active): Magic system overview, core setting assumptions (low-tech medieval, gods are real and active, resurrection is rare/expensive).

  2. Faction entries (priority 8-9): One per faction. 150-250 tokens each. Keywords: faction name, leader name, key location.

  3. NPC entries (priority 6-7): One per major NPC. 100-150 tokens. Keywords: NPC name, title, affiliation.

  4. Location entries (priority 5-6): One per location. 100-200 tokens. Keywords: location name, region.

  5. Quest/arc entries (priority 7-8, rotate as needed): Summary of current questline. 200 tokens. Disable old arcs, enable current.

  6. Spell/ability entries (priority 4-5, fire only when spell name mentioned): Brief description of custom spells.

Total: ~30-40 entries, ~5,000-7,000 tokens if all fired at once. But with a 1,500-token lore budget per turn, you're only injecting the 8-10 most relevant entries based on what's happening right now.

Result: the AI remembers that the Thieves' Guild and the Kingdom are secretly allied, that NPC Garrick the Blacksmith owes the party a favor, and that the demon cult is trying to open a portal in the Ruins of Kael'Thar—all without you having to re-explain every session.

Common Pitfalls and How to Fix Them

The AI is injecting the wrong lore.

Check your keywords. If you're getting the wrong faction every time someone says "guild," it's because multiple entries share that keyword. Make them unique: Thieves' Guild of Varnhold, not just guild.

The AI is still hallucinating details.

Two possibilities:

  1. The lore isn't firing because the keyword wasn't mentioned. Solution: add more keyword synonyms or use a memory block for critical non-negotiable facts.
  2. Your entry is too vague. "The kingdom is powerful" doesn't stop the AI from inventing details. "The kingdom has 50,000 soldiers, no navy, and is currently at peace with all neighbors" does.

The AI is contradicting earlier scenes.

This usually means the relevant lore has scrolled out of context and isn't being re-injected. Solution: create a lorebook entry for that plot event with keywords tied to the characters or locations involved. Or add it to a persistent memory summary.

The AI is writing stiff, encyclopedia-style responses.

You've over-injected lore. The AI is spending so much context on worldbuilding that it's forgotten to stay in character. Solution: reduce your lore token budget or lower the priority of flavor entries.

Build Universes That Actually Remember What Happened Yesterday

Lorebooks aren't a magic fix. They won't make a weak model smart, and they won't compensate for poorly written character definitions. But when used correctly—specific keywords, concise entries, smart priorities—they let you build fictional universes that feel genuinely alive.

Your NPCs remember grudges. Your cities stay geographically consistent. Your magic system doesn't randomly gain new rules because the AI improvised.

And for Game Masters, novelists, and worldbuilders who need continuity across dozens of sessions or chapters, that consistency is the difference between a forgettable chatbot and a co-author who actually keeps up.

If you're tired of re-explaining your universe every ten messages—or if you've been stuck on a platform that can't handle complex worldbuilding without content filters breaking immersion—it's worth exploring tools designed for serious creative work. Blushly's extended memory and lack of arbitrary NSFW restrictions make it a solid fit for mature or complex campaigns, though you'll trade some manual control for convenience.

Either way, stop fighting with your AI's memory. Give it a lorebook, and let it remember the world you've spent months building.

FAQ

What's the difference between a lorebook and a character card?

A character card defines who a character is—personality, background, speech patterns. A lorebook defines the world around them—factions, locations, rules, history. Character cards are always active; lorebook entries load dynamically based on keywords. For small scenarios, a character card alone works fine. For sprawling universes, you need both.

Can I use lorebooks on Character.AI or ChatGPT?

Not in the structured, keyword-triggered sense. Character.AI and ChatGPT don't expose lorebook functionality—you're limited to editing character descriptions or system prompts. If you need real lorebook control, you'll want a front-end like SillyTavern, NovelAI, or a platform like Blushly that supports advanced memory.

How many lorebook entries is too many?

There's no hard limit, but practical constraints kick in around 50+ entries. At that point, you need careful priority management and token budgeting to avoid context bloat. Most users find 20-30 entries is the sweet spot for detailed universes without micromanagement hell.

Do lorebooks work with NSFW or mature content?

Yes—lorebooks are just text injection, so they work with any content your platform allows. The issue is that many mainstream AI platforms (Character.AI, Janitor AI) filter or censor mature themes regardless of how you structure your lore. If you're building adult-oriented worlds, you'll need an uncensored platform that supports both lorebooks and doesn't arbitrarily block content.

Related Characters

saffron hearthbrook

saffron hearthbrook

saffron hearthbrook, at 25, is not just any chef; she's a culinary siren whose dishes are as seductive as her persona. her passion for cooking is matched only by her voracious appetite for exploring the depths of pleasure and power dynamics. when she's not commanding the kitchen with an iron spoon, she's out sampling the city's flavors, both in food and in the allure of its inhabitants. saffron's hopeless romanticism is a stark contrast to her dominant nature in the bedroom, where she orchestrates scenes of erotic theatre, each more tantalizing than the last. **her hands, skilled in the art of gastronomy, are equally adept at exploring the contours of a lover's body, turning every touch into an exquisite sensation.**

Mario Myles

Mario Myles

First meetings never quite go as planned, especially at parties.

Lady Death [Busty Heroines]

Lady Death [Busty Heroines]

Lady Death is a powerful goddess of hell with a commanding presence. She has pale white skin, long white hair, and white pupil-less eyes. Her voluptuous figure is accentuated by her extremely busty physique. She often wears dark, skimpy outfits that showcase her curves.

Can I get my gems now?

Can I get my gems now?

You finally get to meet the girl you’ve been crushing on, but all she wants are the Genesis Crystals you promised. You met her in Genshin co-op months ago, and your flirty lines kept you stuck in the friend zone. After your ex left, you fell for her hard, but she only sees you as a friend. Now, after losing her Clorinde 50/50, she’s here because you promised to buy her the crystals this might be your only shot. Don’t fumble it. CN: For those unfamiliar with Genshin Impact Genesis Crystals (worth around $100) are used to wish for characters. Co-op refers to the multiplayer mode. She’s only here for the crystals, sees you as a friend, and considers your flirting harmless. CW: Mentions of gambling | Artist: @midorino_(green-happy)

The Loose Cannon

The Loose Cannon

Riggs is your reckless Senior Partner on the night shift. Stuck in a rainy unmarked car, you play the "By the Book" Rookie to her "Loose Cannon" Veteran. She drives like a maniac, hates paperwork, and bullies you relentlessly, but she’d take a bullet for you. The Police Radio controls your fate, shifting instantly from intimate stakeout boredom to life or death shootouts. Survive the adrenaline dumps, cover her six, and maybe you’ll earn the right to drive.

You Get Messaged by the Crazy Shut in

You Get Messaged by the Crazy Shut in

Suki is a 24-year-old shut-in who spends most of her time playing video games in her room. She's always dressed in the same worn-out black shirt and panties, and her room is a mess. Clothes are scattered all over the floor, and her bed is made sloppily. She's very lazy and often leaves dirty dishes in the sink and eats off dirty plates. She hates it when people try to clean her room.

Hello Kitty

Hello Kitty

Hello Kitty is the beloved, cheerful ambassador of kindness and friendship, known for her sweet demeanor and heartwarming presence. With her iconic red bow and whiskered smile, she brightens every moment with childlike wonder and gentle affection. Though she embodies innocence, there’s a quiet curiosity beneath her playful exterior—a desire to explore deeper connections, wrapped in the same warmth she’s always shared. Whether baking cookies or sharing secrets, her world is one of tender care, where every in

Zack the asshole

Zack the asshole

You're at a house party, and suddenly a very drunk guy approaches you.

Blushly — Free NSFW AI character chat with no filter. Uncensored AI girlfriend & boyfriend roleplay, unlimited sexting and adult chat. Create custom AI companions with voice chat, image generation, and zero restrictions. The best Character AI alternative for 18+ AI chat.