Skip to content

Ak-Gautam/sRAG

Repository files navigation

zRAG

Python Package codecov PyPI version Python Versions

A lightweight and easy-to-use RAG (Retrieval Augmented Generation) library for building question-answering systems with open-source models and vector stores.

Installation

pip install zrag

Quick Start

from zrag import DocumentLoader, RAGPipeline

# Load documents
loader = DocumentLoader()
documents = loader.load("path/to/documents")

# Create RAG pipeline
rag = RAGPipeline()
rag.index(documents)

# Query
response = rag.query("Your question here")
print(response)

Key Features

  • Document Loading: PDF, text, and markdown support
  • Chunking Strategies: Token, sentence, and paragraph-based splitting
  • Embeddings: Support for transformer-based models
  • Vector Stores: FAISS and ChromaDB integration
  • LLM Integration: Easy integration with various language models
  • Data Generation: Synthetic data generation for training/testing

Components

Component Description
DocumentLoader Load and parse documents from various formats
ChunkSplitter Split documents into manageable chunks
Embeddings Generate vector embeddings for text
VectorStore Store and retrieve document embeddings
LLM Interface for language model integration
RAGPipeline End-to-end RAG implementation

Requirements

  • Python 3.9+
  • PyTorch
  • Transformers
  • FAISS or ChromaDB
  • Additional dependencies in requirements.txt

License

MIT License - see LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors