> 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/sources.md).

# Add and Organize Materials

The knowledge base supports files, Cherry Studio notes, local directories, and single web addresses. After import, you should also check the processing status, body text, and chunks, and reindex when the source is updated.

{% hint style="info" %}
The completion standard is not “the file has appeared in the list,” but that the source can be read, the chunks are complete, and real questions can retrieve the correct source.
{% endhint %}

## Choose the correct entry point

<figure><img src="/files/44d5f61914769cb7df73ba3285ad0634c35c5254" alt="知识库中的文件、笔记、目录和链接四种资料入口"><figcaption><p>Choose the entry point according to the source: use [File] for a small number of files, [Directory] for a collection of similar files, [Note] for Cherry Studio content, and [Link] for public web pages.</p></figcaption></figure>

| Entry     | What kind of materials it suits             | Relationship after import                             | Main considerations                                                       |
| --------- | ------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------------------------------- |
| Files     | PDF, Office, Markdown, text, etc.           | Save a hosted copy                                    | Up to 20 items can be selected at a time                                  |
| Notes     | Content already organized in Cherry Studio  | A snapshot of the content at the time of import       | Later changes to the original note will not sync automatically            |
| Directory | A batch of local files under the same topic | Create source entries based on the directory contents | Do not import an unrelated directory as a whole                           |
| Link      | A single publicly accessible web page       | Save a snapshot of the web page at crawl time         | Login pages, script-rendered pages, or restricted pages may be incomplete |

{% hint style="warning" %}
Supported files include PDF, DOCX, DOC, PPTX, XLSX, XLS, MD, TXT, CSV, HTML, and EPUB. Scanned PDFs or image-based content also require OCR checking.
{% endhint %}

## Add and verify sources

{% stepper %}
{% step %}

### 1. Select the source

Open the knowledge base, click the Add Source button, and choose \[File], \[Note], \[Directory], or \[Link].
{% endstep %}

{% step %}

### 2. Confirm the selected content

Files and notes can be selected in batches; up to 20 items can be added interactively at a time. When there are more sources, add them in batches or use the directory entry point.
{% endstep %}

{% step %}

### 3. Handle naming conflicts

When a new source has the same name as an existing entry, choose \[Keep All] or \[Replace]. \[Replace] is usually chosen when updating policies, manuals, and note snapshots.

{% hint style="warning" %}
Choosing \[Keep All] allows both new and old content to participate in retrieval. Do this only when you truly need to query different versions in parallel, and indicate the date or version in the name.
{% endhint %}
{% endstep %}

{% step %}

### 4. Wait for processing to complete

The source will go through stages such as copying, reading, chunking, and indexing. Vector indexes will not be created if no embedding model is configured, but keyword indexes will still be created.

<figure><img src="/files/851212984cdd3ef47fd9778e231d7441c35c58ea" alt="包含多条已处理资料的员工差旅制度知识库"><figcaption><p>After the source becomes available, spot-check the body text and chunks.</p></figcaption></figure>
{% endstep %}

{% step %}

### 5. Spot-check the body text and chunks

Open the source to view the body text, or view the chunks from the source row menu. Focus on whether the title order, tables, OCR text, and key sentences have been split incorrectly.
{% endstep %}

{% step %}

### 6. Complete the retrieval test

Use a question with a clear answer to check the correct source and excerpt. After the source is updated, retest using the same set of questions.

<figure><img src="/files/c6f3bfaf5deb56fb89e9a46bf9e60343a52ba0e2" alt="召回测试中的来源、相关度、片段内容和排序"><figcaption><p>Final acceptance should be based on the source, excerpt completeness, and ranking, not just on whether results are returned.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

## Source status and handling methods

| Symptom                               | Possible cause                                                         | Handling method                                                    |
| ------------------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------ |
| Processing for a long time            | The file is large, or the parser or model is unavailable               | Check the original file, document processing, and embedding model  |
| Error displayed                       | Copying, reading, chunking, or indexing failed                         | Open the error message and handle it according to the failed stage |
| Missing body text or garbled text     | The file processor is not compatible, or scanned content was not OCRed | Change the document processing method or configure OCR             |
| Chunks are missing key sentences      | Chunk boundaries are not appropriate                                   | Adjust the chunks and then run \[Reindex]                          |
| Old and new versions are both matched | \[Keep All] was chosen for sources with the same name                  | Delete the old entry, or re-import and choose \[Replace]           |

## Reindex and delete

After the chunking, parser, or embedding settings change, old entries will not automatically apply the new settings. Use \[Reindex] for a single source, or select multiple sources and reindex them.

{% hint style="danger" %}
Deleting an entry will remove the hosted copy and index from the current knowledge base. It will not delete the original file or original note, but before deleting, you should still confirm whether the knowledge base contains the only copy.
{% endhint %}

## Configuration notes

| Configuration item       | Product default             | Suggested starting point                           | Effect                                                            | Applicable scenario                                       | Notes                                                         |
| ------------------------ | --------------------------- | -------------------------------------------------- | ----------------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------------------- |
| Number added at once     | Up to 20 items              | First add a small number of representative sources | Control the size of each import                                   | First time building the knowledge base or troubleshooting | Verify parsing and retrieval before large-scale import        |
| Handling same-name items | Choose when conflicts occur | Use \[Replace] when updating sources               | Decide whether new and old entries coexist                        | Policy, manual, and note updates                          | \[Keep All] may allow old content to participate in retrieval |
| Reindex                  | Run manually                | Run after settings changes                         | Make old sources use the new parsing, chunking, or model settings | Fine-tune or fix sources                                  | A retrieval test must be performed again after completion     |

## User case

Xiaolin updates the business travel policy every month. He imports the new file with the same name and chooses \[Replace]. After the source finishes processing, he spot-checks the body text and chunks, then uses fixed questions to test the lodging, transportation, and approval rules.

The completion standard is: old rules no longer appear in the retrieval results, and the conditions and amounts in the new rules can be matched consistently.

## Common questions

<details>

<summary>Will the knowledge base update automatically after I modify the original note?</summary>

No. Notes are imported as a snapshot of the content at that time. After modifying it, you need to add it again and choose \[Replace], or run \[Reindex] on the corresponding source.

</details>

<details>

<summary>Why does the web page only capture part of the content?</summary>

Pages that require login, depend on script rendering, or have access restrictions may not be fully captured. You can save the body text using files or notes first, then import it.

</details>

<details>

<summary>Will deleting a knowledge base entry delete the original file?</summary>

It will not delete the original file or original note, but it will remove the hosted copy and index from the knowledge base.

</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>Handle missing text, garbled characters, and scanned content.</td><td><a href="/pages/7d495aecf9165aca96855bc0d74b3e925728dedc">/pages/7d495aecf9165aca96855bc0d74b3e925728dedc</a></td></tr><tr><td><strong>Check materials and recall</strong></td><td>Verify retrieval quality with fixed questions.</td><td><a href="/pages/7c7a6d04d1e906eb7a89261dabeedb48874a9b8e">/pages/7c7a6d04d1e906eb7a89261dabeedb48874a9b8e</a></td></tr><tr><td><strong>Data, privacy, and maintenance</strong></td><td>Understand backup, deletion, and service boundaries.</td><td><a href="/pages/79d7d1d4aa8046a5b156be2497b3f18795dd88a8">/pages/79d7d1d4aa8046a5b156be2497b3f18795dd88a8</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/sources.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.
