Model or dataset
superlinear-ai/raglite avatar
superlinear-ai/raglite

raglite justifies three optimisations by naming the maths, and pins four dependencies for Python 3.10

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

1,212 stars117 forksPythonMPL-2.0

At a glance

What is it?
RAGLite is a small retrieval-augmented-generation toolkit that keeps the dependency list short by pushing search into the database and the model layer into a provider shim. The parts worth reading closely are the ones where the short list is bought with ceilings: an older runtime on the oldest interpreter, a NumPy that has not moved to 2, and one document-processing feature you install outside the package.
Who is it for?
RAGLite fits someone who wants retrieval-augmented generation without adopting a framework, who is happy to choose either a local model or a hosted one, and who will read a chunking default once before changing it. It does not fit you if you need a current NumPy, a current runtime, or an OCR path that arrives with the package, because two of those are excluded by version and one is installed as a separate package.
Can I use it commercially?
Yes, with conditions. MPL-2.0 is a weak copyleft licence: you can use it inside commercial and closed-source software, but if you distribute changes to its own files, you must publish those changes under the same licence.
Is it still maintained?
Yes. The repository last received commits 12 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • superlinear-ai/raglite1,212 ★ · +12
Star history
Repository2026-09-102026-11-13
superlinear-ai/raglite1.2k1.2k

12 Stars in the last 64 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Three of the claims are justified by naming an optimisation problem

The feature list has an unusual habit: where it claims something is optimal, it says which problem was solved. Sentence splitting is optimal by way of a binary integer programming problem. Semantic chunking is optimal by the same technique. The query adapter, which maps an embedding space onto the model's, is a closed-form linear solution to an orthogonal Procrustes problem. That is a checkable claim rather than a marketing one, because you can go and read how the problem was formulated. Two more techniques are borrowed rather than solved: multi-vector chunk embedding with late chunking, and contextual chunk headings for chunks that end up out of context. The sentence splitter is not borrowed either, it is the maintainer's own package, which is worth knowing if you want to swap it out.

The short dependency list is bought with four version ceilings

The package prides itself on avoiding heavy frameworks, and the list bears that out: no PyTorch, no LangChain, a pure-Python PostgreSQL driver, a trimmed ORM variant, and the search primitives come from the database rather than from a library. What the list pays for it is four separate exclusions. The machine learning runtime is capped below a specific version because a later one drops support for the oldest interpreter, and it is only installed at all below that interpreter version. NumPy is held below 2. SciPy excludes three consecutive patch releases. The embedded database excludes one minor version outright. Each of those is a comment in the manifest with a reason, which is better than a silent cap, but together they mean the toolkit will not install cleanly on a current scientific stack without someone resolving the pins.

Four of the five install commands are extras, and the fifth is not

The installation section is five commands, and the pattern breaks on the fourth. The base install is one command. The chat frontend, the Pandoc conversion path and the evaluation harness are each an extra appended in square brackets. Then document processing with OCR is documented as installing a different package entirely, on its own, with no relationship to the toolkit's extras. That is a small inconsistency with a practical consequence: if you install the package with extras and expect OCR to be there, it is not, and nothing in the package's metadata tells you so. The same section also carries a long recipe for local models, where four shell variables select the precompiled wheel and the page warns that not every combination is available.

The local model identifier carries the context window in the string

Configuration is one call with a database URL, a model and an embedder:

python
my_config = RAGLiteConfig(
    db_url="postgresql://my_username:my_password@my_host:5432/my_database",
    llm="gpt-4o-mini",  # Or any LLM supported by LiteLLM
    embedder="text-embedding-3-large",  # Or any embedder supported by LiteLLM
)

The hosted case is unremarkable because the provider shim handles it. The local case is where the design shows: a llama.cpp model is named as a provider prefix, the Hugging Face repository, the filename, and then a context size after an at sign, which the page describes as an optional parameter. So the same string selects both weights and context length, and getting the context wrong means the local run silently truncates where a hosted run would not. The page also points at a hosted PostgreSQL provider for people who do not want to run a database.

