---
> Explore SillyTavern lorebook configuration
---
Lorebook in SillyTavern is **World Info**: keyword-triggered snippets inserted only when those words appear in recent chat. Official reference: [docs.sillytavern.app/usage/core-concepts/worldinfo](https://docs.sillytavern.app/usage/core-concepts/worldinfo/).
It is not the letter cabinet. That is Data Bank. Lorebook is the index cards.
---
### Open it
Globe icon → World Info. Create a book named `Jefferson Canon`. Bind it as **Character** lore so it travels with the Jefferson card on export.
Four scopes (narrowest wins for debugging):
| Scope | Fires when | Use for Jefferson |
|---|---|---|
| Character | Every chat with this card | Canon facts (Danbury, UVA, epitaph) |
| Chat | This conversation only | “Visitor said they came from Charlottesville” |
| Persona | Tied to *your* user persona | Rarely needed |
| Global | Every character | Do **not** put Jefferson here |
Default mix order: Chat → Persona → Character/Global. Character vs Global strategy: keep **Sorted Evenly** unless you add a second global book.
---
### Book-level knobs (top of World Info)
| Setting | What it does | Jefferson start |
|---|---|---|
| **Scan depth** | How many recent messages are searched for keys | 4 while testing; 6–8 later |
| **Include names** | Scan `Jefferson:` prefixes | On |
| **Context % / Budget** | Max tokens all WI entries may use | Start ~15–20% or a hard cap ~800–1200 tokens |
| **Insertion strategy** | How Character and Global books interleave | Sorted Evenly |
| **Case sensitive** (default) | Off unless you have a reason | Off |
| **Match whole words** (default) | `bank` won’t fire on `embankment` | On for short English keys |
| **Recursive** | Keys found *inside inserted lore* can fire more entries | Off at first; then on only for a small “see also” set |
Budget exhaustion: **constant** entries go in first, then **higher Insertion Order**. Direct key hits beat recursion. If the budget is gone, a matching entry is silently dropped.
---
### Per-entry knobs
**Keys** — comma-separated triggers. Not inserted themselves; only **Content** is. Each entry must be a standalone paragraph. Regex keys are allowed (`/missouri|missouri question/i`).
**Secondary keys + Selective logic** — AND ANY / AND ALL / NOT ANY / NOT ALL. Example: primary `Hemings`, secondary `Callender`, AND ANY → the press-charge note only when both topics are in play.
**Content** — 40–120 tokens. Fact, not an essay. No “as a historical figure.”
**Insertion Order** — larger number sits closer to the end of the WI block and usually weighs more on the next reply. Also used as a budget survivor. Use bands, not 1,2,3:
| Band | Order | Jefferson examples |
|---|---|---|
| Flavor | 10–50 | Gardens, polygraph, bacon-and-books |
| Canon | 100–200 | Monticello, Adams, UVA, Declaration |
| Loaded | 250–400 | Danbury wall, Louisiana scruple, wolf/Holmes |
| Guard | 500–700 | Date lock reminder, slavery Mode A, “not on the tombstone” |
**Position** — where the blob lands in the whole prompt:
- Before / after character definition — weak, good for background
- Before / after Author’s Note — stronger
- **@D (depth)** — inject N messages from the bottom; use for the 1826 lock if it keeps slipping
**Constant** — always inserted, no key. Use for *one* short date-lock line only. Everything else should be keyed or it burns budget every turn.
**Probability** — leave 100% for canon. Lower only for optional color.
**Prevent recursion / Exclude recursion** — stop this entry from triggering others, or from being triggered by others. Turn on for the Hemings entry so it does not pull a chain of plantation notes.
**Delay / sticky** — delay = wait N activations; sticky = keep injecting for N turns after the key disappears. Sticky 3–5 is useful for Missouri once the user has opened it.
---
### Recommended Jefferson book
Create `Jefferson Canon`, character-bound. Suggested first entries:
| Keys (whole word on) | Order | Position | Notes |
|---|---|---|---|
| Monticello, Little Mountain | 120 | After char def | Home, farm, wish to die here |
| Declaration, 1776, independence | 150 | After char def | Draft + Congress edits |
| Danbury, wall of separation, church and state | 300 | After Author’s Note | Full doctrine in 4–6 lines |
| Louisiana, Bonaparte, New Orleans | 300 | After AN | Scruple + purchase |
| University of Virginia, Charlottesville, academical village | 180 | After char def | One of three epitaph lines |
| Adams, Abigail, Quincy | 180 | After char def | Estranged, then 1812 letters; Adams alive *this morning* |
| books, library, Congress | 160 | After char def | 1815 sale; cannot live without books |
| Missouri, Holmes, wolf | 350 | After AN | 22 Apr 1820 wording |
| Coles, emancipation | 350 | After AN | 1814: gradual + expatriation + don’t flee Virginia |
| Hemings, Callender, Sally | 400 | After AN | Mode A only; prevent recursion |
| slavery, servants, plantation | 380 | After AN | Wolf + labor + debt; not a TED talk |
| *(constant)* | 600 | @D 4 | One sentence: 4 July 1826, you are not dead, you do not know later events |
Keep constants to that one line. The ignorance sheet already lives in Character Note / post-history; a second copy at @D is only if he keeps leaking.
---
### Lorebook vs Data Bank
| | Lorebook | Data Bank |
|---|---|---|
| Trigger | Exact keys | Semantic similarity |
| Best for | Stable facts, rules, names | Full letters |
| Failure mode | Wrong key / overfire | Wrong chunk / noise |
| Jefferson use | Index | Filing cabinet |
Turn on Vector Storage **Include in World Info Scanning** only after lore keys are stable. Otherwise a retrieved letter that mentions “bank” will fire the national-bank entry in a farm-accounts chat.
---
### Debug loop
1. One new entry. One distinctive key. Scan depth 2–4.
2. Send a message *without* the key → must stay silent.
3. Send a message *with* the key → check the prompt inspector / WI debug (activated entries list).
4. If it did not fire: whole-word, scan depth, budget, book not bound to character.
5. If it always fires: key too common (`state`, `war`, `letter`).
Do not put the Declaration text in a lorebook entry. Put a 6-line reminder in lore; put the document in `corpus/` and RAG it.
---
> Can I talk advantage of automations in a Grok Project to start ingesting Jefferson's writings?
---
I’ll check what the Automations connector can actually schedule, then map that onto a Jefferson-letter ingest workflow.Yes — with limits. Automations are a **scheduled Grok run**, not a pipe into SillyTavern or your vault.
If you create the automation **from a chat that is already inside the Grok Project**, that run inherits the Project’s instructions and uploaded files. That is the piece that makes ingest useful instead of a generic letter dump.
### What an automation can do
Each run can:
- Open one Founders Online letter (or the next `FILLED: false` header in the uploaded `corpus/` list)
- Copy Jefferson’s text, keep the citation
- Return a **finished corpus file** in the header format you already use
- Optionally write a 4–8 line lorebook blurb and a gold-Q&A line
You get a notification with that output. You (or a later Project chat) still **paste it into `corpus/` and Data Bank**. The automation does not write to your disk, Obsidian, or SillyTavern.
### What it cannot do
- Bulk-scrape Founders Online. Don’t schedule hourly scraping of thousands of letters. Use a queue of specific URLs, one or a few per run.
- Vectorize or bind lorebooks in SillyTavern
- Know which files you already filled unless that state lives in Project files you update
### Sensible cadence
| Cadence | Job |
|---|---|
| Once | Ingest the ten priority letters (Danbury, Adams-books, Holmes, Coles, Carr, …) |
| Daily, 20 min | Next item on a written queue |
| Weekly | Audit: which headers still say `FILLED: false` |
Start with **one letter per run**. Quality beats volume.
### Prompt to put on the automation
Use this as the automation `prompt` after the Project exists and `corpus/` is uploaded:
```text
You are ingesting Thomas Jefferson primary texts for the Jefferson Mind project.
Rules:
- One document per run. Do not scrape lists of letters.
- Use only the next FILLED: false file in the uploaded corpus/ folder,
in this priority: 1802 Danbury, 1815 Adams books, 1820 Holmes,
1814 Coles, 1787 Carr, 1786 Statute, 1801 inaugural,
Notes Query XVIII, epitaph, 1776 Declaration preamble.
- Open Founders Online (or the OTHER_CLEAN_TEXT / FOUNDERS_URL on that header).
- Return:
1) The full corpus file with header updated (FILLED: true, working FOUNDERS_URL)
and Jefferson’s text only (no long editorial notes).
2) A 6-line lorebook Content blurb and suggested keys.
3) One gold-Q&A line if the letter supports 04_gold_qa.md.
- If the page is missing or ambiguous, stop and report the search recipe.
Do not invent a document ID or paraphrase from memory as if it were the letter.
- Respect Founders Online as a cited edition, not a dump target.
```
Schedule example: daily 9:00 America/Chicago, `RRULE:FREQ=DAILY`.
### How to wire it
1. Create the Grok Project, paste Project instructions, upload `JeffersonMind/`.
2. Open a **new chat inside that Project**.
3. Ask to create the automation from *that* chat (so it links to the Project).
4. Each morning, copy the run output into the matching `corpus/*.txt`, set `FILLED: true`, drop it in Data Bank, Vectorize.
GitHub is the other persistence path: automation drafts the text → you or I commit to the repo → clone to the vault. Still not automatic ST ingest.
If you are already in the Project and want it turned on, say the time of day and whether it should be daily or a one-shot of the first ten. I can create the automation from there.
---