Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. # Frequently Asked Questions
  2. ## General
  3. ### 1. What sets RAGFlow apart from other RAG products?
  4. 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.
  5. - Fine-grained document parsing: Document parsing involves images and tables, with the flexibility for you to intervene as needed.
  6. - Traceable answers with reduced hallucinations: You can trust RAGFlow's responses as you can view the citations and references supporting them.
  7. ### 2. Which languages does RAGFlow support?
  8. English, simplified Chinese, traditional Chinese for now.
  9. ## Performance
  10. ### 1. Why does it take longer for RAGFlow to parse a document than LangChain?
  11. 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.
  12. ### 2. Why does RAGFlow require more resources than other projects?
  13. RAGFlow has a number of built-in models for document structure parsing, which account for the additional computational resources.
  14. ## Feature
  15. ### 1. Which architectures or devices does RAGFlow support?
  16. Currently, we only support x86 CPU and Nvidia GPU.
  17. ### 2. Do you offer an API for integration with third-party applications?
  18. The corresponding APIs are now available. See the [Conversation API](./conversation_api.md) for more information.
  19. ### 3. Do you support stream output?
  20. No, this feature is still in development. Contributions are welcome.
  21. ### 4. Is it possible to share dialogue through URL?
  22. Yes, this feature is now available.
  23. ### 5. Do you support multiple rounds of dialogues, i.e., referencing previous dialogues as context for the current dialogue?
  24. This feature and the related APIs are still in development. Contributions are welcome.
  25. ## Troubleshooting
  26. ### 1. Issues with docker images
  27. #### 1.1 Due to the fast iteration of RAGFlow updates, it is recommended to build the image from scratch.
  28. ```
  29. $ git clone https://github.com/infiniflow/ragflow.git
  30. $ cd ragflow
  31. $ docker build -t infiniflow/ragflow:v0.3.0 .
  32. $ cd ragflow/docker
  33. $ chmod +x ./entrypoint.sh
  34. $ docker compose up -d
  35. ```
  36. #### 1.2 `process "/bin/sh -c cd ./web && npm i && npm run build"` failed
  37. 1. Check your network from within Docker, for example:
  38. ```bash
  39. curl https://hf-mirror.com
  40. ```
  41. 2. If your network works fine, the issue lies with the Docker network configuration. Adjust the Docker building accordingly:
  42. ```
  43. # Original:
  44. docker build -t infiniflow/ragflow:v0.3.0 .
  45. # Current:
  46. docker build -t infiniflow/ragflow:v0.3.0 . --network host
  47. ```
  48. ### 2. Issues with huggingface models.
  49. #### 2.1. `MaxRetryError: HTTPSConnectionPool(host='hf-mirror.com', port=443)`
  50. This error suggests that you do not have Internet access or are unable to connect to hf-mirror.com. Try the following:
  51. 1. Manually download the resource files from [huggingface.co/InfiniFlow/deepdoc](https://huggingface.co/InfiniFlow/deepdoc) to your local folder **~/deepdoc**.
  52. 2. Add a volumes to **docker-compose.yml**, for example:
  53. ```
  54. - ~/deepdoc:/ragflow/rag/res/deepdoc
  55. ```
  56. #### 2.2 `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'`
  57. 1. Check your network from within Docker, for example:
  58. ```bash
  59. curl https://hf-mirror.com
  60. ```
  61. 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:
  62. ```
  63. vim docker-compose-base.yml
  64. # Original configuration:
  65. networks:
  66. ragflow:
  67. driver: bridge
  68. # Modified configuration:
  69. networks:
  70. ragflow:
  71. driver: bridge
  72. driver_opts:
  73. com.docker.network.driver.mtu: 1450
  74. ```
  75. ### 3. Issues with RAGFlow servers
  76. #### 3.1 `WARNING: can't find /raglof/rag/res/borker.tm`
  77. Ignore this warning and continue. All system warnings can be ignored.
  78. #### 3.2 `network anomaly There is an abnormality in your network and you cannot connect to the server.`
  79. ![anomaly](https://github.com/infiniflow/ragflow/assets/93570324/beb7ad10-92e4-4a58-8886-bfb7cbd09e5d)
  80. You will not log in to RAGFlow unless the server is fully initialized. Run `docker logs -f ragflow-server`.
  81. *The server is successfully initialized, if your system displays the following:*
  82. ```
  83. ____ ______ __
  84. / __ \ ____ _ ____ _ / ____// /____ _ __
  85. / /_/ // __ `// __ `// /_ / // __ \| | /| / /
  86. / _, _// /_/ // /_/ // __/ / // /_/ /| |/ |/ /
  87. /_/ |_| \__,_/ \__, //_/ /_/ \____/ |__/|__/
  88. /____/
  89. * Running on all addresses (0.0.0.0)
  90. * Running on http://127.0.0.1:9380
  91. * Running on http://x.x.x.x:9380
  92. INFO:werkzeug:Press CTRL+C to quit
  93. ```
  94. ### 4. Issues with RAGFlow backend services
  95. #### 4.1 `dependency failed to start: container ragflow-mysql is unhealthy`
  96. `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** if mysql fails to start.
  97. #### 4.2 `Realtime synonym is disabled, since no redis connection`
  98. Ignore this warning and continue. All system warnings can be ignored.
  99. ![](https://github.com/infiniflow/ragflow/assets/93570324/ef5a6194-084a-4fe3-bdd5-1c025b40865c)
  100. #### 4.3 Why does it take so long to parse a 2MB document?
  101. Parsing requests have to wait in queue due to limited server resources. We are currently enhancing our algorithms and increasing computing power.
  102. #### 4.4 Why does my document parsing stall at under one percent?
  103. ![stall](https://github.com/infiniflow/ragflow/assets/93570324/3589cc25-c733-47d5-bbfc-fedb74a3da50)
  104. If your RAGFlow is deployed *locally*, try the following:
  105. 1. Check the log of your RAGFlow server to see if it is running properly:
  106. ```bash
  107. docker logs -f ragflow-server
  108. ```
  109. 2. Check if the **tast_executor.py** process exist.
  110. 3. Check if your RAGFlow server can access hf-mirror.com or huggingface.com.
  111. #### 4.5 `Index failure`
  112. An index failure usually indicates an unavailable Elasticsearch service.
  113. #### 4.6 How to check the log of RAGFlow?
  114. ```bash
  115. tail -f path_to_ragflow/docker/ragflow-logs/rag/*.log
  116. ```
  117. #### 4.7 How to check the status of each component in RAGFlow?
  118. ```bash
  119. $ docker ps
  120. ```
  121. *The system displays the following if all your RAGFlow components are running properly:*
  122. ```
  123. 5bc45806b680 infiniflow/ragflow:v0.3.0 "./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
  124. 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
  125. 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
  126. 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
  127. ```
  128. #### 4.8 `Exception: Can't connect to ES cluster`
  129. 1. Check the status of your Elasticsearch component:
  130. ```bash
  131. $ docker ps
  132. ```
  133. *The status of a 'healthy' Elasticsearch component in your RAGFlow should look as follows:*
  134. ```
  135. 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
  136. ```
  137. 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.
  138. 3. If your issue persists, ensure that the ES host setting is correct:
  139. - If you are running RAGFlow with Docker, it is in **docker/service_conf.yml**. Set it as follows:
  140. ```
  141. es:
  142. hosts: 'http://es01:9200'
  143. ```
  144. - If you run RAGFlow outside of Docker, verify the ES host setting in **conf/service_conf.yml** using:
  145. ```bash
  146. curl http://<IP_OF_ES>:<PORT_OF_ES>
  147. ```
  148. #### 4.9 `{"data":null,"retcode":100,"retmsg":"<NotFound '404: Not Found'>"}`
  149. Your IP address or port number may be incorrect. If you are using the default configurations, enter http://<IP_OF_YOUR_MACHINE> (**NOT `localhost`, NOT 9380, AND NO PORT NUMBER REQUIRED!**) in your browser. This should work.
  150. #### 4.10 `Ollama - Mistral instance running at 127.0.0.1:11434 but cannot add Ollama as model in RagFlow`
  151. A correct Ollama IP address and port is crucial to adding models to Ollama:
  152. - 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.
  153. - If you deploy RAGFlow locally, ensure that Ollama and RAGFlow are in the same LAN and can comunicate with each other.
  154. #### 4.11 Do you offer examples of using deepdoc to parse PDF or other files?
  155. Yes, we do. See the Python files under the **rag/app** folder.
  156. #### 4.12 Why did I fail to upload a 10MB+ file to my locally deployed RAGFlow?
  157. You probably forgot to update the **MAX_CONTENT_LENGTH** environment variable:
  158. 1. Add environment variable `MAX_CONTENT_LENGTH` to **ragflow/docker/.env**:
  159. ```
  160. MAX_CONTENT_LENGTH=100000000
  161. ```
  162. 2. Update **docker-compose.yml**:
  163. ```
  164. environment:
  165. - MAX_CONTENT_LENGTH=${MAX_CONTENT_LENGTH}
  166. ```
  167. 3. Restart the RAGFlow server:
  168. ```
  169. docker compose up ragflow -d
  170. ```
  171. *Now you should be able to upload files of sizes less than 100MB.*
  172. #### 4.13 `Table 'rag_flow.document' doesn't exist`
  173. This exception occurs when starting up the RAGFlow server. Try the following:
  174. 1. Prolong the sleep time: Go to **docker/entrypoint.sh**, locate line 26, and replace `sleep 60` with `sleep 280`.
  175. 2. If using Windows, ensure that the **entrypoint.sh** has LF end-lines.
  176. 3. Go to **docker/docker-compose.yml**, add the following:
  177. ```
  178. ./entrypoint.sh:/ragflow/entrypoint.sh
  179. ```
  180. 4. Change directory:
  181. ```bash
  182. cd docker
  183. ```
  184. 5. Stop the RAGFlow server:
  185. ```bash
  186. docker compose stop
  187. ```
  188. 6. Restart up the RAGFlow server:
  189. ```bash
  190. docker compose up
  191. ```
  192. #### 4.14 `hint : 102 Fail to access model Connection error`
  193. ![hint102](https://github.com/infiniflow/ragflow/assets/93570324/6633d892-b4f8-49b5-9a0a-37a0a8fba3d2)
  194. 1. Ensure that the RAGFlow server can access the base URL.
  195. 2. Do not forget to append **/v1/** to **http://IP:port**:
  196. **http://IP:port/v1/**
  197. ## Usage
  198. ### 1. How to increase the length of RAGFlow responses?
  199. 1. Right click the desired dialog to display the **Chat Configuration** window.
  200. 2. Switch to the **Model Setting** tab and adjust the **Max Tokens** slider to get the desired length.
  201. 3. Click **OK** to confirm your change.
  202. ### 2. What does Empty response mean? How to set it?
  203. 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.
  204. ### 3. Can I set the base URL for OpenAI somewhere?
  205. ![](https://github.com/infiniflow/ragflow/assets/93570324/8cfb6fa4-8a97-415d-b9fa-b6f405a055f3)
  206. ### 4. How to run RAGFlow with a locally deployed LLM?
  207. You can use Ollama to deploy local LLM. See [here](https://github.com/infiniflow/ragflow/blob/main/docs/ollama.md) for more information.
  208. ### 5. How to link up ragflow and ollama servers?
  209. - If RAGFlow is locally deployed, ensure that your RAGFlow and Ollama are in the same LAN.
  210. - If you are using our online demo, ensure that the IP address of your Ollama server is public and accessible.
  211. ### 6. How to configure RAGFlow to respond with 100% matched results, rather than utilizing LLM?
  212. 1. Click the **Knowledge Base** tab in the middle top of the page.
  213. 2. Right click the desired knowledge base to display the **Configuration** dialogue.
  214. 3. Choose **Q&A** as the chunk method and click **Save** to confirm your change.