Skip to main content

Lightweight RAG framework

Project description

RAGBee FW

Lightweight Retrieval-Augmented-Generation framework for SMEs.

RAGBee helps you load documents → split → retrieve → generate
with any LLM (OpenAI, HF Inference API, local vLLM/Triton).
Ports & Adapters + DI give you clean extensibility; CLI lets you run the pipeline in three commands.


✨ Features

  • Clean architecturecore.ports (contracts) + infrastructure.* (plug-ins)
  • Dependency Injection — YAML config ⇒ container wires loader / splitter / retriever / LLM
  • CLI (ragbee_cli)ingest, ask, shell out of the box
  • LLM agnostic — OpenAI, HuggingFace Hub, vLLM, Triton … or your own adapter
  • Composable — embed in FastAPI, Telegram-bot, Streamlit, Airflow DAG
  • MIT license — free for commercial use

🚀 Quick start

pip install ragbee-fw           # 1. install

ragbee_cli ingest config.yml    # 2. build index
ragbee_cli ask config.yml "Что такое RAG?"   # 3. ask
ragbee_cli shell config.yml     # …or interactive REPL

config.yml (minimal):

data_loader:
  type: file_loader
  path: ./data

text_chunker:
  type: recursive_splitter
  chunk_size: 500
  chunk_overlap: 100

retriever:
  type: bm25
  top_k: 3

llm:
  type: hf
  model_name: gpt-3.5-turbo
  token: ${env:HF_TOKEN}

🧑‍💻 Python API

from ragbee_fw import DIContainer, load_config

cfg = load_config("config.yml")
container = DIContainer(cfg)

# 1) build / update index
ingestion = container.build_ingestion_service()
ingestion.build_index()                # or .update_index()

# 2) answer questions
answer = container.build_answer_service()
print(answer.generate_answer("What is RAG?", top_k=3))

🗺 Architecture (Clean / Hexagonal)

┌───────────────────┐
│      CLI / UI     │  ←  FastAPI, Streamlit, Telegram Bot …
└─────────▲─────────┘
          │ adapter
┌─────────┴─────────┐
│    Application    │  ←  DI container, services
└─────────▲─────────┘
          │ ports
┌─────────┴─────────┐
│      Core         │  ←  pure dataclasses, protocols
└─────────▲─────────┘
          │ adapters
┌─────────┴─────────┐
│ Infrastructure    │  ←  FS-loader, Splitter, BM25, HF LLM …
└───────────────────┘

📚 Documentation

Docs & API — README

Examples — example/

🤝 Contributing

  1. Fork → clone → poetry install

  2. Format code with black . && isort .

  3. Submit PR → CI will run lint & tests

See CONTRIBUTING.md for full guide.

📜 License

MIT © V.A. Shevchenko — free for any purpose, commercial or private.

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

ragbee_fw-0.1.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

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

ragbee_fw-0.1.3-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ragbee_fw-0.1.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.12 Linux/6.6.51-1.red80.x86_64

File hashes

Hashes for ragbee_fw-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7c7cbfc51c558448f192a6323c905c25ba8d5ccd174dabce055162be7f3bc4c2
MD5 e1b78976820a2ee9d312bc0135c83f16
BLAKE2b-256 ea79edeb37e8f6557ce87d1d668049e1e1d87222e2245a711cfb70155e8f9b6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ragbee_fw-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.12 Linux/6.6.51-1.red80.x86_64

File hashes

Hashes for ragbee_fw-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 69e640fd18851e21b13e651e3ab470f522c8b8e06b064ef2da271105ad9d04c0
MD5 87a80d5cad687543892b393f1baaf4df
BLAKE2b-256 86fc99ecfe629f6a5ced48f2d5a4fc3d7ac45f3e625ef5759136ced83b267692

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