host.localdomain commited on
Commit
e762750
·
1 Parent(s): 2b0afa8

add hg readme.md

Browse files
Files changed (2) hide show
  1. README.md +8 -363
  2. README_github.md +363 -0
README.md CHANGED
@@ -1,363 +1,8 @@
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
-
7
- <p align="center">
8
- <a href="./README.md">English</a> |
9
- <a href="./README_zh.md">简体中文</a> |
10
- <a href="./README_tzh.md">繁体中文</a> |
11
- <a href="./README_ja.md">日本語</a> |
12
- <a href="./README_ko.md">한국어</a> |
13
- <a href="./README_id.md">Bahasa Indonesia</a> |
14
- <a href="/README_pt_br.md">Português (Brasil)</a>
15
- </p>
16
-
17
- <p align="center">
18
- <a href="https://x.com/intent/follow?screen_name=infiniflowai" target="_blank">
19
- <img src="https://img.shields.io/twitter/follow/infiniflow?logo=X&color=%20%23f5f5f5" alt="follow on X(Twitter)">
20
- </a>
21
- <a href="https://demo.ragflow.io" target="_blank">
22
- <img alt="Static Badge" src="https://img.shields.io/badge/Online-Demo-4e6b99">
23
- </a>
24
- <a href="https://hub.docker.com/r/infiniflow/ragflow" target="_blank">
25
- <img src="https://img.shields.io/badge/docker_pull-ragflow:v0.15.1-brightgreen" alt="docker pull infiniflow/ragflow:v0.15.1">
26
- </a>
27
- <a href="https://github.com/infiniflow/ragflow/releases/latest">
28
- <img src="https://img.shields.io/github/v/release/infiniflow/ragflow?color=blue&label=Latest%20Release" alt="Latest Release">
29
- </a>
30
- <a href="https://github.com/infiniflow/ragflow/blob/main/LICENSE">
31
- <img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?labelColor=d4eaf7&color=2e6cc4" alt="license">
32
- </a>
33
- </p>
34
-
35
- <h4 align="center">
36
- <a href="https://ragflow.io/docs/dev/">Document</a> |
37
- <a href="https://github.com/infiniflow/ragflow/issues/4214">Roadmap</a> |
38
- <a href="https://twitter.com/infiniflowai">Twitter</a> |
39
- <a href="https://discord.gg/4XxujFgUN7">Discord</a> |
40
- <a href="https://demo.ragflow.io">Demo</a>
41
- </h4>
42
-
43
- <details open>
44
- <summary></b>📕 Table of Contents</b></summary>
45
-
46
- - 💡 [What is RAGFlow?](#-what-is-ragflow)
47
- - 🎮 [Demo](#-demo)
48
- - 📌 [Latest Updates](#-latest-updates)
49
- - 🌟 [Key Features](#-key-features)
50
- - 🔎 [System Architecture](#-system-architecture)
51
- - 🎬 [Get Started](#-get-started)
52
- - 🔧 [Configurations](#-configurations)
53
- - 🔧 [Build a docker image without embedding models](#-build-a-docker-image-without-embedding-models)
54
- - 🔧 [Build a docker image including embedding models](#-build-a-docker-image-including-embedding-models)
55
- - 🔨 [Launch service from source for development](#-launch-service-from-source-for-development)
56
- - 📚 [Documentation](#-documentation)
57
- - 📜 [Roadmap](#-roadmap)
58
- - 🏄 [Community](#-community)
59
- - 🙌 [Contributing](#-contributing)
60
-
61
- </details>
62
-
63
- ## 💡 What is RAGFlow?
64
-
65
- [RAGFlow](https://ragflow.io/) is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document
66
- understanding. It offers a streamlined RAG workflow for businesses of any scale, combining LLM (Large Language Models)
67
- to provide truthful question-answering capabilities, backed by well-founded citations from various complex formatted
68
- data.
69
-
70
- ## 🎮 Demo
71
-
72
- Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io).
73
-
74
- <div align="center" style="margin-top:20px;margin-bottom:20px;">
75
- <img src="https://github.com/infiniflow/ragflow/assets/7248/2f6baa3e-1092-4f11-866d-36f6a9d075e5" width="1200"/>
76
- <img src="https://github.com/user-attachments/assets/504bbbf1-c9f7-4d83-8cc5-e9cb63c26db6" width="1200"/>
77
- </div>
78
-
79
- ## 🔥 Latest Updates
80
-
81
- - 2025-01-26 Optimizes knowledge graph extraction and application, offering various configuration options.
82
- - 2024-12-18 Upgrades Document Layout Analysis model in Deepdoc.
83
- - 2024-12-04 Adds support for pagerank score in knowledge base.
84
- - 2024-11-22 Adds more variables to Agent.
85
- - 2024-11-01 Adds keyword extraction and related question generation to the parsed chunks to improve the accuracy of retrieval.
86
- - 2024-08-22 Support text to SQL statements through RAG.
87
-
88
- ## 🎉 Stay Tuned
89
-
90
- ⭐️ Star our repository to stay up-to-date with exciting new features and improvements! Get instant notifications for new
91
- releases! 🌟
92
-
93
- <div align="center" style="margin-top:20px;margin-bottom:20px;">
94
- <img src="https://github.com/user-attachments/assets/18c9707e-b8aa-4caf-a154-037089c105ba" width="1200"/>
95
- </div>
96
-
97
- ## 🌟 Key Features
98
-
99
- ### 🍭 **"Quality in, quality out"**
100
-
101
- - [Deep document understanding](./deepdoc/README.md)-based knowledge extraction from unstructured data with complicated
102
- formats.
103
- - Finds "needle in a data haystack" of literally unlimited tokens.
104
-
105
- ### 🍱 **Template-based chunking**
106
-
107
- - Intelligent and explainable.
108
- - Plenty of template options to choose from.
109
-
110
- ### 🌱 **Grounded citations with reduced hallucinations**
111
-
112
- - Visualization of text chunking to allow human intervention.
113
- - Quick view of the key references and traceable citations to support grounded answers.
114
-
115
- ### 🍔 **Compatibility with heterogeneous data sources**
116
-
117
- - Supports Word, slides, excel, txt, images, scanned copies, structured data, web pages, and more.
118
-
119
- ### 🛀 **Automated and effortless RAG workflow**
120
-
121
- - Streamlined RAG orchestration catered to both personal and large businesses.
122
- - Configurable LLMs as well as embedding models.
123
- - Multiple recall paired with fused re-ranking.
124
- - Intuitive APIs for seamless integration with business.
125
-
126
- ## 🔎 System Architecture
127
-
128
- <div align="center" style="margin-top:20px;margin-bottom:20px;">
129
- <img src="https://github.com/infiniflow/ragflow/assets/12318111/d6ac5664-c237-4200-a7c2-a4a00691b485" width="1000"/>
130
- </div>
131
-
132
- ## 🎬 Get Started
133
-
134
- ### 📝 Prerequisites
135
-
136
- - CPU >= 4 cores
137
- - RAM >= 16 GB
138
- - Disk >= 50 GB
139
- - Docker >= 24.0.0 & Docker Compose >= v2.26.1
140
- > If you have not installed Docker on your local machine (Windows, Mac, or Linux),
141
- > see [Install Docker Engine](https://docs.docker.com/engine/install/).
142
-
143
- ### 🚀 Start up the server
144
-
145
- 1. Ensure `vm.max_map_count` >= 262144:
146
-
147
- > To check the value of `vm.max_map_count`:
148
- >
149
- > ```bash
150
- > $ sysctl vm.max_map_count
151
- > ```
152
- >
153
- > Reset `vm.max_map_count` to a value at least 262144 if it is not.
154
- >
155
- > ```bash
156
- > # In this case, we set it to 262144:
157
- > $ sudo sysctl -w vm.max_map_count=262144
158
- > ```
159
- >
160
- > This change will be reset after a system reboot. To ensure your change remains permanent, add or update the
161
- > `vm.max_map_count` value in **/etc/sysctl.conf** accordingly:
162
- >
163
- > ```bash
164
- > vm.max_map_count=262144
165
- > ```
166
-
167
- 2. Clone the repo:
168
-
169
- ```bash
170
- $ git clone https://github.com/infiniflow/ragflow.git
171
- ```
172
-
173
- 3. Start up the server using the pre-built Docker images:
174
-
175
- > The command below downloads the `v0.15.1-slim` edition of the RAGFlow Docker image. Refer to the following table for descriptions of different RAGFlow editions. To download an RAGFlow edition different from `v0.15.1-slim`, update the `RAGFLOW_IMAGE` variable accordingly in **docker/.env** before using `docker compose` to start the server. For example: set `RAGFLOW_IMAGE=infiniflow/ragflow:v0.15.1` for the full edition `v0.15.1`.
176
-
177
- ```bash
178
- $ cd ragflow
179
- $ docker compose -f docker/docker-compose.yml up -d
180
- ```
181
-
182
- | RAGFlow image tag | Image size (GB) | Has embedding models? | Stable? |
183
- | ----------------- | --------------- | --------------------- | ------------------------ |
184
- | v0.15.1 | &approx;9 | :heavy_check_mark: | Stable release |
185
- | v0.15.1-slim | &approx;2 | ❌ | Stable release |
186
- | nightly | &approx;9 | :heavy_check_mark: | _Unstable_ nightly build |
187
- | nightly-slim | &approx;2 | ❌ | _Unstable_ nightly build |
188
-
189
- 4. Check the server status after having the server up and running:
190
-
191
- ```bash
192
- $ docker logs -f ragflow-server
193
- ```
194
-
195
- _The following output confirms a successful launch of the system:_
196
-
197
- ```bash
198
-
199
- ____ ___ ______ ______ __
200
- / __ \ / | / ____// ____// /____ _ __
201
- / /_/ // /| | / / __ / /_ / // __ \| | /| / /
202
- / _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
203
- /_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
204
-
205
- * Running on all addresses (0.0.0.0)
206
- * Running on http://127.0.0.1:9380
207
- * Running on http://x.x.x.x:9380
208
- INFO:werkzeug:Press CTRL+C to quit
209
- ```
210
-
211
- > If you skip this confirmation step and directly log in to RAGFlow, your browser may prompt a `network anormal`
212
- > error because, at that moment, your RAGFlow may not be fully initialized.
213
-
214
- 5. In your web browser, enter the IP address of your server and log in to RAGFlow.
215
- > With the default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default
216
- > HTTP serving port `80` can be omitted when using the default configurations.
217
- 6. In [service_conf.yaml.template](./docker/service_conf.yaml.template), select the desired LLM factory in `user_default_llm` and update
218
- the `API_KEY` field with the corresponding API key.
219
-
220
- > See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
221
-
222
- _The show is on!_
223
-
224
- ## 🔧 Configurations
225
-
226
- When it comes to system configurations, you will need to manage the following files:
227
-
228
- - [.env](./docker/.env): Keeps the fundamental setups for the system, such as `SVR_HTTP_PORT`, `MYSQL_PASSWORD`, and
229
- `MINIO_PASSWORD`.
230
- - [service_conf.yaml.template](./docker/service_conf.yaml.template): Configures the back-end services. The environment variables in this file will be automatically populated when the Docker container starts. Any environment variables set within the Docker container will be available for use, allowing you to customize service behavior based on the deployment environment.
231
- - [docker-compose.yml](./docker/docker-compose.yml): The system relies on [docker-compose.yml](./docker/docker-compose.yml) to start up.
232
-
233
- > The [./docker/README](./docker/README.md) file provides a detailed description of the environment settings and service
234
- > configurations which can be used as `${ENV_VARS}` in the [service_conf.yaml.template](./docker/service_conf.yaml.template) file.
235
-
236
- To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80`
237
- to `<YOUR_SERVING_PORT>:80`.
238
-
239
- Updates to the above configurations require a reboot of all containers to take effect:
240
-
241
- > ```bash
242
- > $ docker compose -f docker/docker-compose.yml up -d
243
- > ```
244
-
245
- ### Switch doc engine from Elasticsearch to Infinity
246
-
247
- RAGFlow uses Elasticsearch by default for storing full text and vectors. To switch to [Infinity](https://github.com/infiniflow/infinity/), follow these steps:
248
-
249
- 1. Stop all running containers:
250
-
251
- ```bash
252
- $ docker compose -f docker/docker-compose.yml down -v
253
- ```
254
-
255
- 2. Set `DOC_ENGINE` in **docker/.env** to `infinity`.
256
-
257
- 3. Start the containers:
258
-
259
- ```bash
260
- $ docker compose -f docker/docker-compose.yml up -d
261
- ```
262
-
263
- > [!WARNING]
264
- > Switching to Infinity on a Linux/arm64 machine is not yet officially supported.
265
-
266
- ## 🔧 Build a Docker image without embedding models
267
-
268
- This image is approximately 2 GB in size and relies on external LLM and embedding services.
269
-
270
- ```bash
271
- git clone https://github.com/infiniflow/ragflow.git
272
- cd ragflow/
273
- docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
274
- ```
275
-
276
- ## 🔧 Build a Docker image including embedding models
277
-
278
- This image is approximately 9 GB in size. As it includes embedding models, it relies on external LLM services only.
279
-
280
- ```bash
281
- git clone https://github.com/infiniflow/ragflow.git
282
- cd ragflow/
283
- docker build -f Dockerfile -t infiniflow/ragflow:nightly .
284
- ```
285
-
286
- ## 🔨 Launch service from source for development
287
-
288
- 1. Install uv, or skip this step if it is already installed:
289
-
290
- ```bash
291
- pipx install uv
292
- ```
293
-
294
- 2. Clone the source code and install Python dependencies:
295
-
296
- ```bash
297
- git clone https://github.com/infiniflow/ragflow.git
298
- cd ragflow/
299
- uv sync --python 3.10 --all-extras # install RAGFlow dependent python modules
300
- ```
301
-
302
- 3. Launch the dependent services (MinIO, Elasticsearch, Redis, and MySQL) using Docker Compose:
303
-
304
- ```bash
305
- docker compose -f docker/docker-compose-base.yml up -d
306
- ```
307
-
308
- Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/.env** to `127.0.0.1`:
309
-
310
- ```
311
- 127.0.0.1 es01 infinity mysql minio redis
312
- ```
313
-
314
- 4. If you cannot access HuggingFace, set the `HF_ENDPOINT` environment variable to use a mirror site:
315
-
316
- ```bash
317
- export HF_ENDPOINT=https://hf-mirror.com
318
- ```
319
-
320
- 5. Launch backend service:
321
-
322
- ```bash
323
- source .venv/bin/activate
324
- export PYTHONPATH=$(pwd)
325
- bash docker/launch_backend_service.sh
326
- ```
327
-
328
- 6. Install frontend dependencies:
329
- ```bash
330
- cd web
331
- npm install
332
- ```
333
- 7. Launch frontend service:
334
-
335
- ```bash
336
- npm run dev
337
- ```
338
-
339
- _The following output confirms a successful launch of the system:_
340
-
341
- ![](https://github.com/user-attachments/assets/0daf462c-a24d-4496-a66f-92533534e187)
342
-
343
- ## 📚 Documentation
344
-
345
- - [Quickstart](https://ragflow.io/docs/dev/)
346
- - [User guide](https://ragflow.io/docs/dev/category/guides)
347
- - [References](https://ragflow.io/docs/dev/category/references)
348
- - [FAQ](https://ragflow.io/docs/dev/faq)
349
-
350
- ## 📜 Roadmap
351
-
352
- See the [RAGFlow Roadmap 2025](https://github.com/infiniflow/ragflow/issues/4214)
353
-
354
- ## 🏄 Community
355
-
356
- - [Discord](https://discord.gg/4XxujFgUN7)
357
- - [Twitter](https://twitter.com/infiniflowai)
358
- - [GitHub Discussions](https://github.com/orgs/infiniflow/discussions)
359
-
360
- ## 🙌 Contributing
361
-
362
- RAGFlow flourishes via open-source collaboration. In this spirit, we embrace diverse contributions from the community.
363
- If you would like to be a part, review our [Contribution Guidelines](./CONTRIBUTING.md) first.
 
1
+ title: RAGFlow
2
+ emoji: 🚀
3
+ colorFrom: blue
4
+ colorTo: cyan
5
+ sdk: docker
6
+ pinned: false
7
+ license: mit
8
+ short_description: testing RAGFlow
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README_github.md ADDED
@@ -0,0 +1,363 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
7
+ <p align="center">
8
+ <a href="./README.md">English</a> |
9
+ <a href="./README_zh.md">简体中文</a> |
10
+ <a href="./README_tzh.md">繁体中文</a> |
11
+ <a href="./README_ja.md">日本語</a> |
12
+ <a href="./README_ko.md">한국어</a> |
13
+ <a href="./README_id.md">Bahasa Indonesia</a> |
14
+ <a href="/README_pt_br.md">Português (Brasil)</a>
15
+ </p>
16
+
17
+ <p align="center">
18
+ <a href="https://x.com/intent/follow?screen_name=infiniflowai" target="_blank">
19
+ <img src="https://img.shields.io/twitter/follow/infiniflow?logo=X&color=%20%23f5f5f5" alt="follow on X(Twitter)">
20
+ </a>
21
+ <a href="https://demo.ragflow.io" target="_blank">
22
+ <img alt="Static Badge" src="https://img.shields.io/badge/Online-Demo-4e6b99">
23
+ </a>
24
+ <a href="https://hub.docker.com/r/infiniflow/ragflow" target="_blank">
25
+ <img src="https://img.shields.io/badge/docker_pull-ragflow:v0.15.1-brightgreen" alt="docker pull infiniflow/ragflow:v0.15.1">
26
+ </a>
27
+ <a href="https://github.com/infiniflow/ragflow/releases/latest">
28
+ <img src="https://img.shields.io/github/v/release/infiniflow/ragflow?color=blue&label=Latest%20Release" alt="Latest Release">
29
+ </a>
30
+ <a href="https://github.com/infiniflow/ragflow/blob/main/LICENSE">
31
+ <img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?labelColor=d4eaf7&color=2e6cc4" alt="license">
32
+ </a>
33
+ </p>
34
+
35
+ <h4 align="center">
36
+ <a href="https://ragflow.io/docs/dev/">Document</a> |
37
+ <a href="https://github.com/infiniflow/ragflow/issues/4214">Roadmap</a> |
38
+ <a href="https://twitter.com/infiniflowai">Twitter</a> |
39
+ <a href="https://discord.gg/4XxujFgUN7">Discord</a> |
40
+ <a href="https://demo.ragflow.io">Demo</a>
41
+ </h4>
42
+
43
+ <details open>
44
+ <summary></b>📕 Table of Contents</b></summary>
45
+
46
+ - 💡 [What is RAGFlow?](#-what-is-ragflow)
47
+ - 🎮 [Demo](#-demo)
48
+ - 📌 [Latest Updates](#-latest-updates)
49
+ - 🌟 [Key Features](#-key-features)
50
+ - 🔎 [System Architecture](#-system-architecture)
51
+ - 🎬 [Get Started](#-get-started)
52
+ - 🔧 [Configurations](#-configurations)
53
+ - 🔧 [Build a docker image without embedding models](#-build-a-docker-image-without-embedding-models)
54
+ - 🔧 [Build a docker image including embedding models](#-build-a-docker-image-including-embedding-models)
55
+ - 🔨 [Launch service from source for development](#-launch-service-from-source-for-development)
56
+ - 📚 [Documentation](#-documentation)
57
+ - 📜 [Roadmap](#-roadmap)
58
+ - 🏄 [Community](#-community)
59
+ - 🙌 [Contributing](#-contributing)
60
+
61
+ </details>
62
+
63
+ ## 💡 What is RAGFlow?
64
+
65
+ [RAGFlow](https://ragflow.io/) is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document
66
+ understanding. It offers a streamlined RAG workflow for businesses of any scale, combining LLM (Large Language Models)
67
+ to provide truthful question-answering capabilities, backed by well-founded citations from various complex formatted
68
+ data.
69
+
70
+ ## 🎮 Demo
71
+
72
+ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io).
73
+
74
+ <div align="center" style="margin-top:20px;margin-bottom:20px;">
75
+ <img src="https://github.com/infiniflow/ragflow/assets/7248/2f6baa3e-1092-4f11-866d-36f6a9d075e5" width="1200"/>
76
+ <img src="https://github.com/user-attachments/assets/504bbbf1-c9f7-4d83-8cc5-e9cb63c26db6" width="1200"/>
77
+ </div>
78
+
79
+ ## 🔥 Latest Updates
80
+
81
+ - 2025-01-26 Optimizes knowledge graph extraction and application, offering various configuration options.
82
+ - 2024-12-18 Upgrades Document Layout Analysis model in Deepdoc.
83
+ - 2024-12-04 Adds support for pagerank score in knowledge base.
84
+ - 2024-11-22 Adds more variables to Agent.
85
+ - 2024-11-01 Adds keyword extraction and related question generation to the parsed chunks to improve the accuracy of retrieval.
86
+ - 2024-08-22 Support text to SQL statements through RAG.
87
+
88
+ ## 🎉 Stay Tuned
89
+
90
+ ⭐️ Star our repository to stay up-to-date with exciting new features and improvements! Get instant notifications for new
91
+ releases! 🌟
92
+
93
+ <div align="center" style="margin-top:20px;margin-bottom:20px;">
94
+ <img src="https://github.com/user-attachments/assets/18c9707e-b8aa-4caf-a154-037089c105ba" width="1200"/>
95
+ </div>
96
+
97
+ ## 🌟 Key Features
98
+
99
+ ### 🍭 **"Quality in, quality out"**
100
+
101
+ - [Deep document understanding](./deepdoc/README.md)-based knowledge extraction from unstructured data with complicated
102
+ formats.
103
+ - Finds "needle in a data haystack" of literally unlimited tokens.
104
+
105
+ ### 🍱 **Template-based chunking**
106
+
107
+ - Intelligent and explainable.
108
+ - Plenty of template options to choose from.
109
+
110
+ ### 🌱 **Grounded citations with reduced hallucinations**
111
+
112
+ - Visualization of text chunking to allow human intervention.
113
+ - Quick view of the key references and traceable citations to support grounded answers.
114
+
115
+ ### 🍔 **Compatibility with heterogeneous data sources**
116
+
117
+ - Supports Word, slides, excel, txt, images, scanned copies, structured data, web pages, and more.
118
+
119
+ ### 🛀 **Automated and effortless RAG workflow**
120
+
121
+ - Streamlined RAG orchestration catered to both personal and large businesses.
122
+ - Configurable LLMs as well as embedding models.
123
+ - Multiple recall paired with fused re-ranking.
124
+ - Intuitive APIs for seamless integration with business.
125
+
126
+ ## 🔎 System Architecture
127
+
128
+ <div align="center" style="margin-top:20px;margin-bottom:20px;">
129
+ <img src="https://github.com/infiniflow/ragflow/assets/12318111/d6ac5664-c237-4200-a7c2-a4a00691b485" width="1000"/>
130
+ </div>
131
+
132
+ ## 🎬 Get Started
133
+
134
+ ### 📝 Prerequisites
135
+
136
+ - CPU >= 4 cores
137
+ - RAM >= 16 GB
138
+ - Disk >= 50 GB
139
+ - Docker >= 24.0.0 & Docker Compose >= v2.26.1
140
+ > If you have not installed Docker on your local machine (Windows, Mac, or Linux),
141
+ > see [Install Docker Engine](https://docs.docker.com/engine/install/).
142
+
143
+ ### 🚀 Start up the server
144
+
145
+ 1. Ensure `vm.max_map_count` >= 262144:
146
+
147
+ > To check the value of `vm.max_map_count`:
148
+ >
149
+ > ```bash
150
+ > $ sysctl vm.max_map_count
151
+ > ```
152
+ >
153
+ > Reset `vm.max_map_count` to a value at least 262144 if it is not.
154
+ >
155
+ > ```bash
156
+ > # In this case, we set it to 262144:
157
+ > $ sudo sysctl -w vm.max_map_count=262144
158
+ > ```
159
+ >
160
+ > This change will be reset after a system reboot. To ensure your change remains permanent, add or update the
161
+ > `vm.max_map_count` value in **/etc/sysctl.conf** accordingly:
162
+ >
163
+ > ```bash
164
+ > vm.max_map_count=262144
165
+ > ```
166
+
167
+ 2. Clone the repo:
168
+
169
+ ```bash
170
+ $ git clone https://github.com/infiniflow/ragflow.git
171
+ ```
172
+
173
+ 3. Start up the server using the pre-built Docker images:
174
+
175
+ > The command below downloads the `v0.15.1-slim` edition of the RAGFlow Docker image. Refer to the following table for descriptions of different RAGFlow editions. To download an RAGFlow edition different from `v0.15.1-slim`, update the `RAGFLOW_IMAGE` variable accordingly in **docker/.env** before using `docker compose` to start the server. For example: set `RAGFLOW_IMAGE=infiniflow/ragflow:v0.15.1` for the full edition `v0.15.1`.
176
+
177
+ ```bash
178
+ $ cd ragflow
179
+ $ docker compose -f docker/docker-compose.yml up -d
180
+ ```
181
+
182
+ | RAGFlow image tag | Image size (GB) | Has embedding models? | Stable? |
183
+ | ----------------- | --------------- | --------------------- | ------------------------ |
184
+ | v0.15.1 | &approx;9 | :heavy_check_mark: | Stable release |
185
+ | v0.15.1-slim | &approx;2 | ❌ | Stable release |
186
+ | nightly | &approx;9 | :heavy_check_mark: | _Unstable_ nightly build |
187
+ | nightly-slim | &approx;2 | ❌ | _Unstable_ nightly build |
188
+
189
+ 4. Check the server status after having the server up and running:
190
+
191
+ ```bash
192
+ $ docker logs -f ragflow-server
193
+ ```
194
+
195
+ _The following output confirms a successful launch of the system:_
196
+
197
+ ```bash
198
+
199
+ ____ ___ ______ ______ __
200
+ / __ \ / | / ____// ____// /____ _ __
201
+ / /_/ // /| | / / __ / /_ / // __ \| | /| / /
202
+ / _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
203
+ /_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
204
+
205
+ * Running on all addresses (0.0.0.0)
206
+ * Running on http://127.0.0.1:9380
207
+ * Running on http://x.x.x.x:9380
208
+ INFO:werkzeug:Press CTRL+C to quit
209
+ ```
210
+
211
+ > If you skip this confirmation step and directly log in to RAGFlow, your browser may prompt a `network anormal`
212
+ > error because, at that moment, your RAGFlow may not be fully initialized.
213
+
214
+ 5. In your web browser, enter the IP address of your server and log in to RAGFlow.
215
+ > With the default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default
216
+ > HTTP serving port `80` can be omitted when using the default configurations.
217
+ 6. In [service_conf.yaml.template](./docker/service_conf.yaml.template), select the desired LLM factory in `user_default_llm` and update
218
+ the `API_KEY` field with the corresponding API key.
219
+
220
+ > See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
221
+
222
+ _The show is on!_
223
+
224
+ ## 🔧 Configurations
225
+
226
+ When it comes to system configurations, you will need to manage the following files:
227
+
228
+ - [.env](./docker/.env): Keeps the fundamental setups for the system, such as `SVR_HTTP_PORT`, `MYSQL_PASSWORD`, and
229
+ `MINIO_PASSWORD`.
230
+ - [service_conf.yaml.template](./docker/service_conf.yaml.template): Configures the back-end services. The environment variables in this file will be automatically populated when the Docker container starts. Any environment variables set within the Docker container will be available for use, allowing you to customize service behavior based on the deployment environment.
231
+ - [docker-compose.yml](./docker/docker-compose.yml): The system relies on [docker-compose.yml](./docker/docker-compose.yml) to start up.
232
+
233
+ > The [./docker/README](./docker/README.md) file provides a detailed description of the environment settings and service
234
+ > configurations which can be used as `${ENV_VARS}` in the [service_conf.yaml.template](./docker/service_conf.yaml.template) file.
235
+
236
+ To update the default HTTP serving port (80), go to [docker-compose.yml](./docker/docker-compose.yml) and change `80:80`
237
+ to `<YOUR_SERVING_PORT>:80`.
238
+
239
+ Updates to the above configurations require a reboot of all containers to take effect:
240
+
241
+ > ```bash
242
+ > $ docker compose -f docker/docker-compose.yml up -d
243
+ > ```
244
+
245
+ ### Switch doc engine from Elasticsearch to Infinity
246
+
247
+ RAGFlow uses Elasticsearch by default for storing full text and vectors. To switch to [Infinity](https://github.com/infiniflow/infinity/), follow these steps:
248
+
249
+ 1. Stop all running containers:
250
+
251
+ ```bash
252
+ $ docker compose -f docker/docker-compose.yml down -v
253
+ ```
254
+
255
+ 2. Set `DOC_ENGINE` in **docker/.env** to `infinity`.
256
+
257
+ 3. Start the containers:
258
+
259
+ ```bash
260
+ $ docker compose -f docker/docker-compose.yml up -d
261
+ ```
262
+
263
+ > [!WARNING]
264
+ > Switching to Infinity on a Linux/arm64 machine is not yet officially supported.
265
+
266
+ ## 🔧 Build a Docker image without embedding models
267
+
268
+ This image is approximately 2 GB in size and relies on external LLM and embedding services.
269
+
270
+ ```bash
271
+ git clone https://github.com/infiniflow/ragflow.git
272
+ cd ragflow/
273
+ docker build --build-arg LIGHTEN=1 -f Dockerfile -t infiniflow/ragflow:nightly-slim .
274
+ ```
275
+
276
+ ## 🔧 Build a Docker image including embedding models
277
+
278
+ This image is approximately 9 GB in size. As it includes embedding models, it relies on external LLM services only.
279
+
280
+ ```bash
281
+ git clone https://github.com/infiniflow/ragflow.git
282
+ cd ragflow/
283
+ docker build -f Dockerfile -t infiniflow/ragflow:nightly .
284
+ ```
285
+
286
+ ## 🔨 Launch service from source for development
287
+
288
+ 1. Install uv, or skip this step if it is already installed:
289
+
290
+ ```bash
291
+ pipx install uv
292
+ ```
293
+
294
+ 2. Clone the source code and install Python dependencies:
295
+
296
+ ```bash
297
+ git clone https://github.com/infiniflow/ragflow.git
298
+ cd ragflow/
299
+ uv sync --python 3.10 --all-extras # install RAGFlow dependent python modules
300
+ ```
301
+
302
+ 3. Launch the dependent services (MinIO, Elasticsearch, Redis, and MySQL) using Docker Compose:
303
+
304
+ ```bash
305
+ docker compose -f docker/docker-compose-base.yml up -d
306
+ ```
307
+
308
+ Add the following line to `/etc/hosts` to resolve all hosts specified in **docker/.env** to `127.0.0.1`:
309
+
310
+ ```
311
+ 127.0.0.1 es01 infinity mysql minio redis
312
+ ```
313
+
314
+ 4. If you cannot access HuggingFace, set the `HF_ENDPOINT` environment variable to use a mirror site:
315
+
316
+ ```bash
317
+ export HF_ENDPOINT=https://hf-mirror.com
318
+ ```
319
+
320
+ 5. Launch backend service:
321
+
322
+ ```bash
323
+ source .venv/bin/activate
324
+ export PYTHONPATH=$(pwd)
325
+ bash docker/launch_backend_service.sh
326
+ ```
327
+
328
+ 6. Install frontend dependencies:
329
+ ```bash
330
+ cd web
331
+ npm install
332
+ ```
333
+ 7. Launch frontend service:
334
+
335
+ ```bash
336
+ npm run dev
337
+ ```
338
+
339
+ _The following output confirms a successful launch of the system:_
340
+
341
+ ![](https://github.com/user-attachments/assets/0daf462c-a24d-4496-a66f-92533534e187)
342
+
343
+ ## 📚 Documentation
344
+
345
+ - [Quickstart](https://ragflow.io/docs/dev/)
346
+ - [User guide](https://ragflow.io/docs/dev/category/guides)
347
+ - [References](https://ragflow.io/docs/dev/category/references)
348
+ - [FAQ](https://ragflow.io/docs/dev/faq)
349
+
350
+ ## 📜 Roadmap
351
+
352
+ See the [RAGFlow Roadmap 2025](https://github.com/infiniflow/ragflow/issues/4214)
353
+
354
+ ## 🏄 Community
355
+
356
+ - [Discord](https://discord.gg/4XxujFgUN7)
357
+ - [Twitter](https://twitter.com/infiniflowai)
358
+ - [GitHub Discussions](https://github.com/orgs/infiniflow/discussions)
359
+
360
+ ## 🙌 Contributing
361
+
362
+ RAGFlow flourishes via open-source collaboration. In this spirit, we embrace diverse contributions from the community.
363
+ If you would like to be a part, review our [Contribution Guidelines](./CONTRIBUTING.md) first.