Skip to content

ajthr/RAG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAG Helper Package

An easy-to-use python package for building Retrieval-Augmented Generation (RAG) applications.

Installation

pip install git+https://github.com/ajthr/RAG.git

Dependencies

Install specific extras based on your needs:

# For OpenAI support
pip install rag[openai]@git+https://github.com/ajthr/RAG.git

# For Ollama support
pip install rag[ollama]@git+https://github.com/ajthr/RAG.git

# For All features
pip install rag[all]@git+https://github.com/ajthr/RAG.git

Quick Start

Here is a minimal example to get you started:

from rag.rag_pipeline import RAGPipeline
from rag.vectordbs import ChromaDB
from rag.embeddings import SentenceTransformerEmbedding
from rag.llms import OpenAILLM

# 1. Setup Components
llm = OpenAILLM(api_key="your-api-key")
vectordb = ChromaDB(collection_name="my_rag_app")
embedding = SentenceTransformerEmbedding()

# 2. Create Pipeline
pipeline = RAGPipeline(
    llm=llm,
    vectordb=vectordb,
    embedding=embedding
)

# 3. Index & Query
pipeline.index_documents(["RAG is powerful.", "Python is great."])
response = pipeline.query("What is RAG?")
print(response)

Examples

Check the examples/ directory for more usage examples.

Documentation

See the API Documentation for detailed class references.

About

A helper python package for building Retrieval-Augmented Generation (RAG) systems

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages