RAG for Chinese history Q&A
Top 37.1% on sourcepulse
This project provides a Chinese history question-answering application using Retrieval-Augmented Generation (RAG) with vector databases. It targets users seeking accurate historical information and aims to mitigate LLM hallucination by grounding responses in retrieved historical documents.
How It Works
The core approach leverages the LlamaIndex framework for RAG. It offers two primary deployment options: a local Milvus vector database setup using the BAAI/bge-base-zh-v1.5 embedding model, or a cloud-based Zilliz Cloud Pipelines service for document processing and retrieval. Both methods utilize OpenAI's GPT-4 for text generation. The system ingests historical texts, slices them, generates embeddings, and stores them in a vector index for efficient retrieval.
Quick Start & Requirements
pip install -r requirements.txt
(virtual environment recommended).Highlighted Details
cfgs/config.yaml
.Maintenance & Community
The project has seen recent updates (June 2024) to LlamaIndex and reranker functionality. Contributions are noted from users like darius-gs, BetterAndBetterII, leyiang, and taihaozesong.
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
The Zilliz Cloud Pipelines solution currently only supports importing documents via URL. Customizing LLMs requires modifying executor.py
in addition to configuration files. The project relies on OpenAI's GPT-4 by default, and alternative LLM integration may require code changes.
1 year ago
1 day