dsRAG  by D-Star-AI

RAG engine for unstructured data, excelling on dense text QA

created 1 year ago
1,459 stars

Top 28.7% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

dsRAG is a high-performance retrieval engine designed for complex question-answering over unstructured text, targeting users who need superior accuracy on challenging datasets like financial reports and legal documents. It significantly outperforms vanilla RAG baselines by employing advanced techniques to enhance context and relevance.

How It Works

dsRAG improves retrieval accuracy through three core methods: Semantic Sectioning, which uses an LLM to break documents into semantically cohesive sections with descriptive titles; AutoContext, which prepends these section titles to text chunks to provide richer context to embedding and reranking models; and Relevant Segment Extraction (RSE), a query-time process that intelligently combines relevant chunks into longer segments for improved LLM comprehension. This layered approach aims to reduce irrelevant results and increase the precision of retrieved information.

Quick Start & Requirements

  • Install via pip: pip install dsRAG
  • Install with vector database support: pip install dsRAG[faiss], pip install dsRAG[chroma], etc., or pip install dsRAG[all-vector-dbs] for all.
  • Requires API keys for default providers (OpenAI, Cohere) set as environment variables (OPENAI_API_KEY, CO_API_KEY).
  • Official quickstart and documentation available.

Highlighted Details

  • Achieves 96.6% accuracy on FinanceBench, compared to 32% for vanilla RAG.
  • Evaluated on custom KITE benchmark across AI Papers, financial reports, company handbooks, and legal documents, showing significant gains with CCH+RSE.
  • Highly customizable architecture with interchangeable components for VectorDB, ChunkDB, Embedding, Reranker, LLM, and FileSystem.
  • Supports VLM for PDF parsing and metadata filtering for targeted queries.

Maintenance & Community

  • Developed by a two-person applied AI consulting firm.
  • Community support via Discord.
  • Users in production are encouraged to fill out a form for feature prioritization and potential priority email support.

Licensing & Compatibility

  • No explicit license mentioned in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

  • Semantic sectioning and VLM features are noted as still undergoing improvements.
  • Default configuration relies on proprietary LLM and embedding providers, requiring API keys and potentially incurring costs.
  • The absence of a specified license raises concerns about usage rights and commercial compatibility.
Health Check
Last commit

5 days ago

Responsiveness

1 day

Pull Requests (30d)
2
Issues (30d)
1
Star History
97 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.