Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  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. <a href="./README_ko.md">한국어</a> |
  11. </p>
  12. <p align="center">
  13. <a href="https://github.com/infiniflow/ragflow/releases/latest">
  14. <img src="https://img.shields.io/github/v/release/infiniflow/ragflow?color=blue&label=Latest%20Release" alt="Latest Release">
  15. </a>
  16. <a href="https://demo.ragflow.io" target="_blank">
  17. <img alt="Static Badge" src="https://img.shields.io/badge/Online-Demo-4e6b99"></a>
  18. <a href="https://hub.docker.com/r/infiniflow/ragflow" target="_blank">
  19. <img src="https://img.shields.io/badge/docker_pull-ragflow:v0.12.0-brightgreen" alt="docker pull infiniflow/ragflow:v0.12.0"></a>
  20. <a href="https://github.com/infiniflow/ragflow/blob/main/LICENSE">
  21. <img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?labelColor=d4eaf7&color=2e6cc4" alt="license">
  22. </a>
  23. </p>
  24. <h4 align="center">
  25. <a href="https://ragflow.io/docs/dev/">Document</a> |
  26. <a href="https://github.com/infiniflow/ragflow/issues/162">Roadmap</a> |
  27. <a href="https://twitter.com/infiniflowai">Twitter</a> |
  28. <a href="https://discord.gg/4XxujFgUN7">Discord</a> |
  29. <a href="https://demo.ragflow.io">Demo</a>
  30. </h4>
  31. ## 💡 RAGFlow란?
  32. [RAGFlow](https://ragflow.io/)는 심층 문서 이해에 기반한 오픈소스 RAG (Retrieval-Augmented Generation) 엔진입니다. 이 엔진은 대규모 언어 모델(LLM)과 결합하여 정확한 질문 응답 기능을 제공하며, 다양한 복잡한 형식의 데이터에서 신뢰할 수 있는 출처를 바탕으로 한 인용을 통해 이를 뒷받침합니다. RAGFlow는 규모에 상관없이 모든 기업에 최적화된 RAG 워크플로우를 제공합니다.
  33. ## 🎮 데모
  34. 데모를 [https://demo.ragflow.io](https://demo.ragflow.io)에서 실행해 보세요.
  35. <div align="center" style="margin-top:20px;margin-bottom:20px;">
  36. <img src="https://github.com/infiniflow/ragflow/assets/7248/2f6baa3e-1092-4f11-866d-36f6a9d075e5" width="1200"/>
  37. <img src="https://github.com/infiniflow/ragflow/assets/12318111/b083d173-dadc-4ea9-bdeb-180d7df514eb" width="1200"/>
  38. </div>
  39. ## 🔥 업데이트
  40. - 2024-09-29 다단계 대화를 최적화합니다.
  41. - 2024-09-13 지식베이스 Q&A 검색 모드를 추가합니다.
  42. - 2024-09-09 Agent에 의료상담 템플릿을 추가하였습니다.
  43. - 2024-08-22 RAG를 통해 SQL 문에 텍스트를 지원합니다.
  44. - 2024-08-02: [graphrag](https://github.com/microsoft/graphrag)와 마인드맵에서 영감을 받은 GraphRAG를 지원합니다.
  45. - 2024-07-23: 오디오 파일 분석을 지원합니다.
  46. - 2024-07-08: [Graph](./agent/README.md)를 기반으로 한 워크플로우를 지원합니다.
  47. - 2024-06-27 Q&A 구문 분석 방식에서 Markdown 및 Docx를 지원하고, Docx 파일에서 이미지 추출, Markdown 파일에서 테이블 추출을 지원합니다.
  48. - 2024-05-23: 더 나은 텍스트 검색을 위해 [RAPTOR](https://arxiv.org/html/2401.18059v1)를 지원합니다.
  49. ## 🌟 주요 기능
  50. ### 🍭 **"Quality in, quality out"**
  51. - [심층 문서 이해](./deepdoc/README.md)를 기반으로 복잡한 형식의 비정형 데이터에서 지식을 추출합니다.
  52. - 문자 그대로 무한한 토큰에서 "데이터 속의 바늘"을 찾아냅니다.
  53. ### 🍱 **템플릿 기반의 chunking**
  54. - 똑똑하고 설명 가능한 방식.
  55. - 다양한 템플릿 옵션을 제공합니다.
  56. ### 🌱 **할루시네이션을 줄인 신뢰할 수 있는 인용**
  57. - 텍스트 청킹을 시각화하여 사용자가 개입할 수 있도록 합니다.
  58. - 중요한 참고 자료와 추적 가능한 인용을 빠르게 확인하여 신뢰할 수 있는 답변을 지원합니다.
  59. ### 🍔 **다른 종류의 데이터 소스와의 호환성**
  60. - 워드, 슬라이드, 엑셀, 텍스트 파일, 이미지, 스캔본, 구조화된 데이터, 웹 페이지 등을 지원합니다.
  61. ### 🛀 **자동화되고 손쉬운 RAG 워크플로우**
  62. - 개인 및 대규모 비즈니스에 맞춘 효율적인 RAG 오케스트레이션.
  63. - 구성 가능한 LLM 및 임베딩 모델.
  64. - 다중 검색과 결합된 re-ranking.
  65. - 비즈니스와 원활하게 통합할 수 있는 직관적인 API.
  66. ## 🔎 시스템 아키텍처
  67. <div align="center" style="margin-top:20px;margin-bottom:20px;">
  68. <img src="https://github.com/infiniflow/ragflow/assets/12318111/d6ac5664-c237-4200-a7c2-a4a00691b485" width="1000"/>
  69. </div>
  70. ## 🎬 시작하기
  71. ### 📝 사전 준비 사항
  72. - CPU >= 4 cores
  73. - RAM >= 16 GB
  74. - Disk >= 50 GB
  75. - Docker >= 24.0.0 & Docker Compose >= v2.26.1
  76. > 로컬 머신(Windows, Mac, Linux)에 Docker가 설치되지 않은 경우, [Docker 엔진 설치]((https://docs.docker.com/engine/install/))를 참조하세요.
  77. ### 🚀 서버 시작하기
  78. 1. `vm.max_map_count`가 262144 이상인지 확인하세요:
  79. > `vm.max_map_count`의 값을 아래 명령어를 통해 확인하세요:
  80. >
  81. > ```bash
  82. > $ sysctl vm.max_map_count
  83. > ```
  84. >
  85. > 만약 `vm.max_map_count` 이 262144 보다 작다면 값을 쟈설정하세요.
  86. >
  87. > ```bash
  88. > # 이 경우에 262144로 설정했습니다.:
  89. > $ sudo sysctl -w vm.max_map_count=262144
  90. > ```
  91. >
  92. > 이 변경 사항은 시스템 재부팅 후에 초기화됩니다. 변경 사항을 영구적으로 적용하려면 /etc/sysctl.conf 파일에 vm.max_map_count 값을 추가하거나 업데이트하세요:
  93. >
  94. > ```bash
  95. > vm.max_map_count=262144
  96. > ```
  97. 2. 레포지토리를 클론하세요:
  98. ```bash
  99. $ git clone https://github.com/infiniflow/ragflow.git
  100. ```
  101. 3. 미리 빌드된 Docker 이미지를 생성하고 서버를 시작하세요:
  102. > 다음 명령어를 실행하면 *dev* 버전의 RAGFlow Docker 이미지가 자동으로 다운로드됩니다. 특정 Docker 버전을 다운로드하고 실행하려면, **docker/.env** 파일에서 `RAGFLOW_IMAGE`을 원하는 버전으로 업데이트한 후, 예를 들어 `RAGFLOW_IMAGE=infiniflow/ragflow:v0.12.0`로 업데이트 한 뒤, 다음 명령어를 실행하세요.
  103. ```bash
  104. $ cd ragflow/docker
  105. $ chmod +x ./entrypoint.sh
  106. $ docker compose up -d
  107. ```
  108. > 기본 이미지는 약 9GB 크기이며 로드하는 데 시간이 걸릴 수 있습니다.
  109. 4. 서버가 시작된 후 서버 상태를 확인하세요:
  110. ```bash
  111. $ docker logs -f ragflow-server
  112. ```
  113. _다음 출력 결과로 시스템이 성공적으로 시작되었음을 확인합니다:_
  114. ```bash
  115. ____ ___ ______ ______ __
  116. / __ \ / | / ____// ____// /____ _ __
  117. / /_/ // /| | / / __ / /_ / // __ \| | /| / /
  118. / _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
  119. /_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
  120. * Running on all addresses (0.0.0.0)
  121. * Running on http://127.0.0.1:9380
  122. * Running on http://x.x.x.x:9380
  123. INFO:werkzeug:Press CTRL+C to quit
  124. ```
  125. > 만약 확인 단계를 건너뛰고 바로 RAGFlow에 로그인하면, RAGFlow가 완전히 초기화되지 않았기 때문에 브라우저에서 `network abnormal` 오류가 발생할 수 있습니다.
  126. 5. 웹 브라우저에 서버의 IP 주소를 입력하고 RAGFlow에 로그인하세요.
  127. > 기본 설정을 사용할 경우, `http://IP_OF_YOUR_MACHINE`만 입력하면 됩니다 (포트 번호는 제외). 기본 HTTP 서비스 포트 `80`은 기본 구성으로 사용할 때 생략할 수 있습니다.
  128. 6. [service_conf.yaml](./docker/service_conf.yaml) 파일에서 원하는 LLM 팩토리를 `user_default_llm`에 선택하고, `API_KEY` 필드를 해당 API 키로 업데이트하세요.
  129. > 자세한 내용은 [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup)를 참조하세요.
  130. _이제 쇼가 시작됩니다!_
  131. ## 🔧 설정
  132. 시스템 설정과 관련하여 다음 파일들을 관리해야 합니다:
  133. - [.env](./docker/.env): `SVR_HTTP_PORT`, `MYSQL_PASSWORD`, `MINIO_PASSWORD`와 같은 시스템의 기본 설정을 포함합니다.
  134. - [service_conf.yaml](./docker/service_conf.yaml): 백엔드 서비스를 구성합니다.
  135. - [docker-compose.yml](./docker/docker-compose.yml): 시스템은 [docker-compose.yml](./docker/docker-compose.yml)을 사용하여 시작됩니다.
  136. [.env](./docker/.env) 파일의 변경 사항이 [service_conf.yaml](./docker/service_conf.yaml) 파일의 내용과 일치하도록 해야 합니다.
  137. > [./docker/README](./docker/README.md) 파일에는 환경 설정과 서비스 구성에 대한 자세한 설명이 있으며, [./docker/README](./docker/README.md) 파일에 나열된 모든 환경 설정이 [service_conf.yaml](./docker/service_conf.yaml) 파일의 해당 구성과 일치하도록 해야 합니다.
  138. 기본 HTTP 서비스 포트(80)를 업데이트하려면 [docker-compose.yml](./docker/docker-compose.yml) 파일에서 `80:80`을 `<YOUR_SERVING_PORT>:80`으로 변경하세요.
  139. > 모든 시스템 구성 업데이트는 적용되기 위해 시스템 재부팅이 필요합니다.
  140. >
  141. > ```bash
  142. > $ docker-compose up -d
  143. > ```
  144. ## 🪛 소스 코드로 Docker 이미지를 컴파일합니다(임베딩 모델 포함하지 않음)
  145. 이 Docker 이미지의 크기는 약 1GB이며, 외부 대형 모델과 임베딩 서비스에 의존합니다.
  146. ```bash
  147. git clone https://github.com/infiniflow/ragflow.git
  148. cd ragflow/
  149. pip3 install huggingface-hub
  150. python3 download_deps.py
  151. docker build -f Dockerfile.slim -t infiniflow/ragflow:dev-slim .
  152. ```
  153. ## 🪚 소스 코드로 Docker 이미지를 컴파일합니다(임베딩 모델 포함)
  154. 이 Docker의 크기는 약 9GB이며, 이미 임베딩 모델을 포함하고 있으므로 외부 대형 모델 서비스에만 의존하면 됩니다.
  155. ```bash
  156. git clone https://github.com/infiniflow/ragflow.git
  157. cd ragflow/
  158. pip3 install huggingface-hub
  159. python3 download_deps.py
  160. docker build -f Dockerfile -t infiniflow/ragflow:dev .
  161. ```
  162. ## 🔨 소스 코드로 서비스를 시작합니다.
  163. 1. Poetry를 설치하거나 이미 설치된 경우 이 단계를 건너뜁니다:
  164. ```bash
  165. curl -sSL https://install.python-poetry.org | python3 -
  166. ```
  167. 2. 소스 코드를 클론하고 Python 의존성을 설치합니다:
  168. ```bash
  169. git clone https://github.com/infiniflow/ragflow.git
  170. cd ragflow/
  171. export POETRY_VIRTUALENVS_CREATE=true POETRY_VIRTUALENVS_IN_PROJECT=true
  172. ~/.local/bin/poetry install --sync --no-root # install RAGFlow dependent python modules
  173. ```
  174. 3. Docker Compose를 사용하여 의존 서비스(MinIO, Elasticsearch, Redis 및 MySQL)를 시작합니다:
  175. ```bash
  176. docker compose -f docker/docker-compose-base.yml up -d
  177. ```
  178. `/etc/hosts` 에 다음 줄을 추가하여 **docker/service_conf.yaml** 에 지정된 모든 호스트를 `127.0.0.1` 로 해결합니다:
  179. ```
  180. 127.0.0.1 es01 mysql minio redis
  181. ```
  182. **docker/service_conf.yaml** 에서 mysql 포트를 `5455` 로, es 포트를 `1200` 으로 업데이트합니다( **docker/.env** 에 지정된 대로).
  183. 4. HuggingFace에 접근할 수 없는 경우, `HF_ENDPOINT` 환경 변수를 설정하여 미러 사이트를 사용하세요:
  184. ```bash
  185. export HF_ENDPOINT=https://hf-mirror.com
  186. ```
  187. 5. 백엔드 서비스를 시작합니다:
  188. ```bash
  189. source .venv/bin/activate
  190. export PYTHONPATH=$(pwd)
  191. bash docker/launch_backend_service.sh
  192. ```
  193. 6. 프론트엔드 의존성을 설치합니다:
  194. ```bash
  195. cd web
  196. npm install --force
  197. ```
  198. 7. **.umirc.ts** 에서 `proxy.target` 을 `http://127.0.0.1:9380` 으로 업데이트합니다:
  199. 8. 프론트엔드 서비스를 시작합니다:
  200. ```bash
  201. npm run dev
  202. ```
  203. _다음 인터페이스는 시스템이 성공적으로 시작되었음을 나타냅니다:_
  204. ![](https://github.com/user-attachments/assets/0daf462c-a24d-4496-a66f-92533534e187)
  205. ## 📚 문서
  206. - [Quickstart](https://ragflow.io/docs/dev/)
  207. - [User guide](https://ragflow.io/docs/dev/category/user-guides)
  208. - [References](https://ragflow.io/docs/dev/category/references)
  209. - [FAQ](https://ragflow.io/docs/dev/faq)
  210. ## 📜 로드맵
  211. [RAGFlow 로드맵 2024](https://github.com/infiniflow/ragflow/issues/162)을 확인하세요.
  212. ## 🏄 커뮤니티
  213. - [Discord](https://discord.gg/4XxujFgUN7)
  214. - [Twitter](https://twitter.com/infiniflowai)
  215. - [GitHub Discussions](https://github.com/orgs/infiniflow/discussions)
  216. ## 🙌 컨트리뷰션
  217. RAGFlow는 오픈소스 협업을 통해 발전합니다. 이러한 정신을 바탕으로, 우리는 커뮤니티의 다양한 기여를 환영합니다. 참여하고 싶으시다면, 먼저 [가이드라인](./CONTRIBUTING.md)을 검토해 주세요.