You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <div align="center">
  2. <a href="https://demo.ragflow.io/">
  3. <img src="web/src/assets/logo-with-text.png" width="520" alt="ragflow logo">
  4. </a>
  5. </div>
  6. <p align="center">
  7. <a href="./README.md">English</a> |
  8. <a href="./README_zh.md">简体中文</a> |
  9. <a href="./README_ja.md">日本語</a>
  10. </p>
  11. <p align="center">
  12. <a href="https://demo.ragflow.io" target="_blank">
  13. <img alt="Static Badge" src="https://img.shields.io/badge/RAGFLOW-LLM-white?&labelColor=dd0af7"></a>
  14. <a href="https://hub.docker.com/r/infiniflow/ragflow" target="_blank">
  15. <img src="https://img.shields.io/badge/docker_pull-ragflow:v1.0-brightgreen"
  16. alt="docker pull ragflow:v1.0"></a>
  17. <a href="https://github.com/infiniflow/ragflow/blob/main/LICENSE">
  18. <img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?style=flat-square&labelColor=d4eaf7&color=7d09f1" alt="license">
  19. </a>
  20. </p>
  21. ## 💡 What is RAGFlow?
  22. [RAGFlow](https://demo.ragflow.io) is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding. It offers a streamlined RAG workflow for businesses of any scale, combining LLM (Large Language Models) to provide truthful question-answering capabilities, backed by well-founded citations from various complex formatted data.
  23. ## 🌟 Key Features
  24. ### 🍭 **"Quality in, quality out"**
  25. - [Deep document understanding](./deepdoc/README.md)-based knowledge extraction from unstructured data with complicated formats.
  26. - Finds "needle in a data haystack" of literally unlimited tokens.
  27. ### 🍱 **Template-based chunking**
  28. - Intelligent and explainable.
  29. - Plenty of template options to choose from.
  30. ### 🌱 **Grounded citations with reduced hallucinations**
  31. - Visualization of text chunking to allow human intervention.
  32. - Quick view of the key references and traceable citations to support grounded answers.
  33. ### 🍔 **Compatibility with heterogeneous data sources**
  34. - Supports Word, slides, excel, txt, images, scanned copies, structured data, web pages, and more.
  35. ### 🛀 **Automated and effortless RAG workflow**
  36. - Streamlined RAG orchestration catered to both personal and large businesses.
  37. - Configurable LLMs as well as embedding models.
  38. - Multiple recall paired with fused re-ranking.
  39. - Intuitive APIs for seamless integration with business.
  40. ## 🔎 System Architecture
  41. <div align="center" style="margin-top:20px;margin-bottom:20px;">
  42. <img src="https://github.com/infiniflow/ragflow/assets/12318111/d6ac5664-c237-4200-a7c2-a4a00691b485" width="1000"/>
  43. </div>
  44. ## 🎬 Get Started
  45. ### 📝 Prerequisites
  46. - CPU >= 2 cores
  47. - RAM >= 8 GB
  48. - Docker >= 24.0.0
  49. > If you have not installed Docker on your local machine (Windows, Mac, or Linux), see [Install Docker Engine](https://docs.docker.com/engine/install/).
  50. ### 🚀 Start up the server
  51. 1. Ensure `vm.max_map_count` >= 262144 ([more](./docs/max_map_count.md)):
  52. > To check the value of `vm.max_map_count`:
  53. >
  54. > ```bash
  55. > $ sysctl vm.max_map_count
  56. > ```
  57. >
  58. > Reset `vm.max_map_count` to a value at least 262144 if it is not.
  59. >
  60. > ```bash
  61. > # In this case, we set it to 262144:
  62. > $ sudo sysctl -w vm.max_map_count=262144
  63. > ```
  64. >
  65. > This change will be reset after a system reboot. To ensure your change remains permanent, add or update the `vm.max_map_count` value in **/etc/sysctl.conf** accordingly:
  66. >
  67. > ```bash
  68. > vm.max_map_count=262144
  69. > ```
  70. 2. Clone the repo:
  71. ```bash
  72. $ git clone https://github.com/infiniflow/ragflow.git
  73. ```
  74. 3. Build the pre-built Docker images and start up the server:
  75. ```bash
  76. $ cd ragflow/docker
  77. $ chmod +x ./entrypoint.sh
  78. $ docker compose up -d
  79. ```
  80. > The core image is about 9 GB in size and may take a while to load.
  81. 4. Check the server status after having the server up and running:
  82. ```bash
  83. $ docker logs -f ragflow-server
  84. ```
  85. _The following output confirms a successful launch of the system:_
  86. ```bash
  87. ____ ______ __
  88. / __ \ ____ _ ____ _ / ____// /____ _ __
  89. / /_/ // __ `// __ `// /_ / // __ \| | /| / /
  90. / _, _// /_/ // /_/ // __/ / // /_/ /| |/ |/ /
  91. /_/ |_| \__,_/ \__, //_/ /_/ \____/ |__/|__/
  92. /____/
  93. * Running on all addresses (0.0.0.0)
  94. * Running on http://127.0.0.1:9380
  95. * Running on http://x.x.x.x:9380
  96. INFO:werkzeug:Press CTRL+C to quit
  97. ```
  98. 5. In your web browser, enter the IP address of your server and log in to RAGFlow.
  99. > In the given scenario, you only need to enter `http://IP_OF_YOUR_MACHINE` (sans port number) as the default HTTP serving port `80` can be omitted when using the default configurations.
  100. 6. In [service_conf.yaml](./docker/service_conf.yaml), select the desired LLM factory in `user_default_llm` and update the `API_KEY` field with the corresponding API key.
  101. > See [./docs/llm_api_key_setup.md](./docs/llm_api_key_setup.md) for more information.
  102. _The show is now on!_
  103. ## 🔧 Configurations
  104. When it comes to system configurations, you will need to manage the following files:
  105. - [.env](./docker/.env): Keeps the fundamental setups for the system, such as `SVR_HTTP_PORT`, `MYSQL_PASSWORD`, and `MINIO_PASSWORD`.
  106. - [service_conf.yaml](./docker/service_conf.yaml): Configures the back-end services.
  107. - [docker-compose.yml](./docker/docker-compose.yml): The system relies on [docker-compose.yml](./docker/docker-compose.yml) to start up.
  108. You must ensure that changes to the [.env](./docker/.env) file are in line with what are in the [service_conf.yaml](./docker/service_conf.yaml) file.
  109. > The [./docker/README](./docker/README.md) file provides a detailed description of the environment settings and service configurations, and you are REQUIRED to ensure that all environment settings listed in the [./docker/README](./docker/README.md) file are aligned with the corresponding configurations in the [service_conf.yaml](./docker/service_conf.yaml) file.
  110. To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80` to `<YOUR_SERVING_PORT>:80`.
  111. > Updates to all system configurations require a system reboot to take effect:
  112. >
  113. > ```bash
  114. > $ docker-compose up -d
  115. > ```
  116. ## 🛠️ Build from source
  117. To build the Docker images from source:
  118. ```bash
  119. $ git clone https://github.com/infiniflow/ragflow.git
  120. $ cd ragflow/
  121. $ docker build -t infiniflow/ragflow:v1.0 .
  122. $ cd ragflow/docker
  123. $ chmod +x ./entrypoint.sh
  124. $ docker compose up -d
  125. ```
  126. ## 🆕 Latest Features
  127. - 2024-04-10 Add a new layout recognize model for method 'Laws'.
  128. - 2024-04-08 Support [Ollama](./docs/ollama.md) for local LLM deployment.
  129. - 2024-04-07 Support Chinese UI.
  130. ## 📜 Roadmap
  131. See the [RAGFlow Roadmap 2024](https://github.com/infiniflow/ragflow/issues/162)
  132. ## 🏄 Community
  133. - [Discord](https://discord.gg/trjjfJ9y)
  134. - [Twitter](https://twitter.com/infiniflowai)
  135. ## 🙌 Contributing
  136. RAGFlow flourishes via open-source collaboration. In this spirit, we embrace diverse contributions from the community. If you would like to be a part, review our [Contribution Guidelines](https://github.com/infiniflow/ragflow/blob/main/docs/CONTRIBUTING.md) first.