RAG without the kitchen sink
Most RAG frameworks treat PyTorch and LangChain as table stakes; this one builds a full retrieval pipeline on DuckDB or PostgreSQL without them.

What it does
RAGLite is a Python toolkit that wires up document ingestion, hybrid search, and LLM generation against either DuckDB or PostgreSQL. It converts PDFs to Markdown, chunks them semantically, embeds them, and answers questions by retrieving relevant context through a mix of keyword and vector search. The whole thing is designed to run locally or remotely, with LiteLLM handling model routing and optional acceleration via Metal or CUDA.
The interesting bit The project treats chunking and query adaptation as optimization problems: it uses binary integer programming to split sentences and chunk semantically, and solves an orthogonal Procrustes problem to align queries with the embedding space. That is a lot of linear algebra for a tool that deliberately avoids PyTorch and LangChain, but it keeps the dependency stack thin.
Key highlights
- Database-native hybrid search: combines DuckDB’s FTS+VSS extensions or PostgreSQL’s
tsvector+pgvectorrather than bolting on an external vector store. - Adaptive retrieval: the LLM decides whether retrieval is even needed and what to fetch, which can cut latency and cost.
- Late chunking and contextual chunk headings aim to keep multi-vector embeddings grounded in surrounding context.
- Built-in MCP server and optional
Chainlitfrontend, so it can plug into Claude Desktop or serve a web UI without extra glue. - Prompt caching-aware message structures and Anthropic’s long-context formatting for when you do hit remote APIs.
Caveats
- The README is enthusiastic about “optimal” solutions, but doesn’t publish benchmarks comparing retrieval quality against baseline chunking strategies.
- Several headline features—Mistral OCR, Pandoc conversion, Ragas evaluation, Chainlit—are optional extras that require separate dependencies.
Verdict Good fit for developers who want a self-hosted or embedded RAG backend without inheriting an entire MLOps stack. Skip it if you are already invested in PyTorch-based embedding pipelines or need a managed cloud-native vector database.
Frequently asked
- What is superlinear-ai/raglite?
- Most RAG frameworks treat PyTorch and LangChain as table stakes; this one builds a full retrieval pipeline on DuckDB or PostgreSQL without them.
- Is raglite open source?
- Yes — superlinear-ai/raglite is open source, released under the MPL-2.0 license.
- What language is raglite written in?
- superlinear-ai/raglite is primarily written in Python.
- How popular is raglite?
- superlinear-ai/raglite has 1.2k stars on GitHub.
- Where can I find raglite?
- superlinear-ai/raglite is on GitHub at https://github.com/superlinear-ai/raglite.