sidebar_position: 3
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.
English, simplified Chinese, traditional Chinese for now.
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.
RAGFlow has a number of built-in models for document structure parsing, which account for the additional computational resources.
Currently, we only support x86 CPU and Nvidia GPU.
The corresponding APIs are now available. See the RAGFlow API Reference for more information.
No, this feature is still in development. Contributions are welcome.
Yes, this feature is now available.
This feature and the related APIs are still in development. Contributions are welcome.
$ git clone https://github.com/infiniflow/ragflow.git
$ cd ragflow
$ docker build -t infiniflow/ragflow:latest .
$ cd ragflow/docker
$ chmod +x ./entrypoint.sh
$ docker compose up -d
process "/bin/sh -c cd ./web && npm i && npm run build" failedCheck your network from within Docker, for example:
curl https://hf-mirror.com
If your network works fine, the issue lies with the Docker network configuration. Replace the Docker building command:
docker build -t infiniflow/ragflow:vX.Y.Z.
With this:
docker build -t infiniflow/ragflow:vX.Y.Z. --network host
A locally deployed RAGflow downloads OCR and embedding modules from Huggingface website by default. If your machine is unable to access this site, the following error occurs and PDF parsing fails:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.cache/huggingface/hub/models--InfiniFlow--deepdoc/snapshots/be0c1e50eef6047b412d1800aa89aba4d275f997/ocr.res'
To fix this issue, use https://hf-mirror.com instead:
 cd ragflow/docker/
 docker compose down
Replace https://huggingface.co with https://hf-mirror.com in ragflow/docker/docker-compose.yml.
Start up the server:
 docker compose up -d 
MaxRetryError: HTTPSConnectionPool(host='hf-mirror.com', port=443)This error suggests that you do not have Internet access or are unable to connect to hf-mirror.com. Try the following:
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'bash
curl https://hf-mirror.com
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:vim docker-compose-base.yml
# Original configuration:
networks:
  ragflow:
    driver: bridge
# Modified configuration:
networks:
  ragflow:
    driver: bridge
    driver_opts:
      com.docker.network.driver.mtu: 1450
WARNING: can't find /raglof/rag/res/borker.tmIgnore this warning and continue. All system warnings can be ignored.
network anomaly There is an abnormality in your network and you cannot connect to the server.You will not log in to RAGFlow unless the server is fully initialized. Run docker logs -f ragflow-server.
The server is successfully initialized, if your system displays the following:
    ____                 ______ __
   / __ \ ____ _ ____ _ / ____// /____  _      __
  / /_/ // __ `// __ `// /_   / // __ \| | /| / /
 / _, _// /_/ // /_/ // __/  / // /_/ /| |/ |/ /
/_/ |_| \__,_/ \__, //_/    /_/ \____/ |__/|__/
              /____/
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:9380
 * Running on http://x.x.x.x:9380
 INFO:werkzeug:Press CTRL+C to quit
dependency failed to start: container ragflow-mysql is unhealthydependency 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.
Realtime synonym is disabled, since no redis connectionIgnore this warning and continue. All system warnings can be ignored.
Parsing requests have to wait in queue due to limited server resources. We are currently enhancing our algorithms and increasing computing power.
If your RAGFlow is deployed locally, try the following:
bash
docker logs -f ragflow-server
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.
Ensure that you restart up your RAGFlow server for your changes to take effect!
> docker compose stop > ``` > ```bash > docker compose up -d > ```  #### 4.6 `Index failure` An index failure usually indicates an unavailable Elasticsearch service. #### 4.7 How to check the log of RAGFlow? ```bash tail -f path_to_ragflow/docker/ragflow-logs/rag/*.log
$ docker ps
The system displays the following if all your RAGFlow components are running properly:
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
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
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
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
Exception: Can't connect to ES cluster$ docker ps
The status of a ‘healthy’ Elasticsearch component in your RAGFlow should look as follows:
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
If your container keeps restarting, ensure vm.max_map_count >= 262144 as per this README. 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.
If your issue persists, ensure that the ES host setting is correct:
es:
hosts: 'http://es01:9200'
bash
curl http://<IP_OF_ES>:<PORT_OF_ES>
Elasticsearch did not exit normallyThis 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.
{"data":null,"retcode":100,"retmsg":"<NotFound '404: Not Found'>"}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.
Ollama - Mistral instance running at 127.0.0.1:11434 but cannot add Ollama as model in RagFlowA correct Ollama IP address and port is crucial to adding models to Ollama:
Yes, we do. See the Python files under the rag/app folder.
You probably forgot to update the MAX_CONTENT_LENGTH environment variable:
MAX_CONTENT_LENGTH to ragflow/docker/.env:
MAX_CONTENT_LENGTH=100000000
docker compose up ragflow -d
Now you should be able to upload files of sizes less than 100MB.Table 'rag_flow.document' doesn't existThis exception occurs when starting up the RAGFlow server. Try the following:
sleep 60 with sleep 280.
./entrypoint.sh:/ragflow/entrypoint.sh
bash
cd docker
bash
docker compose stop
bash
docker compose up
hint : 102  Fail to access model  Connection errorFileNotFoundError: [Errno 2] No such file or directorybash
docker ps
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.
You can use Ollama to deploy local LLM. See here for more information.
No, connecting to Redis is not required.
Error: Range of input length should be [1, 30000]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:
You can upgrade RAGFlow to either the dev version or the latest version:
To upgrade RAGFlow to the dev version:
bash
cd ragflow
git pull
docker compose up -d to start up RAGFlow server:
bash
docker pull infiniflow/ragflow:dev
bash
docker compose up ragflow -d
docker compose -f docker-compose-CN.yml up -d to start up RAGFlow server:
bash
docker pull swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:dev
bash
docker compose -f docker-compose-CN.yml up -d
To upgrade RAGFlow to the latest version:
bash
RAGFLOW_VERSION=latest
Pull the latest source code:
cd ragflow
git pull
If you used docker compose up -d to start up RAGFlow server:
docker pull infiniflow/ragflow:latest
docker compose up ragflow -d
If you used docker compose -f docker-compose-CN.yml up -d to start up RAGFlow server:
docker pull swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:latest
docker compose -f docker-compose-CN.yml up -d