Practical overview
When it fits
Use Softrag when an application needs hybrid retrieval in an embedded SQLite database and a separate vector database service would add unnecessary infrastructure.
Who it is for
- Python developers embedding retrieval and question-answering features in applications.
- Teams building local knowledge bases or repository search tools.
- Desktop and test-tool developers who want an index without a separate database service.
Documented uses
- Ingest files, URLs or raw text into a local retrieval index.
- Search with both semantic similarity and exact-term matching.
- Query indexed material and retrieve an answer with associated source names.
- Keep an index and its metadata together in a portable SQLite database file.
Requirements & limits
Softrag is an MIT-licensed open-source Python library. Its README specifies Python 3.10 or later and installation with pip.
- The core engine uses sqlite-vec; model backends are optional, and provider integrations or local embeddings can require separate extras.
- PDF ingestion requires the
softrag[files]extra; enhanced URL fetching and web extraction are available throughsoftrag[web]. - Vector search is exact rather than approximate; the README describes its fit as up to a few hundred thousand chunks.
- The library does not provide sharding, replication or a multi-writer cluster, and concurrent writes serialize on SQLite's write lock.
- Retrieval combines vector and FTS5/BM25 rankings with Reciprocal Rank Fusion; optional stages include MMR diversity and neighbouring-chunk expansion.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Softrag and add a source to a SQLite index
Set up the library, create a database connection, and ingest a documented file, URL or text input.
Before you start
- Python 3.10 or later
- Install Softrag with pip
Steps
Run the command below.
pip install softragImport
softragin Python and callsoftrag.connect("kb.db")to open or create the index database.Call
rag.add(...)with a file path, URL or raw text.
Expected outcome
A SQLite database connection with the supplied source added to the index.
Guide limitations
- PDF reading requires the
softrag[files]extra. - A model backend may be detected from the environment; otherwise Softrag falls back to a hash embedder with a warning.
Query an indexed source and inspect answer sources
Submit a question to an existing Softrag index and access the returned answer and source list.
Before you start
- Python 3.10 or later
- Softrag installed
- A Softrag SQLite index and an ingested source
Steps
Import
softragand connect to the database withsoftrag.connect("kb.db").Call
rag.query("your question")and store the returned answer.Print the answer and inspect
answer.sources.
Expected outcome
A string answer and an accessible list of source names associated with it.
Guide limitations
- The selected model backend affects answer generation; Softrag may detect a configured backend or use its hash-embedder fallback.
Compare options for Retrieval-augmented applications
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Softrag | Ingest files, URLs or raw text into a local retrieval index. | Linux, macOS, Self-hosted, Windows | Softrag is an MIT-licensed open-source Python library. Its README specifies Python 3.10 or later and installation with pip. |
| Langsearch | Crawl website or local data for a knowledge base. | CLI, Self-hosted, Server | |
| Hybrid Search Rag | Combine document retrieval and language-model generation in a configurable workflow. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 15 October 2026
- Original website title
- JulioPeixoto/softrag · Official homepage title · retained in its source language

