What Is a Lorebook? A Practical Guide to AI World Info
A lorebook — some platforms call it "world info" — is a collection of facts about your setting that the AI loads only when they're relevant. Instead of cramming your entire world into the character prompt, you write small entries, tag each with trigger keywords, and the system injects an entry into context when the conversation mentions its triggers.
It is the single most important tool for running stories bigger than one character in one room. This guide covers how they work, how to structure entries, a worked example, and the failure modes that quietly ruin them.

Why lorebooks exist: the context budget
Every AI conversation runs inside a fixed context window. Your character card, the world facts, the recent messages, and any memories all compete for that same space. When it overflows, something gets dropped or compressed — usually the older conversation, sometimes the middle of an oversized prompt.
Stuffing your whole setting into the character card fails on both ends:
- You pay for everything, always. Your tavern's menu occupies context during a scene at sea. Every irrelevant fact in the permanent prompt is conversation history you can't keep.
- The model attends to less of it. Long undifferentiated prompts dilute attention. The detail you cared about most is buried in paragraph nine.
A lorebook inverts the deal: facts cost nothing until the scene needs them. Mention "Thornmere" and the Thornmere entry appears; sail away and it stops taking up room. That's the whole trick, and it's why a 40-entry lorebook can support a richer world than a 4,000-word prompt. The same budget logic drives good character writing too — see the character card guide for what belongs in the card instead.
The two entry types
Keyword-triggered entries
The default type. The entry activates when a trigger word appears in recent conversation. Most of your lorebook should be keyword entries: places, factions, side characters, items, historical events.
Always-on entries
Injected into every generation regardless of keywords. Reserve these for the few facts the story is never allowed to forget: core physical laws of your world, the current era, an invariant tone rule ("magic always has a price"). Teasa exposes exactly this split — keyword vs. "always" entries, with invariant world rules as their own slot in the story format — but the principle is universal: every always-on entry is a permanent tax on your context budget. Three to five is plenty for most worlds; twenty rebuilds the overstuffed prompt you were escaping.
How to structure an entry
One subject per entry. An entry should answer "what does the model need to know when this thing comes up?" If your "Thornmere" entry also explains the royal succession and the currency system, those facts appear only when someone says "Thornmere" — and bloat the context whenever anyone does. Split them.
Write facts, not prose. Entries are for the model, not for readers. Dense, declarative sentences beat atmospheric paragraphs: the model turns facts into atmosphere at generation time; it can't turn atmosphere back into facts.
Choose triggers like search terms. List the names and aliases people will actually type or the AI will actually say: "Thornmere, the Mere, marsh road." Avoid common words — a trigger like "king" or "fire" will fire constantly (more on collisions below).
Keep entries small. A good entry is one to five sentences. If an entry needs three paragraphs, it's usually two or three entries wearing a trenchcoat.
Mind the scope. Decide what each book covers and attach it deliberately. Platforms handle this differently; teasa treats lorebooks as a reusable library — private by default, connectable to multiple stories (up to five books per publication), shareable by explicit grant, and revocable — so one canonical "Kingdom of Veyle" book can serve every story set there. Whatever your platform, the practice holds: build books around settings, not individual chats, so canon lives in one place.
Worked example: a small fantasy setting
Here's a minimal lorebook for a story set in a marsh-country border town. Always-on first:
[Always] World rules: Low-magic setting. Magic is rare, feared, and always leaves a physical mark on the caster. No resurrection. Technology level: late medieval, no gunpowder.
Then keyword entries, one subject each:
Grayharbor — triggers: Grayharbor, the harbor, the town Border town of ~2,000 on the edge of the Thornmere marsh. Economy: eel fishing, salt, smuggling. Governed by an appointed Reeve nobody has seen in weeks.
Thornmere — triggers: Thornmere, the Mere, the marsh Vast saltwater marsh east of Grayharbor. Paths shift after storms; locals hire guides or drown. Rumored ruins at its center that guides refuse to approach.
Reeve Aldric — triggers: Aldric, the Reeve Grayharbor's governor, missing three weeks. His office claims illness. His seal has appeared on documents dated after his disappearance.
The Saltmark — triggers: Saltmark, smugglers' guild Grayharbor's smuggling ring, run from the Drowned Bell tavern. They move goods, not people, and consider kidnapping bad for business — a point of pride.
The Drowned Bell — triggers: Drowned Bell, the Bell, tavern Dockside tavern and unofficial Saltmark headquarters. House rule: no questions about cargo. The bell above the bar came off a wreck no one will name.
Notice what this setup buys you. A scene in the tavern loads the Bell and probably the Saltmark — not the marsh geography. A character asking "where's the Reeve?" pulls in Aldric and his suspicious seal. The mystery hooks (the ruins, the seal, the wreck) are seeded as facts the model can pay off later. Total cost when nothing triggers: one short world-rules entry.
If a character holds secret knowledge — a guide who knows what's in the ruins — it belongs in that character's private profile rather than shared lore, so the knowledge stays with the person who has it. Platforms with per-character knowledge allowlists and reveal policies (teasa's story format has both) make this explicit; elsewhere, note it in the entry ("only marsh guides know this").
Pitfalls
Trigger collisions. Two entries sharing a trigger, or a trigger that's an everyday word, will fire together or constantly — flooding context and sometimes injecting contradictions side by side. Audit your trigger lists as a set: every trigger should be specific enough that its firing means the subject is genuinely in play.
Contradictions between entries. Written months apart, entries drift: one says the Reeve rules Grayharbor, another says a merchant council does. The model doesn't adjudicate — it blends, producing incoherence on exactly the topics you detailed most. When canon changes, update the entry rather than adding a second one that "corrects" it.
Oversized entries. A 600-word entry triggered by a common word is the worst of both worlds: rarely fully read by the model, expensive every time it fires. Split by subject, cut prose to facts.
Duplicating the character card. If a fact defines your lead character, it belongs in the card, which is always in context. Repeating it in a lorebook wastes space and creates a second copy to keep in sync.
Spoiling your own secrets. In systems where lore is attached to a public publication, check what's reader-visible before publishing. Teasa's approach — public card and staged intros separate from private engine data, with immutable published versions — makes the boundary explicit; on any platform, verify: does sharing this book reveal the twist?
Start small: five to ten entries, then play. The transcript will tell you exactly which entries never fire, which fire too often, and which facts you assumed the model knew but never wrote down. For the character side of the same craft, continue with the character card guide; for how persistent personal facts should be handled — a different problem from world lore — see how AI companion memory should work.
FAQ
What's the difference between a lorebook and the character prompt?
The character prompt (card) is always in context and defines a person; a lorebook holds setting facts that load on demand via keywords.
How many lorebook entries should I write?
As many as your world needs, because dormant entries cost nothing — but each entry should stay small and single-subject. It's the always-on entries you should ration: keep those to a handful.
What's the difference between a lorebook and AI memory?
Lore is authored canon about the world, written before and during play by the creator. Memory is information about you and your history with the companion, accumulated from conversation — and it raises consent questions lore doesn't. We cover that in how AI companion memory should work.
Why does the AI ignore my lorebook entry?
Check three things: the trigger words never actually appear in conversation (add aliases people really use), the entry fired but was buried in an overlong context (shrink your always-on set and entry sizes), or the fact contradicts something in the character card, which usually wins.