The dev container mounts the parent directory, not the repository

The compose file for local development has two services and one detail that is worth pausing on. The database is the vector-enabled PostgreSQL image at version 17, with a literal username and password in the file, and its data directory is a tmpfs, so it is deliberately thrown away on every start rather than migrated. The development container builds from a named stage, passes a CI flag and your provider key through, and mounts the parent of the repository into the workspace rather than the repository itself. That is convenient when you work across a checkout, and it is also the broadest possible mount for a container that has passwordless sudo. There is no health condition on the dependency, so the application can start before the database is accepting connections.

The compiler image is pinned to the oldest interpreter the package supports

The development image is built on Python 3.10, which is exactly the floor the package declares and two versions below its ceiling. That is the right choice for a container meant to catch the oldest case, and it also explains the runtime ceiling in the dependency list. The rest of the image is set up for local models specifically: a compiler and its OpenMP headers are installed so the C++ inference binding can build, and the compiler variables are set explicitly to that toolchain rather than inherited. There is also a comfortable layer on top, with a non-root user holding passwordless sudo, shell history on the arrow keys, and a prompt theme configured. None of that is required to run the toolkit; it is the price of making the container pleasant.

Hybrid search is the database's job, not the toolkit's

The retrieval design is the clearest statement of philosophy. Rather than ship a vector store, the toolkit uses what the two supported databases already have: the full-text and vector extensions on the embedded database, and the text search vector type with its extension on the server database, combined through a published rank-fusion method. So the same configuration object switches retrieval implementation by changing one string. Two retrieval-time behaviours are worth knowing. Retrieval can be adaptive, where the model itself decides whether to retrieve and what to look for from the query, which trades a call for skipping a pointless one. And the message array is structured for prompt caching, so repeated prefixes are not re-billed, which matters most against the hosted providers that charge for them.

Editorial conclusion

RAGLite fits someone who wants retrieval-augmented generation without adopting a framework, who is happy to choose either a local model or a hosted one, and who will read a chunking default once before changing it. It does not fit you if you need a current NumPy, a current runtime, or an OCR path that arrives with the package, because two of those are excluded by version and one is installed as a separate package. Before you commit, check the runtime and NumPy versions in your environment against the pins, and read the semantic chunking default rather than assuming the defaults were chosen for your documents.

Frequently asked questions

What is RAGLite and what databases does it support?

It is a Python toolkit for retrieval-augmented generation that works with either DuckDB or PostgreSQL as its keyword and vector search database. Hybrid search uses each database's own primitives, the full-text and vector extensions on DuckDB and text search vectors with pgvector on PostgreSQL.

Which LLM providers can RAGLite use?

Any provider supported by the LiteLLM shim, including local models through the C++ inference binding. A local model is identified by a string carrying a provider prefix, the Hugging Face repository, the filename and an optional context size after an at sign.

Does RAGLite need PyTorch or LangChain?

No, and the feature list names both as things it avoids, saying the dependencies are only lightweight and permissive ones. It also avoids a compiled PostgreSQL driver by using a pure-Python one, and a trimmed ORM variant, and it ships a command line interface through the usual typing-based library rather than a framework.

How do I install RAGLite's OCR support?

Separately from the package. The chat frontend, Pandoc conversion and evaluation harness are extras appended to the install command, but the OCR path is documented as installing a different package on its own, with no relationship to the toolkit's extras.

Why does RAGLite pin several dependencies to older versions?

The manifest explains them one by one. The machine learning runtime is capped below a version that dropped support for the oldest supported interpreter and is only installed below that interpreter, NumPy is held below 2, SciPy excludes three consecutive patch releases, and the embedded database excludes one minor version.

Official sources

  1. Issues
  2. License: MPL-2.0
  3. README
  4. Releases
  5. superlinear-ai/raglite on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/superlinear-ai-raglite.svg)](https://hysenlabs.com/projects/superlinear-ai-raglite)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/superlinear-ai-raglite.svg)](https://hysenlabs.com/projects/superlinear-ai-raglite)

Was this useful?