Overview
Quivr is an open-source framework for building Retrieval-Augmented Generation (RAG) applications. It lets you ingest your own files and then ask questions about them in plain language, so you can build a personal assistant or a 'second brain' on top of your documents.
The project ships an opinionated, ready-made RAG pipeline through the quivr-core Python package. It handles the retrieval and answering for you, so you can focus on your product instead of wiring up the plumbing. Quivr works with many LLM providers and supports a wide range of file formats.
What it does
- Opinionated RAG pipeline that is fast and efficient out of the box, so you do not have to assemble retrieval logic yourself
- Works with any LLM, including OpenAI, Anthropic, Mistral, and local models served through Ollama
- Handles any file, such as PDF, TXT, and Markdown, and lets you plug in your own parsers
- Customizable RAG: add internet search, add tools, and tune behavior through a YAML workflow config
- Configurable retrieval with reranking and adjustable history, token limits, and temperature settings
- Integrates with Megaparse for file ingestion before querying with Quivr
Getting started
Quivr needs Python 3.10 or newer. You install the quivr-core package and can build a working RAG in just a few lines of code.
Install the package
Install quivr-core from PyPI using pip.
pip install quivr-coreCreate a brain from your files
Build a Brain from one or more files and ask it a question. Quivr handles ingestion and retrieval for you.
from quivr_core import Brain
brain = Brain.from_files(
name="test_brain",
file_paths=["./my_first_doc.pdf", "./my_second_doc.txt"],
)
answer = brain.ask("what is gold?")
print("answer:", answer)Set your API key
Add your LLM provider API key to your environment. Quivr supports Anthropic, OpenAI, and Mistral, plus local models through Ollama.
import os
os.environ["OPENAI_API_KEY"] = "myopenai_apikey"Customize retrieval with a YAML workflow
Define a workflow in a YAML file and load it with RetrievalConfig to control reranking, history, token limits, and temperature, then pass it when you ask a question.
from quivr_core.config import RetrievalConfig
retrieval_config = RetrievalConfig.from_yaml("./basic_rag_workflow.yaml")
answer = brain.ask("your question", retrieval_config=retrieval_config)Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Build a personal 'second brain' assistant that answers questions from your own notes and documents
- Add a document question-answering feature to a product without building the RAG pipeline from scratch
- Experiment with different retrieval strategies by editing a YAML config instead of changing code
- Run RAG over private files with a local LLM through Ollama to keep data on your own machine
How Quivr compares
Quivr alongside other open-source rag frameworks & platforms tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Dify | ★ 146k | An open-source platform with a visual workflow builder for creating LLM and RAG applications without writing much code. |
| RAGFlow | ★ 83.2k | A RAG engine built around deep document understanding that turns complex files into a grounded, citation-backed question-answering layer. |
| Context7 | ★ 57.7k | Context7 pulls current, version-specific documentation and code examples for any library and feeds them into your LLM, available as a CLI skill or an MCP server. |
| Quivr | ★ 39.2k | Opinionated RAG core that turns your files into a queryable second brain |
| LightRAG | ★ 36.8k | A graph-based RAG system that builds an entity-and-relationship knowledge graph for fast retrieval and easy incremental updates. |
| GraphRAG | ★ 33.9k | Microsoft's graph-based RAG system that extracts a knowledge graph from documents to answer broad, multi-document questions. |
| PageIndex | ★ 33.2k | PageIndex turns long PDFs into a table-of-contents tree and uses LLM reasoning to retrieve relevant sections, with no vector database and no chunking. |
| FastGPT | ★ 28.6k | FastGPT is an open-source AI agent platform that pairs a built-in knowledge base with a drag-and-drop Flow editor, so you can build question-answering apps without heavy setup. |