Skip to main content

A simple RAG (Retrieval-Augmented Generation) framework for Python.

Project description

RAGy

RAGy is a simple framework for building Retrieval-Augmented Generation (RAG) applications. It provides a set of tools and utilities to help you create RAG applications quickly and easily.

It ships with a simple interface for building RAG applications, as well as a set of pre-built components that you can use to get started quickly (OpenAI LLMs, Chroma vector stores, etc.).

Installation

You can install RAGy using pip:

pip install ragy

Usage

Here's a simple example of how to use RAGy to build a RAG application:

from ragy.rag import RAG
from ragy.reasoning import OpenAIEmbeddingModel, OpenAIGPTEngine
from ragy.rawdoc import DirectoryRawDocumentRetriever
from ragy.vector import ChromaVectorStore

# Create a RAG interface with the necessary components
system_prompt = "You are a helpful assistant that provides accurate information."
embedding_model = OpenAIEmbeddingModel(model='text-embedding-3-small')
raw_document_retriever = DirectoryRawDocumentRetriever(dir='path/to/documents')
vector_store = ChromaVectorStore(collection_name='my_collection')
ai_engine = OpenAIGPTEngine(model='gpt-5.2')

rag = RAG(
    system_prompt=system_prompt,
    embedding_model=embedding_model,
    raw_document_retriever=raw_document_retriever,
    vector_store=vector_store,
    ai_engine=ai_engine
)

# Use the RAG interface to generate a response to a query
response = rag.generate('What is the capital of France?')
print(response)

# Use the RAG interface to ingest documents into the vector store
rag.ingest(chunk_size=512, chunk_overlap=128)

Contributing

Contributions to RAGy are welcome! If you have an idea for a new feature or improvement, please open an issue or submit a pull request.

License

RAGy is licensed under the MIT License. See the LICENSE file for more information.

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

ragy-0.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

ragy-0.1.1-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file ragy-0.1.1.tar.gz.

File metadata

  • Download URL: ragy-0.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ragy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c615595cfe7ecb71126f7dde5006443318d2dcf4598f21ea61e3f4d0a826fc6f
MD5 58949ce4c87f373a8e1121efa23fad4e
BLAKE2b-256 dcef286c3a7936556384d333902216d8dce87996d6009a26f8229e77614fd2b7

See more details on using hashes here.

File details

Details for the file ragy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: ragy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ragy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b4caddd2aaa34c2e61ed2d782114c1873cb499cfb0ffc48577928d07cf4ce95
MD5 0f7c8be4e0da2e157a7858ab1c7bd1d9
BLAKE2b-256 f964bd6030611d6d2c50f47144f7c5696503e5c49b9b54a9cac8a8a323f7ef33

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