# 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 architecture** — `core.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
```bash
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):
```yaml
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
```python
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](https://github.com/droogg/ragbee_fw/blob/main/README.md)
Examples — [example/](https://github.com/droogg/ragbee_fw/tree/main/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.
Raw data
{
"_id": null,
"home_page": "https://github.com/droogg/ragbee_fw",
"name": "ragbee-fw",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "rag, llm, retrieval, framework",
"author": "shevchenko v.a.",
"author_email": "droogg@mail.ru",
"download_url": "https://files.pythonhosted.org/packages/ea/79/edeb37e8f6557ce87d1d668049e1e1d87222e2245a711cfb70155e8f9b6a/ragbee_fw-0.1.3.tar.gz",
"platform": null,
"description": "# RAGBee FW\n\n*Lightweight Retrieval-Augmented-Generation framework for SMEs.*\n\nRAGBee helps you **load documents \u2192 split \u2192 retrieve \u2192 generate** \nwith any LLM (OpenAI, HF Inference API, local vLLM/Triton). \nPorts & Adapters + DI give you clean extensibility; CLI lets you run the pipeline in three commands.\n\n---\n\n## \u2728 Features\n\n- **Clean architecture** \u2014 `core.ports` (contracts) + `infrastructure.*` (plug-ins) \n- **Dependency Injection** \u2014 YAML config \u21d2 container wires loader / splitter / retriever / LLM \n- **CLI (`ragbee_cli`)** \u2014 `ingest`, `ask`, `shell` out of the box \n- **LLM agnostic** \u2014 OpenAI, HuggingFace Hub, vLLM, Triton \u2026 or your own adapter \n- **Composable** \u2014 embed in FastAPI, Telegram-bot, Streamlit, Airflow DAG \n- **MIT license** \u2014 free for commercial use\n\n---\n\n## \ud83d\ude80 Quick start\n\n```bash\npip install ragbee-fw # 1. install\n\nragbee_cli ingest config.yml # 2. build index\nragbee_cli ask config.yml \"\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 RAG?\" # 3. ask\nragbee_cli shell config.yml # \u2026or interactive REPL\n```\n\n#### config.yml (minimal):\n\n```yaml\ndata_loader:\n type: file_loader\n path: ./data\n\ntext_chunker:\n type: recursive_splitter\n chunk_size: 500\n chunk_overlap: 100\n\nretriever:\n type: bm25\n top_k: 3\n\nllm:\n type: hf\n model_name: gpt-3.5-turbo\n token: ${env:HF_TOKEN}\n```\n\n## \ud83e\uddd1\u200d\ud83d\udcbb Python API\n\n```python\n\nfrom ragbee_fw import DIContainer, load_config\n\ncfg = load_config(\"config.yml\")\ncontainer = DIContainer(cfg)\n\n# 1) build / update index\ningestion = container.build_ingestion_service()\ningestion.build_index() # or .update_index()\n\n# 2) answer questions\nanswer = container.build_answer_service()\nprint(answer.generate_answer(\"What is RAG?\", top_k=3))\n```\n\n## \ud83d\uddfa Architecture (Clean / Hexagonal)\n\n```\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 CLI / UI \u2502 \u2190 FastAPI, Streamlit, Telegram Bot \u2026\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25b2\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502 adapter\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Application \u2502 \u2190 DI container, services\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25b2\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502 ports\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Core \u2502 \u2190 pure dataclasses, protocols\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u25b2\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n \u2502 adapters\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502 Infrastructure \u2502 \u2190 FS-loader, Splitter, BM25, HF LLM \u2026\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## \ud83d\udcda Documentation\n\nDocs & API \u2014 [README](https://github.com/droogg/ragbee_fw/blob/main/README.md)\n\nExamples \u2014 [example/](https://github.com/droogg/ragbee_fw/tree/main/example)\n\n\n## \ud83e\udd1d Contributing\n\n1. Fork \u2192 clone \u2192 poetry install\n\n2. Format code with black . && isort .\n\n3. Submit PR \u2192 CI will run lint & tests\n\nSee ```CONTRIBUTING.md``` for full guide.\n\n### \ud83d\udcdc License\nMIT \u00a9 V.A. Shevchenko \u2014 free for any purpose, commercial or private.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Lightweight RAG framework",
"version": "0.1.3",
"project_urls": {
"Homepage": "https://github.com/droogg/ragbee_fw",
"Repository": "https://github.com/droogg/ragbee_fw"
},
"split_keywords": [
"rag",
" llm",
" retrieval",
" framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "86fc99ecfe629f6a5ced48f2d5a4fc3d7ac45f3e625ef5759136ced83b267692",
"md5": "87a80d5cad687543892b393f1baaf4df",
"sha256": "69e640fd18851e21b13e651e3ab470f522c8b8e06b064ef2da271105ad9d04c0"
},
"downloads": -1,
"filename": "ragbee_fw-0.1.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "87a80d5cad687543892b393f1baaf4df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 24393,
"upload_time": "2025-07-27T18:41:52",
"upload_time_iso_8601": "2025-07-27T18:41:52.426430Z",
"url": "https://files.pythonhosted.org/packages/86/fc/99ecfe629f6a5ced48f2d5a4fc3d7ac45f3e625ef5759136ced83b267692/ragbee_fw-0.1.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ea79edeb37e8f6557ce87d1d668049e1e1d87222e2245a711cfb70155e8f9b6a",
"md5": "e1b78976820a2ee9d312bc0135c83f16",
"sha256": "7c7cbfc51c558448f192a6323c905c25ba8d5ccd174dabce055162be7f3bc4c2"
},
"downloads": -1,
"filename": "ragbee_fw-0.1.3.tar.gz",
"has_sig": false,
"md5_digest": "e1b78976820a2ee9d312bc0135c83f16",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 17027,
"upload_time": "2025-07-27T18:41:54",
"upload_time_iso_8601": "2025-07-27T18:41:54.074254Z",
"url": "https://files.pythonhosted.org/packages/ea/79/edeb37e8f6557ce87d1d668049e1e1d87222e2245a711cfb70155e8f9b6a/ragbee_fw-0.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-27 18:41:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "droogg",
"github_project": "ragbee_fw",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ragbee-fw"
}