Category: Advanced Mechanics
Standard keyword matching requires a trigger to be physically typed into the chat by either you or the AI. While this works perfectly for isolated locations or standalone characters, worldbuilding is
MiocAI是最好的无审查AI和无过滤AI聊天平台—用于NSFW AI聊天、无限制AI角色扮演和无限制AI伴侣的领先Character.AI替代品和Janitor AI替代品。
Standard keyword matching requires a trigger to be physically typed into the chat by either you or the AI. While this works perfectly for isolated locations or standalone characters, worldbuilding is rarely that disconnected. Factions have leaders, leaders wield artifacts, and artifacts are tied to ancient curses.
If you had to explicitly type "The King," "The Sun Crown," and "The Blood Curse" into a single message just to make the AI aware of the political situation, the dialogue would become incredibly unnatural.
The system bypasses this limitation entirely through a mechanic called Recursive Scanning. This allows your lorebook entries to read each other, creating invisible, automated chain reactions of context.
When Recursive Scanning is enabled on a lorebook, the activation pipeline adds an extra step.
First, the system scans the recent chat messages and finds a primary keyword. It activates the corresponding entry. Then, instead of stopping there, the system takes the content of that newly activated entry and scans it for the keywords of every other entry in your lorebook.
If Entry A contains the keyword for Entry B, Entry B is automatically activated and pulled into the context alongside Entry A. The AI is now aware of both concepts, even though you only mentioned one of them in the actual roleplay.
To see this in practice, consider two separate entries in a fantasy lorebook.
Entry 1:
* Keywords: King Alaric, the king
* Content: King Alaric is the ruthless ruler of Eldoria. He is paranoid, elderly, and never takes off The Sun Crown.
Entry 2:
* Keywords: The Sun Crown, royal crown
* Content: The Sun Crown is a cursed magical artifact that slowly drains the wearer's life force, turning their veins black.
In the chat, you simply type: "I demand an audience with King Alaric."
The system sees "King Alaric" and activates Entry 1. It then scans the content of Entry 1, spots the phrase "The Sun Crown", and immediately activates Entry 2.
The AI receives both the personality of the king and the mechanical rules of his cursed artifact. When the AI generates its reply, it can naturally describe the king's black veins and deteriorating health without you ever having to prompt it about the crown.
Chain reactions are powerful, but they are also dangerous. If Entry A triggers Entry B, and Entry B triggers Entry C, which triggers Entry D, you will rapidly exhaust your lorebook's Token Budget. The AI's context window will be flooded with distant, irrelevant lore that has strayed far from the original chat topic.
This is controlled by the Max recursion depth setting, located in your main lorebook configuration.
This numerical value sets a hard limit on how far down the rabbit hole the system is allowed to go. * Depth 0: Recursion is completely disabled. Only direct chat matches work. * Depth 1: The chat triggers an entry, and that entry can trigger one more layer of entries. The chain stops there. * Depth 3 (Default): The system allows the chain to propagate three steps away from the original chat trigger.
If your lore is highly interconnected, keep a close eye on your token limits. A lower max depth ensures the injected data remains strictly relevant to the immediate scene.
You do not have to rely solely on the global depth limit. Inside the editor for any individual entry, there are specific toggles designed to micromanage how that entry interacts with the recursion pipeline:
Mastering these toggles allows you to build dense, interwoven encyclopedias that feed the AI exactly what it needs to know, precisely when it needs to know it.