raglite-toolkit
Semantic search, cited answers, an MCP server and agent tools over your documents, in a few lines of Python.
Documentation · Getting started · Providers · MCP server · Troubleshooting · Changelog
RAGLite indexes PDFs, Word files, Markdown, text, JSON, folders and web pages, then searches them and answers questions with any LLM, citing the passages it used.
- Answers with citations, including the PDF page and Markdown section of each passage
- Hybrid search: vector search for meaning, BM25 for exact terms such as error codes, or both
- Metadata filters and reranking, and
raglite evalto measure retrieval on your own questions - MCP server for Claude Code, Claude Desktop, Cursor and VS Code, and a function-calling tool for OpenAI and Anthropic agents
- Any provider: OpenAI, Anthropic, Google, Mistral, Cohere, Groq, xAI and Ollama; install only the extras you use
- Fully local option: local embeddings and Ollama, no API key
- Content-hash caching, Qdrant and Pinecone stores, streaming, a FastAPI REST API and a CLI
Install
Requires Python 3.11 or later.
pip install 'raglite-toolkit[local,anthropic]' # local embeddings (the default) + Claude answers
pip install 'raglite-toolkit[all]' # every provider
Quick start
import os
from raglite import Document
doc = Document("./policy.pdf", {
"llm": {"provider": "anthropic", "apiKey": os.environ["ANTHROPIC_API_KEY"]},
})
doc.build()
hits = doc.search("refund policy", top_k=3)
answer = doc.ask("What is the refund policy?")
print(answer.text) # "Refunds are issued within 30 days [1]."
print(answer.citations) # [Citation(n=1, source="policy.pdf", page=12, text="...")]
Learn more
- Collections: index folders, files and URLs together
- Citations: pages and sections for each cited passage
- Hybrid search: vector, keyword and hybrid retrieval
- Metadata filters: search one customer's documents or a range of pages
- Reranking: Cohere, Voyage, an LLM or your own function
- Evaluating retrieval:
raglite evalscores recall@k, MRR and hit rate on your questions - MCP server: give your documents to AI coding tools
- Agent tools:
as_tool()for OpenAI and Anthropic function calling - Streaming, progress and cancellation
- Vector stores: Qdrant, Pinecone or your own
- REST API and CLI
- How caching works
- Options and types
Choose the Python tab on any page; the choice is remembered.
TypeScript
The same library for TypeScript: raglite-toolkit on npm (source).
Contributing
See CONTRIBUTING.md. Security issues: SECURITY.md.
License
MIT © Piyush Anand
Metadata
Release files for raglite-toolkit 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| raglite_toolkit-2.2.0.tar.gz | 113.9 kB | With provenance | Details for raglite_toolkit-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| raglite_toolkit-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for raglite_toolkit-2.2.0-py3-none-any.whl |
Total release size: 190.9 kB
Release files / raglite_toolkit-2.2.0.tar.gz
| Download URL | raglite_toolkit-2.2.0.tar.gz |
|---|---|
| Size | 113.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9a4bd04dd1fda61b0aab4056e01fd04feab1e37bbda49359ffbd539605658478
|
|
BLAKE2b-256 checksum How to use checksums |
9fb4cebd2ced0713f677d60ef970bed790e496dc00eee4d81c6d1e280b4901e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / raglite_toolkit-2.2.0-py3-none-any.whl
| Download URL | raglite_toolkit-2.2.0-py3-none-any.whl |
|---|---|
| Size | 76.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64601e21c6d90ac6e22ba675c6efb558aa63fb0edb6e8edc387e04669aa7d1a5
|
|
BLAKE2b-256 checksum How to use checksums |
1d4927e81ab5a5ae14dff6e2c16fdeefc329bec2c12d69d2317d5a0c1f601d33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logSecurity for raglite-toolkit 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for raglite_toolkit-2.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.