> For the complete documentation index, see [llms.txt](https://docs.moescape.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.moescape.ai/tavern-chatbot-guide/scan-depth-support-and-lorebooks.md).

# Scan Depth Support & Lorebooks

Shape your character's behavior and world with custom rules and lore for a one-of-a-kind, immersive adventure!

### Step 1

Create Lorebook

<figure><img src="/files/WxEr67ykyC7FzccBITew" alt=""><figcaption></figcaption></figure>

Enter Title & Scan Depth as well as:

* Select applicable categories (up to 7 max)
* Visibility - set the lorebook private or public
  * Public - everyone can use it
  * Private - only you can use it

Optional (but highly recommended!):

* Attach a cover image (recommended)
* Lorebook description (recommended)

{% hint style="info" %}
**What is Scan Depth?**&#x20;

Scan Depth is a setting for the knowledge base that determines how many previous messages the search should analyze for lorebook keywords. This helps the bot retain lorebook content in its memory for a longer period.

**Example:**

* If set to 1, it will only check the last user message for the lorebook keyword.
* If set to 4, it will check the last 4 messages (including bot messages).
  {% endhint %}

<figure><img src="/files/mjb9hkVlO2gKfYnuYBrD" alt=""><figcaption></figcaption></figure>

### Step 2

Create Entries To Explain The Rules And Lore

<figure><img src="/files/oBZW26HqabVquICx1fDK" alt=""><figcaption></figcaption></figure>

### Step 3

Set Activation Keys

<figure><img src="/files/kX9KSEpMtF33QIog2QuY" alt=""><figcaption></figcaption></figure>

### Step 4

Use the activation key to trigger the entry during the conversation.

<figure><img src="/files/AndZsfU2dPI5xO7BgJlI" alt=""><figcaption></figcaption></figure>

<br>
