Yingfeng commited on
Commit
8a2ce44
·
1 Parent(s): ae35e13

Adjust the structure of FAQ (#479)

Browse files

### Type of change

- [x] Documentation Update

Files changed (1) hide show
  1. docs/faq.md +144 -58
docs/faq.md CHANGED
@@ -2,99 +2,160 @@
2
 
3
  ## General
4
 
5
- ### What sets RAGFlow apart from other RAG products?
6
 
7
  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.
8
 
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
 
12
- ### Which languages does RAGFlow support?
13
 
14
  English, simplified Chinese, traditional Chinese for now.
15
 
16
  ## Performance
17
 
18
- ### Why does it take longer for RAGFlow to parse a document than LangChain?
19
 
20
  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.
21
 
 
 
 
 
22
  ## Feature
23
 
24
- ### Which architectures or devices does RAGFlow support?
25
 
26
- ARM64 and Ascend GPU are not supported.
27
 
28
- ### Do you offer an API for integration with third-party applications?
29
 
30
- These APIs are still in development. Contributions are welcome.
31
 
32
- ### Do you support stream output?
33
 
34
  No, this feature is still in development. Contributions are welcome.
35
 
36
- ### Is it possible to share dialogue through URL?
37
 
38
- This feature and the related APIs are still in development. Contributions are welcome.
39
 
40
- ### Do you support multiple rounds of dialogues, i.e., referencing previous dialogues as context for the current dialogue?
41
 
42
  This feature and the related APIs are still in development. Contributions are welcome.
43
 
44
- ## Configurations
45
 
46
- ### How to increase the length of RAGFlow responses?
47
 
48
- 1. Right click the desired dialog to display the **Chat Configuration** window.
49
- 2. Switch to the **Model Setting** tab and adjust the **Max Tokens** slider to get the desired length.
50
- 3. Click **OK** to confirm your change.
51
 
 
52
 
53
- ### What does Empty response mean? How to set it?
 
 
 
 
 
 
 
54
 
55
- 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.
56
 
57
- ### Can I set the base URL for OpenAI somewhere?
 
 
 
58
 
59
- ![](https://github.com/infiniflow/ragflow/assets/93570324/8cfb6fa4-8a97-415d-b9fa-b6f405a055f3)
 
 
 
 
 
 
60
 
 
61
 
62
- ### How to run RAGFlow with a locally deployed LLM?
63
 
64
- You can use Ollama to deploy local LLM. See [here](https://github.com/infiniflow/ragflow/blob/main/docs/ollama.md) for more information.
65
 
66
- ### How to link up ragflow and ollama servers?
 
 
 
 
67
 
68
- - If RAGFlow is locally deployed, ensure that your RAGFlow and Ollama are in the same LAN.
69
- - If you are using our online demo, ensure that the IP address of your Ollama server is public and accessible.
70
 
71
- ### How to configure RAGFlow to respond with 100% matched results, rather than utilizing LLM?
 
 
 
 
72
 
73
- 1. Click the **Knowledge Base** tab in the middle top of the page.
74
- 2. Right click the desired knowledge base to display the **Configuration** dialogue.
75
- 3. Choose **Q&A** as the chunk method and click **Save** to confirm your change.
 
 
 
 
 
 
 
 
 
 
76
 
77
- ## Debugging
78
 
79
- ### `WARNING: can't find /raglof/rag/res/borker.tm`
80
 
81
  Ignore this warning and continue. All system warnings can be ignored.
82
 
83
- ### `dependency failed to start: container ragflow-mysql is unhealthy`
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
- `dependency failed to start: container ragflow-mysql is unhealthy` means that your MySQL container failed to start. If you are using a Mac with an M1/M2 chip, replace `mysql:5.7.18` with `mariadb:10.5.8` in **docker-compose-base.yml**.
86
 
87
- ### `Realtime synonym is disabled, since no redis connection`
 
 
88
 
89
  Ignore this warning and continue. All system warnings can be ignored.
90
 
91
  ![](https://github.com/infiniflow/ragflow/assets/93570324/ef5a6194-084a-4fe3-bdd5-1c025b40865c)
92
 
93
- ### Why does it take so long to parse a 2MB document?
94
 
95
  Parsing requests have to wait in queue due to limited server resources. We are currently enhancing our algorithms and increasing computing power.
96
 
97
- ### Why does my document parsing stall at under one percent?
98
 
99
  ![stall](https://github.com/infiniflow/ragflow/assets/93570324/3589cc25-c733-47d5-bbfc-fedb74a3da50)
100
 
@@ -107,27 +168,18 @@ docker logs -f ragflow-server
107
  2. Check if the **tast_executor.py** process exist.
108
  3. Check if your RAGFlow server can access hf-mirror.com or huggingface.com.
109
 
110
- ### `MaxRetryError: HTTPSConnectionPool(host='hf-mirror.com', port=443)`
111
-
112
- This error suggests that you do not have Internet access or are unable to connect to hf-mirror.com. Try the following:
113
-
114
- 1. Manually download the resource files from [huggingface.co/InfiniFlow/deepdoc](https://huggingface.co/InfiniFlow/deepdoc) to your local folder **~/deepdoc**.
115
- 2. Add a volumes to **docker-compose.yml**, for example:
116
- ```
117
- - ~/deepdoc:/ragflow/rag/res/deepdoc
118
- ```
119
 
120
- ### `Index failure`
121
 
122
  An index failure usually indicates an unavailable Elasticsearch service.
123
 
124
- ### How to check the log of RAGFlow?
125
 
126
  ```bash
127
  tail -f path_to_ragflow/docker/ragflow-logs/rag/*.log
128
  ```
129
 
130
- ### How to check the status of each component in RAGFlow?
131
 
132
  ```bash
133
  $ docker ps
@@ -141,7 +193,7 @@ d8c86f06c56b mysql:5.7.18 "docker-entrypoint.s…" 7 days ago Up
141
  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
142
  ```
143
 
144
- ### `Exception: Can't connect to ES cluster`
145
 
146
  1. Check the status of your Elasticsearch component:
147
 
@@ -153,7 +205,7 @@ $ docker ps
153
  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
154
  ```
155
 
156
- 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).
157
 
158
 
159
  3. If your issue persists, ensure that the ES host setting is correct:
@@ -169,22 +221,22 @@ $ docker ps
169
  ```
170
 
171
 
172
- ### `{"data":null,"retcode":100,"retmsg":"<NotFound '404: Not Found'>"}`
173
 
174
  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.
175
 
176
- ### `Ollama - Mistral instance running at 127.0.0.1:11434 but cannot add Ollama as model in RagFlow`
177
 
178
  A correct Ollama IP address and port is crucial to adding models to Ollama:
179
 
180
  - 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.
181
  - If you deploy RAGFlow locally, ensure that Ollama and RAGFlow are in the same LAN and can comunicate with each other.
182
 
183
- ### Do you offer examples of using deepdoc to parse PDF or other files?
184
 
185
  Yes, we do. See the Python files under the **rag/app** folder.
186
 
187
- ### Why did I fail to upload a 10MB+ file to my locally deployed RAGFlow?
188
 
189
  You probably forgot to update the **MAX_CONTENT_LENGTH** environment variable:
190
 
@@ -196,14 +248,14 @@ MAX_CONTENT_LENGTH=100000000
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
 
206
- ### `Table 'rag_flow.document' doesn't exist`
207
 
208
  This exception occurs when starting up the RAGFlow server. Try the following:
209
 
@@ -226,10 +278,44 @@ This exception occurs when starting up the RAGFlow server. Try the following:
226
  docker compose up
227
  ```
228
 
229
- ### `hint : 102 Fail to access model Connection error`
230
 
231
  ![hint102](https://github.com/infiniflow/ragflow/assets/93570324/6633d892-b4f8-49b5-9a0a-37a0a8fba3d2)
232
 
233
  1. Ensure that the RAGFlow server can access the base URL.
234
  2. Do not forget to append **/v1/** to **http://IP:port**:
235
- **http://IP:port/v1/**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  ## General
4
 
5
+ ### 1. What sets RAGFlow apart from other RAG products?
6
 
7
  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.
8
 
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
 
12
+ ### 2. Which languages does RAGFlow support?
13
 
14
  English, simplified Chinese, traditional Chinese for now.
15
 
16
  ## Performance
17
 
18
+ ### 1. Why does it take longer for RAGFlow to parse a document than LangChain?
19
 
20
  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.
21
 
22
+ ### 2. Why does RAGFlow require more resources than other projects?
23
+
24
+ RAGFlow has a number of built-in models for document structure parsing, which account for the additional computational resources.
25
+
26
  ## Feature
27
 
28
+ ### 1. Which architectures or devices does RAGFlow support?
29
 
30
+ Currently, we only support x86 CPU and Nvidia GPU.
31
 
32
+ ### 2. Do you offer an API for integration with third-party applications?
33
 
34
+ The corresponding APIs are now available. See the [Conversation API](./conversation_api.md) for more information.
35
 
36
+ ### 3. Do you support stream output?
37
 
38
  No, this feature is still in development. Contributions are welcome.
39
 
40
+ ### 4. Is it possible to share dialogue through URL?
41
 
42
+ Yes, this feature is now available.
43
 
44
+ ### 5. Do you support multiple rounds of dialogues, i.e., referencing previous dialogues as context for the current dialogue?
45
 
46
  This feature and the related APIs are still in development. Contributions are welcome.
47
 
 
48
 
49
+ ## Troubleshooting
50
 
51
+ ### 1. Issues with docker images
 
 
52
 
53
+ #### 1.1 Due to the fast iteration of RAGFlow updates, it is recommended to build the image from scratch.
54
 
55
+ ```
56
+ $ git clone https://github.com/infiniflow/ragflow.git
57
+ $ cd ragflow
58
+ $ docker build -t infiniflow/ragflow:v0.3.0 .
59
+ $ cd ragflow/docker
60
+ $ chmod +x ./entrypoint.sh
61
+ $ docker compose up -d
62
+ ```
63
 
64
+ #### 1.2 `process "/bin/sh -c cd ./web && npm i && npm run build"` failed
65
 
66
+ 1. Check your network from within Docker, for example:
67
+ ```bash
68
+ curl https://hf-mirror.com
69
+ ```
70
 
71
+ 2. If your network works fine, the issue lies with the Docker network configuration. Adjust the Docker building accordingly:
72
+ ```
73
+ # Original:
74
+ docker build -t infiniflow/ragflow:v0.3.0 .
75
+ # Current:
76
+ docker build -t infiniflow/ragflow:v0.3.0 . --network host
77
+ ```
78
 
79
+ ### 2. Issues with huggingface models.
80
 
81
+ #### 2.1. `MaxRetryError: HTTPSConnectionPool(host='hf-mirror.com', port=443)`
82
 
83
+ This error suggests that you do not have Internet access or are unable to connect to hf-mirror.com. Try the following:
84
 
85
+ 1. Manually download the resource files from [huggingface.co/InfiniFlow/deepdoc](https://huggingface.co/InfiniFlow/deepdoc) to your local folder **~/deepdoc**.
86
+ 2. Add a volumes to **docker-compose.yml**, for example:
87
+ ```
88
+ - ~/deepdoc:/ragflow/rag/res/deepdoc
89
+ ```
90
 
91
+ #### 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'`
 
92
 
93
+ 1. Check your network from within Docker, for example:
94
+ ```bash
95
+ curl https://hf-mirror.com
96
+ ```
97
+ 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:
98
 
99
+ ```
100
+ vim docker-compose-base.yml
101
+ # Original configuration:
102
+ networks:
103
+ ragflow:
104
+ driver: bridge
105
+ # Modified configuration:
106
+ networks:
107
+ ragflow:
108
+ driver: bridge
109
+ driver_opts:
110
+ com.docker.network.driver.mtu: 1450
111
+ ```
112
 
113
+ ### 3. Issues with RAGFlow servers
114
 
115
+ #### 3.1 `WARNING: can't find /raglof/rag/res/borker.tm`
116
 
117
  Ignore this warning and continue. All system warnings can be ignored.
118
 
119
+ #### 3.2 `network anomaly There is an abnormality in your network and you cannot connect to the server.`
120
+
121
+ ![anomaly](https://github.com/infiniflow/ragflow/assets/93570324/beb7ad10-92e4-4a58-8886-bfb7cbd09e5d)
122
+
123
+ You will not log in to RAGFlow unless the server is fully initialized. Run `docker logs -f ragflow-server`.
124
+
125
+ *The server is successfully initialized, if your system displays the following:*
126
+
127
+ ```
128
+ ____ ______ __
129
+ / __ \ ____ _ ____ _ / ____// /____ _ __
130
+ / /_/ // __ `// __ `// /_ / // __ \| | /| / /
131
+ / _, _// /_/ // /_/ // __/ / // /_/ /| |/ |/ /
132
+ /_/ |_| \__,_/ \__, //_/ /_/ \____/ |__/|__/
133
+ /____/
134
+
135
+ * Running on all addresses (0.0.0.0)
136
+ * Running on http://127.0.0.1:9380
137
+ * Running on http://x.x.x.x:9380
138
+ INFO:werkzeug:Press CTRL+C to quit
139
+ ```
140
+
141
+
142
+ ### 4. Issues with RAGFlow backend services
143
 
144
+ #### 4.1 `dependency failed to start: container ragflow-mysql is unhealthy`
145
 
146
+ `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.
147
+
148
+ #### 4.2 `Realtime synonym is disabled, since no redis connection`
149
 
150
  Ignore this warning and continue. All system warnings can be ignored.
151
 
152
  ![](https://github.com/infiniflow/ragflow/assets/93570324/ef5a6194-084a-4fe3-bdd5-1c025b40865c)
153
 
154
+ #### 4.3 Why does it take so long to parse a 2MB document?
155
 
156
  Parsing requests have to wait in queue due to limited server resources. We are currently enhancing our algorithms and increasing computing power.
157
 
158
+ #### 4.4 Why does my document parsing stall at under one percent?
159
 
160
  ![stall](https://github.com/infiniflow/ragflow/assets/93570324/3589cc25-c733-47d5-bbfc-fedb74a3da50)
161
 
 
168
  2. Check if the **tast_executor.py** process exist.
169
  3. Check if your RAGFlow server can access hf-mirror.com or huggingface.com.
170
 
 
 
 
 
 
 
 
 
 
171
 
172
+ #### 4.5 `Index failure`
173
 
174
  An index failure usually indicates an unavailable Elasticsearch service.
175
 
176
+ #### 4.6 How to check the log of RAGFlow?
177
 
178
  ```bash
179
  tail -f path_to_ragflow/docker/ragflow-logs/rag/*.log
180
  ```
181
 
182
+ #### 4.7 How to check the status of each component in RAGFlow?
183
 
184
  ```bash
185
  $ docker ps
 
193
  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
194
  ```
195
 
196
+ #### 4.8 `Exception: Can't connect to ES cluster`
197
 
198
  1. Check the status of your Elasticsearch component:
199
 
 
205
  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
206
  ```
207
 
208
+ 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.
209
 
210
 
211
  3. If your issue persists, ensure that the ES host setting is correct:
 
221
  ```
222
 
223
 
224
+ #### 4.9 `{"data":null,"retcode":100,"retmsg":"<NotFound '404: Not Found'>"}`
225
 
226
  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.
227
 
228
+ #### 4.10 `Ollama - Mistral instance running at 127.0.0.1:11434 but cannot add Ollama as model in RagFlow`
229
 
230
  A correct Ollama IP address and port is crucial to adding models to Ollama:
231
 
232
  - 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.
233
  - If you deploy RAGFlow locally, ensure that Ollama and RAGFlow are in the same LAN and can comunicate with each other.
234
 
235
+ #### 4.11 Do you offer examples of using deepdoc to parse PDF or other files?
236
 
237
  Yes, we do. See the Python files under the **rag/app** folder.
238
 
239
+ #### 4.12 Why did I fail to upload a 10MB+ file to my locally deployed RAGFlow?
240
 
241
  You probably forgot to update the **MAX_CONTENT_LENGTH** environment variable:
242
 
 
248
  ```
249
  environment:
250
  - MAX_CONTENT_LENGTH=${MAX_CONTENT_LENGTH}
251
+ ```
252
  3. Restart the RAGFlow server:
253
  ```
254
  docker compose up ragflow -d
255
  ```
256
  *Now you should be able to upload files of sizes less than 100MB.*
257
 
258
+ #### 4.13 `Table 'rag_flow.document' doesn't exist`
259
 
260
  This exception occurs when starting up the RAGFlow server. Try the following:
261
 
 
278
  docker compose up
279
  ```
280
 
281
+ #### 4.14 `hint : 102 Fail to access model Connection error`
282
 
283
  ![hint102](https://github.com/infiniflow/ragflow/assets/93570324/6633d892-b4f8-49b5-9a0a-37a0a8fba3d2)
284
 
285
  1. Ensure that the RAGFlow server can access the base URL.
286
  2. Do not forget to append **/v1/** to **http://IP:port**:
287
+ **http://IP:port/v1/**
288
+
289
+
290
+ ## Usage
291
+
292
+ ### 1. How to increase the length of RAGFlow responses?
293
+
294
+ 1. Right click the desired dialog to display the **Chat Configuration** window.
295
+ 2. Switch to the **Model Setting** tab and adjust the **Max Tokens** slider to get the desired length.
296
+ 3. Click **OK** to confirm your change.
297
+
298
+
299
+ ### 2. What does Empty response mean? How to set it?
300
+
301
+ 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.
302
+
303
+ ### 3. Can I set the base URL for OpenAI somewhere?
304
+
305
+ ![](https://github.com/infiniflow/ragflow/assets/93570324/8cfb6fa4-8a97-415d-b9fa-b6f405a055f3)
306
+
307
+
308
+ ### 4. How to run RAGFlow with a locally deployed LLM?
309
+
310
+ You can use Ollama to deploy local LLM. See [here](https://github.com/infiniflow/ragflow/blob/main/docs/ollama.md) for more information.
311
+
312
+ ### 5. How to link up ragflow and ollama servers?
313
+
314
+ - If RAGFlow is locally deployed, ensure that your RAGFlow and Ollama are in the same LAN.
315
+ - If you are using our online demo, ensure that the IP address of your Ollama server is public and accessible.
316
+
317
+ ### 6. How to configure RAGFlow to respond with 100% matched results, rather than utilizing LLM?
318
+
319
+ 1. Click the **Knowledge Base** tab in the middle top of the page.
320
+ 2. Right click the desired knowledge base to display the **Configuration** dialogue.
321
+ 3. Choose **Q&A** as the chunk method and click **Save** to confirm your change.