Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. ---
  2. sidebar_position: 3
  3. slug: /faq
  4. ---
  5. # Frequently asked questions
  6. ## General
  7. ### 1. What sets RAGFlow apart from other RAG products?
  8. The "garbage in garbage out" status quo remains unchanged despite the fact that LLMs have advanced Natural Language Processing (NLP) significantly. In response, RAGFlow introduces two unique features compared to other Retrieval-Augmented Generation (RAG) products.
  9. - Fine-grained document parsing: Document parsing involves images and tables, with the flexibility for you to intervene as needed.
  10. - Traceable answers with reduced hallucinations: You can trust RAGFlow's responses as you can view the citations and references supporting them.
  11. ### 2. Which languages does RAGFlow support?
  12. English, simplified Chinese, traditional Chinese for now.
  13. ## Performance
  14. ### 1. Why does it take longer for RAGFlow to parse a document than LangChain?
  15. We put painstaking effort into document pre-processing tasks like layout analysis, table structure recognition, and OCR (Optical Character Recognition) using our vision model. This contributes to the additional time required.
  16. ### 2. Why does RAGFlow require more resources than other projects?
  17. RAGFlow has a number of built-in models for document structure parsing, which account for the additional computational resources.
  18. ## Feature
  19. ### 1. Which architectures or devices does RAGFlow support?
  20. Currently, we only support x86 CPU and Nvidia GPU.
  21. ### 2. Do you offer an API for integration with third-party applications?
  22. The corresponding APIs are now available. See the [RAGFlow API Reference](./api.md) for more information.
  23. ### 3. Do you support stream output?
  24. No, this feature is still in development. Contributions are welcome.
  25. ### 4. Is it possible to share dialogue through URL?
  26. Yes, this feature is now available.
  27. ### 5. Do you support multiple rounds of dialogues, i.e., referencing previous dialogues as context for the current dialogue?
  28. This feature and the related APIs are still in development. Contributions are welcome.
  29. ## Troubleshooting
  30. ### 1. Issues with docker images
  31. #### 1.1 How to build the RAGFlow image from scratch?
  32. ```
  33. $ git clone https://github.com/infiniflow/ragflow.git
  34. $ cd ragflow
  35. $ docker build -t infiniflow/ragflow:latest .
  36. $ cd ragflow/docker
  37. $ chmod +x ./entrypoint.sh
  38. $ docker compose up -d
  39. ```
  40. #### 1.2 `process "/bin/sh -c cd ./web && npm i && npm run build"` failed
  41. 1. Check your network from within Docker, for example:
  42. ```bash
  43. curl https://hf-mirror.com
  44. ```
  45. 2. If your network works fine, the issue lies with the Docker network configuration. Replace the Docker building command:
  46. ```bash
  47. docker build -t infiniflow/ragflow:vX.Y.Z.
  48. ```
  49. With this:
  50. ```bash
  51. docker build -t infiniflow/ragflow:vX.Y.Z. --network host
  52. ```
  53. ### 2. Issues with huggingface models
  54. #### 2.1 Cannot access https://huggingface.co
  55. A *locally* deployed RAGflow downloads OCR and embedding modules from [Huggingface website](https://huggingface.co) by default. If your machine is unable to access this site, the following error occurs and PDF parsing fails:
  56. ```
  57. FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/huggingface/hub/models--InfiniFlow--deepdoc/snapshots/be0c1e50eef6047b412d1800aa89aba4d275f997/ocr.res'
  58. ```
  59. To fix this issue, use https://hf-mirror.com instead:
  60. 1. Stop all containers and remove all related resources:
  61. ```bash
  62. cd ragflow/docker/
  63. docker compose down
  64. ```
  65. 2. Replace `https://huggingface.co` with `https://hf-mirror.com` in **ragflow/docker/docker-compose.yml**.
  66. 3. Start up the server:
  67. ```bash
  68. docker compose up -d
  69. ```
  70. #### 2.2. `MaxRetryError: HTTPSConnectionPool(host='hf-mirror.com', port=443)`
  71. This error suggests that you do not have Internet access or are unable to connect to hf-mirror.com. Try the following:
  72. 1. Manually download the resource files from [huggingface.co/InfiniFlow/deepdoc](https://huggingface.co/InfiniFlow/deepdoc) to your local folder **~/deepdoc**.
  73. 2. Add a volumes to **docker-compose.yml**, for example:
  74. ```
  75. - ~/deepdoc:/ragflow/rag/res/deepdoc
  76. ```
  77. #### 2.3 `FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/huggingface/hub/models--InfiniFlow--deepdoc/snapshots/FileNotFoundError: [Errno 2] No such file or directory: '/ragflow/rag/res/deepdoc/ocr.res'be0c1e50eef6047b412d1800aa89aba4d275f997/ocr.res'`
  78. 1. Check your network from within Docker, for example:
  79. ```bash
  80. curl https://hf-mirror.com
  81. ```
  82. 2. Run `ifconfig` to check the `mtu` value. If the server's `mtu` is `1450` while the NIC's `mtu` in the container is `1500`, this mismatch may cause network instability. Adjust the `mtu` policy as follows:
  83. ```
  84. vim docker-compose-base.yml
  85. # Original configuration:
  86. networks:
  87. ragflow:
  88. driver: bridge
  89. # Modified configuration:
  90. networks:
  91. ragflow:
  92. driver: bridge
  93. driver_opts:
  94. com.docker.network.driver.mtu: 1450
  95. ```
  96. ### 3. Issues with RAGFlow servers
  97. #### 3.1 `WARNING: can't find /raglof/rag/res/borker.tm`
  98. Ignore this warning and continue. All system warnings can be ignored.
  99. #### 3.2 `network anomaly There is an abnormality in your network and you cannot connect to the server.`
  100. ![anomaly](https://github.com/infiniflow/ragflow/assets/93570324/beb7ad10-92e4-4a58-8886-bfb7cbd09e5d)
  101. You will not log in to RAGFlow unless the server is fully initialized. Run `docker logs -f ragflow-server`.
  102. *The server is successfully initialized, if your system displays the following:*
  103. ```
  104. ____ ______ __
  105. / __ \ ____ _ ____ _ / ____// /____ _ __
  106. / /_/ // __ `// __ `// /_ / // __ \| | /| / /
  107. / _, _// /_/ // /_/ // __/ / // /_/ /| |/ |/ /
  108. /_/ |_| \__,_/ \__, //_/ /_/ \____/ |__/|__/
  109. /____/
  110. * Running on all addresses (0.0.0.0)
  111. * Running on http://127.0.0.1:9380
  112. * Running on http://x.x.x.x:9380
  113. INFO:werkzeug:Press CTRL+C to quit
  114. ```
  115. ### 4. Issues with RAGFlow backend services
  116. #### 4.1 `dependency failed to start: container ragflow-mysql is unhealthy`
  117. `dependency failed to start: container ragflow-mysql is unhealthy` means that your MySQL container failed to start. Try replacing `mysql:5.7.18` with `mariadb:10.5.8` in **docker-compose-base.yml**.
  118. #### 4.2 `Realtime synonym is disabled, since no redis connection`
  119. Ignore this warning and continue. All system warnings can be ignored.
  120. ![](https://github.com/infiniflow/ragflow/assets/93570324/ef5a6194-084a-4fe3-bdd5-1c025b40865c)
  121. #### 4.3 Why does it take so long to parse a 2MB document?
  122. Parsing requests have to wait in queue due to limited server resources. We are currently enhancing our algorithms and increasing computing power.
  123. #### 4.4 Why does my document parsing stall at under one percent?
  124. ![stall](https://github.com/infiniflow/ragflow/assets/93570324/3589cc25-c733-47d5-bbfc-fedb74a3da50)
  125. If your RAGFlow is deployed *locally*, try the following:
  126. 1. Check the log of your RAGFlow server to see if it is running properly:
  127. ```bash
  128. docker logs -f ragflow-server
  129. ```
  130. 2. Check if the **task_executor.py** process exists.
  131. 3. Check if your RAGFlow server can access hf-mirror.com or huggingface.com.
  132. #### 4.5 Why does my pdf parsing stall near completion, while the log does not show any error?
  133. If your RAGFlow is deployed *locally*, the parsing process is likely killed due to insufficient RAM. Try increasing your memory allocation by increasing the `MEM_LIMIT` value in **docker/.env**.
  134. > Ensure that you restart up your RAGFlow server for your changes to take effect!
  135. > ```bash
  136. > docker compose stop
  137. > ```
  138. > ```bash
  139. > docker compose up -d
  140. > ```
  141. ![nearcompletion](https://github.com/infiniflow/ragflow/assets/93570324/563974c3-f8bb-4ec8-b241-adcda8929cbb)
  142. #### 4.6 `Index failure`
  143. An index failure usually indicates an unavailable Elasticsearch service.
  144. #### 4.7 How to check the log of RAGFlow?
  145. ```bash
  146. tail -f path_to_ragflow/docker/ragflow-logs/rag/*.log
  147. ```
  148. #### 4.8 How to check the status of each component in RAGFlow?
  149. ```bash
  150. $ docker ps
  151. ```
  152. *The system displays the following if all your RAGFlow components are running properly:*
  153. ```
  154. 5bc45806b680 infiniflow/ragflow:latest "./entrypoint.sh" 11 hours ago Up 11 hours 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:9380->9380/tcp, :::9380->9380/tcp ragflow-server
  155. 91220e3285dd docker.elastic.co/elasticsearch/elasticsearch:8.11.3 "/bin/tini -- /usr/l…" 11 hours ago Up 11 hours (healthy) 9300/tcp, 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp ragflow-es-01
  156. d8c86f06c56b mysql:5.7.18 "docker-entrypoint.s…" 7 days ago Up 16 seconds (healthy) 0.0.0.0:3306->3306/tcp, :::3306->3306/tcp ragflow-mysql
  157. cd29bcb254bc quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z "/usr/bin/docker-ent…" 2 weeks ago Up 11 hours 0.0.0.0:9001->9001/tcp, :::9001->9001/tcp, 0.0.0.0:9000->9000/tcp, :::9000->9000/tcp ragflow-minio
  158. ```
  159. #### 4.9 `Exception: Can't connect to ES cluster`
  160. 1. Check the status of your Elasticsearch component:
  161. ```bash
  162. $ docker ps
  163. ```
  164. *The status of a 'healthy' Elasticsearch component in your RAGFlow should look as follows:*
  165. ```
  166. 91220e3285dd docker.elastic.co/elasticsearch/elasticsearch:8.11.3 "/bin/tini -- /usr/l…" 11 hours ago Up 11 hours (healthy) 9300/tcp, 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp ragflow-es-01
  167. ```
  168. 2. If your container keeps restarting, ensure `vm.max_map_count` >= 262144 as per [this README](https://github.com/infiniflow/ragflow?tab=readme-ov-file#-start-up-the-server). Updating the `vm.max_map_count` value in **/etc/sysctl.conf** is required, if you wish to keep your change permanent. This configuration works only for Linux.
  169. 3. If your issue persists, ensure that the ES host setting is correct:
  170. - If you are running RAGFlow with Docker, it is in **docker/service_conf.yml**. Set it as follows:
  171. ```
  172. es:
  173. hosts: 'http://es01:9200'
  174. ```
  175. - If you run RAGFlow outside of Docker, verify the ES host setting in **conf/service_conf.yml** using:
  176. ```bash
  177. curl http://<IP_OF_ES>:<PORT_OF_ES>
  178. ```
  179. #### 4.10 Can't start ES container and get `Elasticsearch did not exit normally`
  180. This is because you forgot to update the `vm.max_map_count` value in **/etc/sysctl.conf** and your change to this value was reset after a system reboot.
  181. #### 4.11 `{"data":null,"retcode":100,"retmsg":"<NotFound '404: Not Found'>"}`
  182. Your IP address or port number may be incorrect. If you are using the default configurations, enter `http://<IP_OF_YOUR_MACHINE>` (**NOT 9380, AND NO PORT NUMBER REQUIRED!**) in your browser. This should work.
  183. #### 4.12 `Ollama - Mistral instance running at 127.0.0.1:11434 but cannot add Ollama as model in RagFlow`
  184. A correct Ollama IP address and port is crucial to adding models to Ollama:
  185. - If you are on demo.ragflow.io, ensure that the server hosting Ollama has a publicly accessible IP address.Note that 127.0.0.1 is not a publicly accessible IP address.
  186. - If you deploy RAGFlow locally, ensure that Ollama and RAGFlow are in the same LAN and can comunicate with each other.
  187. #### 4.13 Do you offer examples of using deepdoc to parse PDF or other files?
  188. Yes, we do. See the Python files under the **rag/app** folder.
  189. #### 4.14 Why did I fail to upload a 10MB+ file to my locally deployed RAGFlow?
  190. You probably forgot to update the **MAX_CONTENT_LENGTH** environment variable:
  191. 1. Add environment variable `MAX_CONTENT_LENGTH` to **ragflow/docker/.env**:
  192. ```
  193. MAX_CONTENT_LENGTH=100000000
  194. ```
  195. 2. Update **docker-compose.yml**:
  196. ```
  197. environment:
  198. - MAX_CONTENT_LENGTH=${MAX_CONTENT_LENGTH}
  199. ```
  200. 3. Restart the RAGFlow server:
  201. ```
  202. docker compose up ragflow -d
  203. ```
  204. *Now you should be able to upload files of sizes less than 100MB.*
  205. #### 4.15 `Table 'rag_flow.document' doesn't exist`
  206. This exception occurs when starting up the RAGFlow server. Try the following:
  207. 1. Prolong the sleep time: Go to **docker/entrypoint.sh**, locate line 26, and replace `sleep 60` with `sleep 280`.
  208. 2. If using Windows, ensure that the **entrypoint.sh** has LF end-lines.
  209. 3. Go to **docker/docker-compose.yml**, add the following:
  210. ```
  211. ./entrypoint.sh:/ragflow/entrypoint.sh
  212. ```
  213. 4. Change directory:
  214. ```bash
  215. cd docker
  216. ```
  217. 5. Stop the RAGFlow server:
  218. ```bash
  219. docker compose stop
  220. ```
  221. 6. Restart up the RAGFlow server:
  222. ```bash
  223. docker compose up
  224. ```
  225. #### 4.16 `hint : 102 Fail to access model Connection error`
  226. ![hint102](https://github.com/infiniflow/ragflow/assets/93570324/6633d892-b4f8-49b5-9a0a-37a0a8fba3d2)
  227. 1. Ensure that the RAGFlow server can access the base URL.
  228. 2. Do not forget to append **/v1/** to **http://IP:port**:
  229. **http://IP:port/v1/**
  230. #### 4.17 `FileNotFoundError: [Errno 2] No such file or directory`
  231. 1. Check if the status of your minio container is healthy:
  232. ```bash
  233. docker ps
  234. ```
  235. 2. Ensure that the username and password settings of MySQL and MinIO in **docker/.env** are in line with those in **docker/service_conf.yml**.
  236. ## Usage
  237. ### 1. How to increase the length of RAGFlow responses?
  238. 1. Right click the desired dialog to display the **Chat Configuration** window.
  239. 2. Switch to the **Model Setting** tab and adjust the **Max Tokens** slider to get the desired length.
  240. 3. Click **OK** to confirm your change.
  241. ### 2. What does Empty response mean? How to set it?
  242. You limit what the system responds to what you specify in **Empty response** if nothing is retrieved from your knowledge base. If you do not specify anything in **Empty response**, you let your LLM improvise, giving it a chance to hallucinate.
  243. ### 3. Can I set the base URL for OpenAI somewhere?
  244. ![](https://github.com/infiniflow/ragflow/assets/93570324/8cfb6fa4-8a97-415d-b9fa-b6f405a055f3)
  245. ### 4. How to run RAGFlow with a locally deployed LLM?
  246. You can use Ollama to deploy local LLM. See [here](https://github.com/infiniflow/ragflow/blob/main/docs/guides/deploy_local_llm.md) for more information.
  247. ### 5. How to link up ragflow and ollama servers?
  248. - If RAGFlow is locally deployed, ensure that your RAGFlow and Ollama are in the same LAN.
  249. - If you are using our online demo, ensure that the IP address of your Ollama server is public and accessible.
  250. ### 6. How to configure RAGFlow to respond with 100% matched results, rather than utilizing LLM?
  251. 1. Click **Knowledge Base** in the middle top of the page.
  252. 2. Right click the desired knowledge base to display the **Configuration** dialogue.
  253. 3. Choose **Q&A** as the chunk method and click **Save** to confirm your change.
  254. ### 7. Do I need to connect to Redis?
  255. No, connecting to Redis is not required.
  256. ### 8. `Error: Range of input length should be [1, 30000]`
  257. This error occurs because there are too many chunks matching your search criteria. Try reducing the **TopN** and increasing **Similarity threshold** to fix this issue:
  258. 1. Click **Chat** in the middle top of the page.
  259. 2. Right click the desired conversation > **Edit** > **Prompt Engine**
  260. 3. Reduce the **TopN** and/or raise **Silimarity threshold**.
  261. 4. Click **OK** to confirm your changes.
  262. ![topn](https://github.com/infiniflow/ragflow/assets/93570324/7ec72ab3-0dd2-4cff-af44-e2663b67b2fc)
  263. ### 9. How to upgrade RAGFlow?
  264. You can upgrade RAGFlow to either the dev version or the latest version:
  265. - Dev versions are for developers and contributors. They are published on a nightly basis and may crash because they are not fully tested. We cannot guarantee their validity and you are at your own risk trying out latest, untested features.
  266. - The latest version refers to the most recent, officially published release. It is stable and works best with regular users.
  267. To upgrade RAGFlow to the dev version:
  268. 1. Pull the latest source code
  269. ```bash
  270. cd ragflow
  271. git pull
  272. ```
  273. 2. If you used `docker compose up -d` to start up RAGFlow server:
  274. ```bash
  275. docker pull infiniflow/ragflow:dev
  276. ```
  277. ```bash
  278. docker compose up ragflow -d
  279. ```
  280. 3. If you used `docker compose -f docker-compose-CN.yml up -d` to start up RAGFlow server:
  281. ```bash
  282. docker pull swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev
  283. ```
  284. ```bash
  285. docker compose -f docker-compose-CN.yml up -d
  286. ```
  287. To upgrade RAGFlow to the latest version:
  288. 1. Update **ragflow/docker/.env** as follows:
  289. ```bash
  290. RAGFLOW_VERSION=latest
  291. ```
  292. 2. Pull the latest source code:
  293. ```bash
  294. cd ragflow
  295. git pull
  296. ```
  297. 3. If you used `docker compose up -d` to start up RAGFlow server:
  298. ```bash
  299. docker pull infiniflow/ragflow:latest
  300. ```
  301. ```bash
  302. docker compose up ragflow -d
  303. ```
  304. 4. If you used `docker compose -f docker-compose-CN.yml up -d` to start up RAGFlow server:
  305. ```bash
  306. docker pull swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:latest
  307. ```
  308. ```bash
  309. docker compose -f docker-compose-CN.yml up -d
  310. ```