RagLangChainTest  by NanGePlus

RAG framework for multi-LLM private knowledge base construction and retrieval

Created 1 year ago
260 stars

Top 97.5% on SourcePulse

GitHubView on GitHub
Project Summary

This project offers a unified Retrieval Augmented Generation (RAG) framework for building and querying private knowledge bases, supporting multiple LLMs (OpenAI, Qwen) via a single codebase. It targets developers needing to integrate LLMs with proprietary data, simplifying domain-specific AI application development.

How It Works

The RAG pipeline includes offline (document loading, chunking, vectorization, Chroma DB ingestion) and online (query vectorization, retrieval, prompt templating, LLM generation) phases. It leverages LangChain for orchestration and LCEL for chain composition, with optional LangSmith integration. A key component is OneAPI, an API gateway abstracting LLM provider specifics for seamless model switching.

Quick Start & Requirements

  • Installation: Clone repo, set up Python environment (Anaconda/PyCharm), pip install -r requirements.txt.
  • Prerequisites: Anaconda/PyCharm, OneAPI (deployment, LLM API keys), potential OpenAI proxy, LangSmith API key (optional), input documents (e.g., PDFs in input).
  • Configuration: Adjust API endpoints, keys, and models in scripts (vectorSaveTest.py, main.py, apiTest.py).
  • Resources: No specific hardware (GPU/CUDA) or OS requirements detailed.
  • Demos: Numerous Bilibili video links provided for setup and advanced features.

Highlighted Details

  • Multi-LLM Support: Unified RAG via OneAPI gateway for OpenAI, Qwen, etc.
  • Advanced Retrieval: Integrates a re-ranker (bge-reranker-large) for refined search results.
  • PDF Table Handling: Solutions for processing tables in PDFs (image-to-text analysis, text extraction/summarization).
  • Conversation Memory: Retains and utilizes historical dialogue context.
  • LangChain Expression Language (LCEL): Enables declarative chain composition.

Maintenance & Community

  • Hosted on GitHub and Gitee.
  • Extensive Bilibili video series offer detailed setup and feature walkthroughs.
  • No explicit community channels or roadmap mentioned.

Licensing & Compatibility

  • The README does not specify a software license, potentially impacting commercial use or integration.

Limitations & Caveats

  • Requires a code modification in langchain_openai/embeddings/base.py to fix a BadRequestError.
  • OneAPI setup and API key management add deployment complexity.
  • Lacks explicit performance benchmarks, hardware acceleration requirements (GPU/CUDA), or OS compatibility details.
Health Check
Last Commit

1 year ago

Responsiveness

Inactive

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

Explore Similar Projects

Starred by Shizhe Diao Shizhe Diao(Author of LMFlow; Research Scientist at NVIDIA), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
2 more.

LightRAG by HKUDS

2.5%
33k
RAG framework for fast, simple retrieval-augmented generation
Created 1 year ago
Updated 1 day ago
Feedback? Help us improve.