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

# Document Preprocessing

Knowledge base document preprocessing is used to perform OCR and structural parsing on non-text content such as PDFs/images before vectorization, so the knowledge base can retrieve these materials correctly.

### Configure OCR provider

Open `Settings → Document Processing`, configure in order:

* **System OCR**: macOS users can use it out of the box (no configuration required); Windows users need to manually select an OCR engine
* **Document processing provider**: Default `MinerU`, can fill in `API Key` + `API Host`(default `https://mineru.net`); you can also switch to Tesseract / Paddle OCR / OpenVINO / third-party Provider

<figure><img src="/files/0f299a884b64b83a812266abb55e085b747bd668" alt=""><figcaption></figcaption></figure>

After clicking Get API KEY, the application address will open in the browser. Click Apply Now, fill out the form, obtain the API KEY, and enter it into the API KEY field.

<figure><img src="/files/93c4ed196ca4477e36c1ce54f7eb6b570cf29e60" alt=""><figcaption></figcaption></figure>

### Enable document preprocessing in the knowledge base

<figure><img src="/files/871b4521bf265de498a24d5120fc0378de2ce80d" alt=""><figcaption></figcaption></figure>

Turn on in the settings of the created knowledge base **Document preprocessing** toggle, and the OCR Provider configured in the previous step will be used automatically when adding files.

### Upload documents

<figure><img src="/files/763de4f4a19aa6f95f1f63d0ca82f65e39a3da57" alt=""><figcaption></figcaption></figure>

> You can use the search in the upper right corner to check the knowledge base results

### Use in conversation

<figure><img src="/files/431ee3ba53402f130d9b69a5f7620b318e240d4d" alt=""><figcaption></figcaption></figure>

> Knowledge base usage tips: Use**more powerful**models, you can change the knowledge base search mode to intent recognition. Intent recognition can describe your question more accurately and broadly.

### Enable knowledge base intent recognition

<figure><img src="/files/8e67c8439f61af190c4bc450d7c0c615908bd7e5" alt=""><figcaption></figcaption></figure>

***

### 💡 Get help and submit feedback

If you encounter any questions, bugs, or have suggestions for feature improvements during configuration or use, please refer to [Feedback and Suggestions](/docs/en-us/question-contact/suggestions.md) the official channels provided there.


---

# 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/document-preprocessing.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.
