RAGLite: lightweight RAG with DuckDB or PostgreSQL and late chunking

AI-generated summary of reporting by GitHub Opensource Projects. Read the original for the full story.

Why it matters

Developers who avoided RAG because of vector database overhead can now run retrieval locally with plain SQL via RAGLite.

Read this as

RAGLite is a free, open-source Python library for building retrieval-augmented generation (RAG), which means software that answers questions using your own documents. Unlike typical RAG tools, it stores document embeddings (numeric summaries of text) in ordinary databases like DuckDB or PostgreSQL rather than specialized vector databases. It also delays cutting documents into pieces until query time, keeping more context for better answers. This suits individuals and small teams who want question-answering over PDFs, notes or code without cloud setup or extra servers.

RAGLite lowers the cost and setup burden of RAG projects by using DuckDB or PostgreSQL with pgvector instead of a dedicated vector database, and works on a laptop with no cloud API key or Docker. It targets the common case of small document collections, internal docs, notes, code search, and explicitly does not handle millions of documents out of the box. The project is early, so the API may change. Organizations with heavy RAG infrastructure needs gain little; teams prototyping without an AWS bill gain most.

RAGLite implements RAG on DuckDB (single-user, no server) or PostgreSQL with pgvector for similarity search, storing embeddings as BLOBs in SQL rows queryable with joins and filters. Its distinctive feature is late chunking: whole documents or sections are embedded, and chunks are split dynamically at retrieval time, avoiding context loss from fixed-size chunk boundaries. LLM backends include OpenAI, Ollama, or any OpenAI-compatible endpoint, defaulting to a local sentence transformer for embeddings. Limitations: no benchmark numbers given, API instability, and no stated support for million-document scale.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

RAGLite DuckDB PostgreSQL pgvector Ollama OpenAI

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading