Skip to main content

A modular, production-grade Retrieval-Augmented Generation library

Project description

raglib

raglib is a modular, production-grade Python library for Retrieval-Augmented Generation (RAG).

Installation

Install from PyPI:

pip install raglib-py

Install with optional extras:

pip install raglib-py[tavily,serpapi,faiss]

Quick import check

python -c "from raglib.rag_types.naive_rag import NaiveRAG; print('Import successful')"

One-line API quickstart

from raglib import RAG

rag = RAG("my_documents/")
result = rag.query("What is this report about?")

print(result.answer)
print(result.sources)

You can also add more sources later:

rag.add("new_data.docx")
rag.add("https://example.com/article")

Features

  • Modular retrieval components (vector, web, hybrid, routing, multi-query, multi-hop)
  • RAG strategy orchestrators (naive, advanced, corrective, self, agentic, and more)
  • Mock LLM client for offline testing
  • Provider abstraction with fallback chaining
  • Full test suite with unit, integration, e2e, and edge coverage

Detailed usage guide

See docs/USAGE.md for a full Python usage guide with quickstart, component wiring, and advanced orchestrator examples.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

raglib_py-0.1.3.tar.gz (48.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raglib_py-0.1.3-py3-none-any.whl (98.0 kB view details)

Uploaded Python 3

File details

Details for the file raglib_py-0.1.3.tar.gz.

File metadata

  • Download URL: raglib_py-0.1.3.tar.gz
  • Upload date:
  • Size: 48.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for raglib_py-0.1.3.tar.gz
Algorithm Hash digest
SHA256 a7a5a2354c0c516774ceea61bda17db468b8d752fe1c050b9688ead72270f553
MD5 17af638f2b4b705c3cf8c3d654abba69
BLAKE2b-256 8a70118fa2cab89f97e7a0f7939756bf54f1843f5e5d6e5fc4c1c57ae146db29

See more details on using hashes here.

File details

Details for the file raglib_py-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: raglib_py-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 98.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for raglib_py-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 57ad67ac2352e84cf653fccca54396ce8b0a859d05567455e5c846e3c79165d5
MD5 06e14f89c4c97257b74c2548ea6b0a37
BLAKE2b-256 09448b4409b7f99c4f7f9c8e38549a8cbd221a6a1bd71990df678477bca03c2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page