Python toolkit for Retrieval-Augmented Generation (RAG) using DuckDB or PostgreSQL
Top 36.8% on sourcepulse
RAGLite is a Python toolkit for building Retrieval-Augmented Generation (RAG) systems, offering flexibility in LLM providers, databases (PostgreSQL/SQLite), and rerankers. It targets developers and researchers seeking a lightweight, performant, and extensible RAG solution, enabling advanced features like adaptive retrieval and optimized chunking.
How It Works
RAGLite leverages a modular design, integrating with LiteLLM for LLM and embedder abstraction, and supporting both PostgreSQL (with pgvector
) and SQLite (with sqlite-vec
) for hybrid search. It employs advanced techniques such as optimal sentence splitting via integer programming, multi-vector chunk embedding with late chunking, and adaptive retrieval where the LLM determines the need for external data. This approach aims to improve RAG performance, reduce costs, and enhance output quality.
Quick Start & Requirements
pip install raglite
. Extras available: [chainlit]
, [pandoc]
, [ragas]
.llama-cpp-python
wheels (e.g., pip install "https://github.com/abetlen/llama-cpp-python/releases/download/v0.3.4-cu121/llama_cpp_python-0.3.4-cp310-cp310-linux_x86_64.whl"
).Highlighted Details
llama.cpp
models.Maintenance & Community
The project follows Conventional Commits for automated semantic versioning and changelog generation. Development environment setup is detailed, supporting GitHub Codespaces, VS Code Dev Containers, and uv
.
Licensing & Compatibility
The project appears to use permissive open-source dependencies. Specific licensing for RAGLite itself is not explicitly stated in the provided README snippet, but the focus on lightweight and permissive dependencies suggests compatibility with most commercial and closed-source applications.
Limitations & Caveats
The README notes that sqlite-vec
is used until it matures, implying potential future changes or reliance on PyNNDescent
in the interim. Some advanced features like evaluation require installing additional extras.
1 month ago
1 week