superlinear-ai/raglite

🥤 RAGLite is a Python toolkit for Retrieval-Augmented Generation (RAG) with DuckDB or PostgreSQL

What it solves

RAGLite is a lightweight Python toolkit designed to simplify the implementation of Retrieval-Augmented Generation (RAG) pipelines. It removes the complexity of heavy frameworks like LangChain and PyTorch, providing a streamlined way to integrate LLMs with vector and keyword search databases to ground AI responses in specific documents.

How it works

The toolkit allows users to configure an LLM provider (via LiteLLM) and a database (DuckDB or PostgreSQL). It processes documents by converting them to Markdown, applying semantic chunking, and creating multi-vector embeddings. For retrieval, it supports hybrid search (combining keyword and vector search) and reranking to find the most relevant content. It also features "adaptive retrieval," where the LLM determines if and what to retrieve based on the user's query.

Who it’s for

It is intended for developers who want a fast, permissive, and extensible RAG implementation without the overhead of large ML frameworks, as well as those looking to integrate their knowledge base with MCP clients like Claude Desktop.

Highlights

  • Flexible Backend: Supports DuckDB and PostgreSQL for storage and LiteLLM for LLM/embedding provider flexibility.
  • Advanced Chunking: Implements late chunking, contextual chunk headings, and optimal semantic splitting using binary integer programming.
  • Adaptive RAG: The LLM can autonomously decide when to trigger retrieval based on the prompt.
  • MCP Integration: Includes a built-in Model Context Protocol server to connect with AI clients like Claude Desktop.
  • Optimized Performance: Features prompt caching-aware structures and a closed-form linear query adapter to improve retrieval quality.

Related

  • Project
  • Project
  • Project
  • Project
  • Project