fufan-chat-api  by fufankeji

RAG-based Q&A system for local knowledge bases

created 1 year ago
298 stars

Top 90.1% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a comprehensive, RAG-based Q&A system for private knowledge bases, targeting developers and researchers building intelligent applications. It offers flexible deployment via Docker and integrates multiple LLM functionalities, including general Q&A, private data retrieval, internet search, AI agents, and recommendation systems, with a robust RAG evaluation framework.

How It Works

Built upon LangChain-chatchat v0.2, this system features a decoupled frontend (Vue3) and backend (Python). It leverages a combination of relational (MySQL) and vector databases (Faiss, Milvus) for efficient data storage and retrieval. The core RAG implementation allows for querying private corpora (Wiki, PDF, Markdown) and integrates with various LLMs, including ChatGLM3-6b, GLM-4, and supports OpenAI, Qwen2 via frameworks like FastChat, Vllm, and Ollama.

Quick Start & Requirements

  • Install: git clone the repository, cd into it, and run pip install -r requirements.txt.
  • Prerequisites: Python 3.10+, MySQL 5.7+, Milvus 2.3.7+.
  • Setup: Initialize MySQL tables (python server/db/create_all_model.py), Faiss (python server/knowledge_base/init_vs.py), start Milvus if needed, and run the backend with python startup.py.
  • Docs: API endpoint documentation available at http://{server_ip}:8000/docs.

Highlighted Details

  • Supports five core LLM application scenarios: general Q&A, private knowledge base Q&A, real-time internet search Q&A, AI Agents Q&A, and LLM recommendation systems.
  • Implements a complete RAG evaluation scheme and process, referencing FlashRAG.
  • Offers fine-grained user permission management for data security and privacy.
  • Includes fixes for GLM-4 API streaming output and asynchronous LangChain memory loading.

Maintenance & Community

The project has launched version 1.0 and is actively iterating. Technical discussions are available via a WeChat group (add "littlelion_1215" with message "RAG"). BiliBili lectures are available from @Muyu Cheney.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

A temporary workaround for a Milvus indexing error (TypeError: 'NoneType' object is not subscriptable) involves forcing langchain-core==0.2.5, which may cause version dependency conflicts. The AI Agents Q&A feature is planned for an upgrade based on LangChain-chatchat v0.3.

Health Check
Last commit

8 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
70 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.