> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/en-us/knowledge-base/data.md).

# Data, Privacy, and Maintenance

The knowledge base stores hosted copies of imported materials, parsed text, Chunks, and retrieval indexes. Whether data leaves the local machine depends on the services chosen for parsing, OCR, embedding, re-ranking, and chat.

{% hint style="info" %}
Keeping the original files local does not mean the entire knowledge base workflow is offline. As long as one processing step uses a cloud service, files, chunks, or queries needed to complete the task may be sent out.
{% endhint %}

## What is saved after import

| Content                                | Purpose                                                      | Update method                                                          |
| -------------------------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------- |
| Copies of files in a file or directory | For the knowledge base to continue processing and displaying | Re-add or replace after the original file is updated                   |
| Webpage and note snapshots             | Preserve the content as it was when imported                 | Re-import after the source is updated                                  |
| Parsed text and Chunks                 | Preview and retrieval                                        | Re-index after changing the processor or chunking                      |
| BM25 keyword index                     | Exact word search                                            | Rebuilt when re-indexing                                               |
| Vector index                           | Semantic retrieval                                           | Generated or rebuilt after configuring or changing the embedding model |

<figure><img src="/files/851212984cdd3ef47fd9778e231d7441c35c58ea" alt="包含多条已处理资料的员工差旅制度知识库"><figcaption><p>Items in the material list are the objects hosted and indexed by the knowledge base, not a live synchronized view of the original directory.</p></figcaption></figure>

## What boundaries may a single query cross

<figure><img src="/files/6e98934885eff518d13a4942ff027d90687e8866" alt="展示解析、关键词检索、向量检索、重排和回答之间数据流的知识库架构图"><figcaption><p>The parsing, vector, re-ranking, and answer nodes in the diagram may all choose local or cloud services; check each one individually to determine the data boundary.</p></figcaption></figure>

| Selected capability         | Possible received content                                 |
| --------------------------- | --------------------------------------------------------- |
| Cloud document processor    | File content used for parsing                             |
| Cloud embedding model       | Material chunks and retrieval queries                     |
| Cloud re-ranking model      | Queries and candidate chunks                              |
| Cloud chat model            | Questions, conversation context, and retrieved chunks     |
| Local equivalent capability | Perform the corresponding processing on the local machine |

{% hint style="danger" %}
API keys, internal documents, and logs containing personal information should not appear in public screenshots or feedback. De-identify them before deleting or sharing.
{% endhint %}

## Perform a full maintenance check

{% stepper %}
{% step %}

### 1. Record the current configuration

Record the knowledge base name, file processor, OCR, embedding model, re-ranking model, and key chunking settings. Use them to verify the environment after migration.
{% endstep %}

{% step %}

### 2. Clean up duplicates and old versions

Keep only the current version for the same policy; if historical audits are needed, clearly mark the year or version in the title to avoid search collisions.
{% endstep %}

{% step %}

### 3. Check abnormal entries

Handle materials marked \[Error] or stuck \[Processing] for a long time, and spot-check the text and Chunks. If an app interruption left indexing incomplete, run \[Re-index].
{% endstep %}

{% step %}

### 4. Create the right backup

Open \[Settings] → \[Data]. Use a full backup that includes the knowledge base data files when migrating devices or preparing to delete materials.
{% endstep %}

{% step %}

### 5. Restore and verify in the target environment

Do not just confirm that restoration completed. Check the knowledge base entries, text, and Chunks, and run fixed retrieval questions.
{% endstep %}

{% step %}

### 6. Keep a rollback baseline

Validate new processors or models on a small set of materials first, then re-index in batches. Do not delete the most recent full backup before confirming the new results are stable.
{% endstep %}
{% endstepper %}

## Full backup vs. slim backup

| Backup method | Included content                                                                      | Applicable scenario                                     | Limitations                                         |
| ------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------- | --------------------------------------------------- |
| Full backup   | Data files such as chats, settings, and knowledge bases                               | Device migration, pre-deletion protection, full restore | Large file size, takes longer                       |
| Slim backup   | Mainly chat logs and settings, skipping data files such as images and knowledge bases | Quickly preserve common settings and chats              | Cannot restore a complete knowledge base on its own |

{% hint style="warning" %}
A slim backup is not a recovery safeguard before deleting a knowledge base. For important migrations, keep at least one full backup and actually complete retrieval tests in the target environment.
{% endhint %}

## How updates and deletions are handled

### Source content updated

1. Re-add the same-named material.
2. Choose \[Replace] when you need to overwrite the old version; choose \[Keep all] only when you truly need both to coexist.
3. Wait for the material to become ready.
4. Spot-check the text and Chunks.
5. Run fixed retrieval regression questions.

### Processing settings updated

When only the processor, OCR, chunking, or model settings are changed, run \[Re-index] on existing entries. Changing the configuration itself does not automatically reprocess old materials.

### Delete materials or knowledge base

Deletion removes the content and indexes hosted by the knowledge base, but it does not delete the files in the original path or the original notes. Before proceeding, make sure the original source can still be found, a full backup is available, and check whether any agents are still bound to this knowledge base.

## Configuration notes

| Item             | Recommended starting point                          | Acceptance method                              | Risk                                              |
| ---------------- | --------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------- |
| Material version | Keep only the current version for the same use      | Fixed questions still hit the correct version  | Mixing old and new rules                          |
| Cloud service    | Confirm item by item according to sensitivity level | Check the processor and model settings         | Documents or chunks are sent to external services |
| Backup           | Create a full backup before major changes           | Check entries and retrieval after restoration  | Slim backup lacks knowledge base files            |
| Re-index         | Process representative materials in batches         | Compare the same question set before and after | One-time rebuild loses a usable baseline          |

## User case

Xiaolin wants to migrate the team policy repository to a new computer. First he records the processor and model settings, creates a full backup, then checks the text and Chunks of three materials after restoring on the new computer and repeats the original five retrieval questions. Only after everything passes does he clean up the old environment.

The completion criteria are: the number of materials and titles match, key questions still hit the same source, and the team confirms that all cloud services meet data requirements.

## Fully offline checklist

* Document parsing and OCR use system, local, or self-hosted capabilities.
* The embedding model runs locally.
* Do not use cloud re-ranking, or use local re-ranking capabilities.
* Conversations and agents use a local chat model.
* No MCP, web search, or channels that send content to external systems are enabled.

## FAQ

<details>

<summary>Will the knowledge base update automatically after modifying the original file?</summary>

No. Files, web pages, and notes are turned into materials based on the content at import time. Re-add and replace, or re-index as needed.

</details>

<details>

<summary>Does using a local embedding model mean it is completely offline?</summary>

Not necessarily. If any step in parsing, OCR, re-ranking, or chat uses a cloud service, the content needed to complete the task may be sent out.

</details>

<details>

<summary>Can a slim backup restore a knowledge base?</summary>

It cannot restore the complete knowledge base files. Use a full backup before migration or deletion, and actually verify the materials and retrieval after restoration.

</details>

## Continue reading

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Document parsing and OCR</strong></td><td>Understand the differences between local and cloud processors.</td><td><a href="/pages/7d495aecf9165aca96855bc0d74b3e925728dedc">/pages/7d495aecf9165aca96855bc0d74b3e925728dedc</a></td></tr><tr><td><strong>Add and organize materials</strong></td><td>Replace the source and manage material versions.</td><td><a href="/pages/53062e948442e1c25a4e6ad7b4ec9baf548deafc">/pages/53062e948442e1c25a4e6ad7b4ec9baf548deafc</a></td></tr><tr><td><strong>FAQ</strong></td><td>Quickly locate issues by failure layer.</td><td><a href="/pages/81a55a83c41cfd9a6cb2e0cc71cd6a0e384a8681">/pages/81a55a83c41cfd9a6cb2e0cc71cd6a0e384a8681</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/en-us/knowledge-base/data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
