Skip to content

aigc-apps/PAI-RAG

Repository files navigation

PAI-RAG: An easy-to-use framework for modular RAG

PAI-RAG CI Build

English | 简体中文 |

📕 Contents

💡 What is PAI-RAG?

PAI-RAG is an easy-to-use opensource framework for modular RAG (Retrieval-Augmented Generation). It combines LLM (Large Language Model) to provide truthful question-answering capabilities, supports flexible configuration and custom development of each module of the RAG system. It offers a production-level RAG workflow for businesses of any scale based on Alibaba Cloud's Platform of Artificial Intelligence (PAI).

🌟 Key Features

  • Modular design, flexible and configurable
  • Powerful RAG capability: multi-modal rag, agentic-rag and nl2sql support
  • Built on community open source components, low customization threshold
  • Multi-dimensional automatic evaluation system, easy to grasp the performance quality of each module
  • Integrated llm-based-application tracing and evaluation visualization tools
  • Interactive UI/API calls, convenient iterative tuning experience
  • Alibaba Cloud fast scenario deployment/image custom deployment/open source private deployment

🔎 Get Started

Run in Docker

  1. Setup environmental variables.
    cd docker
    cp .env.example .env
    edit .env file if you are using dashscope api or oss store:
  2. Start with docker compose command:
    docker compose up -d
  3. Now you can open http://localhost:8000 to check whether it works. The service will need to download the model weights, which may take a while (usually 20 minutes).

Run in Local Environment

If you want to start running/developing pai_rag locally, please refer to local development

📜 Documents

API specification

You can access and integrate our RAG service according to our API specification.

Agentic RAG

You can use agent with function calling api-tools in PAI-RAG, please refer to the documentation: Agentic RAG

Data Analysis

You can use data analysis based on database or sheet file in PAI-RAG, please refer to the documentation: Data Analysis

Supported File Types

文件类型 文件格式
Unstructured .txt, .docx, .pdf, .html,.pptx,.md
Images .gif, .jpg,.png,.jpeg, .webp
Structured .csv,.xls, .xlsx,.jsonl
Others .epub,.mbox,.ipynb
  1. .doc files need to be converted to .docx files.
  2. .ppt and .pptm files need to be converted to .pptx files.

About

An easy-to-use framework for modular RAG

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages