# ragify-lib: Effortless Retrieval-Augmented Generation (RAG) Workflows in Python
**ragify-lib** is a modern, production-ready Python library that makes Retrieval-Augmented Generation (RAG) simple, fast, and flexible. With just a few lines of code, you can chunk, embed, store, and retrieve text using state-of-the-art embedding models and vector databases. Whether youβre building chatbots, search engines, or knowledge assistants, ragify-lib helps you unlock the power of RAG with minimal setup.
---
## π Why Choose ragify-lib?
- **Minimal Setup**: Go from raw text to powerful retrieval in minutes.
- **Flexible**: Easily configure your embedding model, chunking strategy, and vector database (supports Quadrant and mock mode).
- **Human-Readable Results**: Retrieve relevant text chunks with similarity scores and metadataβno need to handle raw embeddings.
- **CLI Included**: Use the command-line tool for quick experiments and automation.
- **Open Source**: Free to use for research and commercial projects.
---
## π€ About the Developer
**Rahul Wale**
AI Developer & Researcher
Rahul specializes in building practical, scalable AI solutions for real-world problems, with a focus on natural language processing and information retrieval.
---
## π¦ Installation
```bash
pip install ragify-lib
```
---
## π Example 1: Local RAG Workflow in Python
```python
from ragify import KaliRAG
# 1. Configure your database and embedding model (optional, uses sensible defaults)
rag = KaliRAG()
rag.configure_database(api_key="mock_key", host="localhost", port=6333, collection="my_collection")
rag.configure_embedding_model("all-MiniLM-L6-v2")
rag.configure_chunking(chunk_size=256, chunk_overlap=32)
# 2. Store your documents
documents = [
"Retrieval-Augmented Generation (RAG) combines retrieval and generation for better answers.",
"ragify-lib makes it easy to build RAG pipelines in Python.",
"You can use Quadrant or mock mode for vector storage."
]
for doc in documents:
rag.create_store_embedding(doc)
# 3. Retrieve relevant chunks for a query
results = rag.retrieve_embedding("How does RAG work?")
for chunk in results["results"]:
print(f"Text: {chunk['text']}\nScore: {chunk['score']}\n")
```
---
## π Example 2: File-Based Workflow & CLI Usage
**Create embeddings from a file and query them using the CLI:**
```bash
# Store embeddings from a text file
ragify create --input knowledge.txt --output embeddings.json --api-key mock_key
# Query your knowledge base
ragify query "What is retrieval-augmented generation?" --top-k 3
```
**Or configure everything via the CLI:**
```bash
ragify config --api-key mock_key --host "localhost" --port 6333 --collection "my_collection" --model "all-MiniLM-L6-v2" --chunk-size 256 --chunk-overlap 32
```
> **Note:** Use `--api-key mock_key` for local/mock mode. For production, use your real Quadrant API key.
---
## π Features
- **Plug-and-play** with Quadrant vector database or use built-in mock mode
- **Customizable chunking and embedding** for any use case
- **Returns human-readable results** with scores and metadata
- **Designed for both developers and researchers**
- **Robust CLI** for automation and scripting
- **Easy integration** with existing Python projects
---
## π οΈ Advanced Usage
- **Recursive Chunking**: Handles very long documents with automatic recursion.
- **Similarity Thresholds**: Filter results by similarity score.
- **Comprehensive Logging**: Built-in logging for debugging and monitoring.
- **Error Handling**: Robust error handling with detailed error messages.
---
## π Use Cases
- AI-powered chatbots and assistants
- Semantic search engines
- Knowledge base augmentation
- Research and prototyping in NLP
---
## π Documentation
For full documentation, visit the [official docs](https://ragify.readthedocs.io/) or see the CLI help:
```bash
ragify --help
```
---
## π License
This project is licensed under the MIT License.
---
**ragify-lib**: The easiest way to add Retrieval-Augmented Generation to your Python projects.
Raw data
{
"_id": null,
"home_page": "https://github.com/ragify/ragify",
"name": "ragify-lib",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "rag, retrieval-augmented-generation, embeddings, vector-database, ai, nlp",
"author": "Ragify Team",
"author_email": "contact@ragify.dev",
"download_url": "https://files.pythonhosted.org/packages/c6/a6/eac124e8e648804bbdc73f07f5c878f89bf96cf4f2de61476879ce32bfea/ragify_lib-0.1.5.tar.gz",
"platform": null,
"description": "# ragify-lib: Effortless Retrieval-Augmented Generation (RAG) Workflows in Python\r\n\r\n**ragify-lib** is a modern, production-ready Python library that makes Retrieval-Augmented Generation (RAG) simple, fast, and flexible. With just a few lines of code, you can chunk, embed, store, and retrieve text using state-of-the-art embedding models and vector databases. Whether you\u2019re building chatbots, search engines, or knowledge assistants, ragify-lib helps you unlock the power of RAG with minimal setup.\r\n\r\n---\r\n\r\n## \ud83d\ude80 Why Choose ragify-lib?\r\n\r\n- **Minimal Setup**: Go from raw text to powerful retrieval in minutes.\r\n- **Flexible**: Easily configure your embedding model, chunking strategy, and vector database (supports Quadrant and mock mode).\r\n- **Human-Readable Results**: Retrieve relevant text chunks with similarity scores and metadata\u2014no need to handle raw embeddings.\r\n- **CLI Included**: Use the command-line tool for quick experiments and automation.\r\n- **Open Source**: Free to use for research and commercial projects.\r\n\r\n---\r\n\r\n## \ud83d\udc64 About the Developer\r\n\r\n**Rahul Wale** \r\nAI Developer & Researcher \r\nRahul specializes in building practical, scalable AI solutions for real-world problems, with a focus on natural language processing and information retrieval.\r\n\r\n---\r\n\r\n## \ud83d\udce6 Installation\r\n\r\n```bash\r\npip install ragify-lib\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcdd Example 1: Local RAG Workflow in Python\r\n\r\n```python\r\nfrom ragify import KaliRAG\r\n\r\n# 1. Configure your database and embedding model (optional, uses sensible defaults)\r\nrag = KaliRAG()\r\nrag.configure_database(api_key=\"mock_key\", host=\"localhost\", port=6333, collection=\"my_collection\")\r\nrag.configure_embedding_model(\"all-MiniLM-L6-v2\")\r\nrag.configure_chunking(chunk_size=256, chunk_overlap=32)\r\n\r\n# 2. Store your documents\r\ndocuments = [\r\n \"Retrieval-Augmented Generation (RAG) combines retrieval and generation for better answers.\",\r\n \"ragify-lib makes it easy to build RAG pipelines in Python.\",\r\n \"You can use Quadrant or mock mode for vector storage.\"\r\n]\r\nfor doc in documents:\r\n rag.create_store_embedding(doc)\r\n\r\n# 3. Retrieve relevant chunks for a query\r\nresults = rag.retrieve_embedding(\"How does RAG work?\")\r\nfor chunk in results[\"results\"]:\r\n print(f\"Text: {chunk['text']}\\nScore: {chunk['score']}\\n\")\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcdd Example 2: File-Based Workflow & CLI Usage\r\n\r\n**Create embeddings from a file and query them using the CLI:**\r\n\r\n```bash\r\n# Store embeddings from a text file\r\nragify create --input knowledge.txt --output embeddings.json --api-key mock_key\r\n\r\n# Query your knowledge base\r\nragify query \"What is retrieval-augmented generation?\" --top-k 3\r\n```\r\n\r\n**Or configure everything via the CLI:**\r\n\r\n```bash\r\nragify config --api-key mock_key --host \"localhost\" --port 6333 --collection \"my_collection\" --model \"all-MiniLM-L6-v2\" --chunk-size 256 --chunk-overlap 32\r\n```\r\n\r\n> **Note:** Use `--api-key mock_key` for local/mock mode. For production, use your real Quadrant API key.\r\n\r\n---\r\n\r\n## \ud83c\udf1f Features\r\n\r\n- **Plug-and-play** with Quadrant vector database or use built-in mock mode\r\n- **Customizable chunking and embedding** for any use case\r\n- **Returns human-readable results** with scores and metadata\r\n- **Designed for both developers and researchers**\r\n- **Robust CLI** for automation and scripting\r\n- **Easy integration** with existing Python projects\r\n\r\n---\r\n\r\n## \ud83d\udee0\ufe0f Advanced Usage\r\n\r\n- **Recursive Chunking**: Handles very long documents with automatic recursion.\r\n- **Similarity Thresholds**: Filter results by similarity score.\r\n- **Comprehensive Logging**: Built-in logging for debugging and monitoring.\r\n- **Error Handling**: Robust error handling with detailed error messages.\r\n\r\n---\r\n\r\n## \ud83d\udcda Use Cases\r\n\r\n- AI-powered chatbots and assistants\r\n- Semantic search engines\r\n- Knowledge base augmentation\r\n- Research and prototyping in NLP\r\n\r\n---\r\n\r\n## \ud83d\udcd6 Documentation\r\n\r\nFor full documentation, visit the [official docs](https://ragify.readthedocs.io/) or see the CLI help:\r\n\r\n```bash\r\nragify --help\r\n```\r\n\r\n---\r\n\r\n## \ud83d\udcc4 License\r\n\r\nThis project is licensed under the MIT License.\r\n\r\n---\r\n\r\n**ragify-lib**: The easiest way to add Retrieval-Augmented Generation to your Python projects. \r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple, clean Python library for Retrieval-Augmented Generation (RAG)",
"version": "0.1.5",
"project_urls": {
"Bug Reports": "https://github.com/ragify/ragify/issues",
"Documentation": "https://ragify.readthedocs.io/",
"Homepage": "https://github.com/ragify/ragify",
"Source": "https://github.com/ragify/ragify"
},
"split_keywords": [
"rag",
" retrieval-augmented-generation",
" embeddings",
" vector-database",
" ai",
" nlp"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "268848a5f6b43226508a912fe1da761e5031aa03738873c91f97fc90b9647a03",
"md5": "b0133b282bde90c938103605704838a2",
"sha256": "39faa7a7889164b2acbb9e9184488a52de2d5eacfc6647c019f53978f82c6b3b"
},
"downloads": -1,
"filename": "ragify_lib-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b0133b282bde90c938103605704838a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 18833,
"upload_time": "2025-07-11T08:23:35",
"upload_time_iso_8601": "2025-07-11T08:23:35.455443Z",
"url": "https://files.pythonhosted.org/packages/26/88/48a5f6b43226508a912fe1da761e5031aa03738873c91f97fc90b9647a03/ragify_lib-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c6a6eac124e8e648804bbdc73f07f5c878f89bf96cf4f2de61476879ce32bfea",
"md5": "97e5609a208fa06634b4c068c563417b",
"sha256": "c456d29c6a2a4126ebad3f566594c3f184058ae4a73027648fe3d09d5c47d238"
},
"downloads": -1,
"filename": "ragify_lib-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "97e5609a208fa06634b4c068c563417b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 18010,
"upload_time": "2025-07-11T08:23:36",
"upload_time_iso_8601": "2025-07-11T08:23:36.439575Z",
"url": "https://files.pythonhosted.org/packages/c6/a6/eac124e8e648804bbdc73f07f5c878f89bf96cf4f2de61476879ce32bfea/ragify_lib-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 08:23:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ragify",
"github_project": "ragify",
"github_not_found": true,
"lcname": "ragify-lib"
}