Build RAG that
actually performs.
A Python framework for retrieval-augmented generation. Speculative Retrieval eliminates latency. Context Tetris maximizes every token.
Speculative Retrieval
Why wait for the LLM to finish thinking? Quira predicts the required context and pre-fetches it asynchronously. Built-in Lexical Intent Debouncing ensures we only query your database when intent changes, eliminating latency without exploding API costs.
Read how it worksContext Tetris
Language models have strict context window limits. Instead of blindly passing the top-K retrieved chunks, Quira employs a dynamic scoring algorithm to pack the most valuable chunks into your remaining token budget based on relevance, recency, diversity, and density.
Explore the algorithmDifferential Retrieval
In a multi-turn chat session, standard frameworks continuously re-fetch the same documents from the database. Quira maintains state on the server and only fetches the delta from the vector database, slashing redundant retrieval latency and API costs.
Learn about deltasHow Quira Works
A streamlined, high-performance RAG pipeline designed from the ground up for minimal latency.
Performance at Scale
Real-world metrics demonstrating the impact of Speculative Retrieval and Context Tetris.
Quickstart
Production-ready in minutes
Initialize a pipeline, pick your providers, and integrate directly with LangChain or LlamaIndex. No boilerplate, no configuration hell.
- pip install quira
- Drop-in LangChain retriever
- Automated vector packing
- Streaming first-class citizen
from quira import quiraPipeline, UserSessionfrom quira.integrations import QuiraRetrieverpipeline = quiraPipeline(vector_store="qdrant",cache="redis",llm="openai/gpt-4o")# 100% LangChain compatibleretriever = QuiraRetriever(pipeline=pipeline)docs = retriever.invoke("What is Context Tetris?")# Full pipeline with streamingsession = UserSession("user_123")async for chunk in pipeline.process_submission_stream(session, "What is quantum mechanics?"):print(chunk, end="", flush=True)
The people behind Quira
Every developer who has shipped code, docs, or fixes — pulled live from GitHub. Thank you. ♥
08 — Changelog
Shipping, in the open.
We constantly iterate to make Quira faster, leaner, and more powerful. Here are the latest updates to the framework.
Enterprise Edition & Session Store
Added RedisSessionStore for horizontal scaling and native observability with OpenTelemetry and LangSmith.
Streaming Output & Multi-Format Ingestion
Added process_submission_stream and extended DocumentIngestor to natively parse .html, .docx, and .md.
Provider Abstraction Layer
Initial implementation of PAL supporting Qdrant, Pinecone, Chroma, OpenAI, Anthropic, and Groq.
Frequently Asked Questions
Everything you need to know about the product and billing.
