Skip to main content

AutoRAG is a flexible and scalable solution for building Retrieval-Augmented Generation (RAG) systems.

Project description

AutoRAG

Powering seamless retrieval and generation workflows for our internal AI systems

Python Version PyPI Version Code Formatter Code Linter Code Checker Code Coverage

Overview

AutoRAG is a flexible and scalable solution for building Retrieval-Augmented Generation (RAG) systems.

This SDK provides out-of-the-box functionality for creating and managing retrieval-augmented generation workflows, offering a modular, highly-configurable interface. It supports multiple vector stores and leverages http clients like httpx for handling requests, ensuring seamless integration.

Features

  • Modular architecture: The SDK allows you to swap, extend, or customize components like retrieval models, vector stores, and response generation strategies.
  • High scalability: Built to handle large-scale data retrieval and generation, enabling robust, production-ready applications.
  • Celery for dependency injection: Efficient background tasks with support for distributed task execution.
  • Multi-flow support: Easily integrate various vector databases (ex: Qdrant, Azure AI Search) with various language models providers (ex: OpenAI, vLLM, Ollama) using standardized public methods for seamless development.

Installation

  1. Create a virtual environment, we recommend Miniconda for environment management:
    conda create -n autorag python=3.12
    conda activate autorag
    
  2. Install the package:
    pip install autonomize-autorag
    

To install with optional dependencies like Qdrant, Huggingface, OpenAI, Modelhub, etc., refer to the Installation Guide.

Usage

The full set of examples can be found in examples directory.

Sync Usage

import os
from autorag.language_models import OpenAILanguageModel

llm = OpenAILanguageModel(
    api_key=os.environ.get("OPENAI_API_KEY"),
)

generation = llm.generate(
    message=[{"role": "user", "content": "What is attention in ML?"}],
    model="gpt-4o"
)

Async Usage

Simply use sync methods with a prefix and use await for each call. Example: client.generate(...) becomes await client.agenerate(...) and everything else remains the same.

import os
from autorag.language_models import OpenAILanguageModel

llm = OpenAILanguageModel(
    api_key=os.environ.get("OPENAI_API_KEY"),
)

generation = await llm.agenerate(
    message=[{"role": "user", "content": "What is attention in ML?"}],
    model="gpt-4o"
)

Contribution

To contribute in our AutoRAG SDK, please refer to our Contribution Guidelines.

License

Copyright (C) Autonomize AI - All Rights Reserved

The contents of this repository cannot be copied and/or distributed without the explicit permission from Autonomize.ai

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autonomize_autorag-0.1.90.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

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

autonomize_autorag-0.1.90-py3-none-any.whl (88.9 kB view details)

Uploaded Python 3

File details

Details for the file autonomize_autorag-0.1.90.tar.gz.

File metadata

  • Download URL: autonomize_autorag-0.1.90.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1020-azure

File hashes

Hashes for autonomize_autorag-0.1.90.tar.gz
Algorithm Hash digest
SHA256 50d1efc640b4483b9178289faa29ff4cb2ff4b57f5bd0e642272aaa4be49ec01
MD5 3092ad397be0199e2b5f5b8b536bbf3b
BLAKE2b-256 cb28f5533373f3c22e923c280b3d193db686fab7036c22c281b66728e15e70f7

See more details on using hashes here.

File details

Details for the file autonomize_autorag-0.1.90-py3-none-any.whl.

File metadata

  • Download URL: autonomize_autorag-0.1.90-py3-none-any.whl
  • Upload date:
  • Size: 88.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.12.13 Linux/6.17.0-1020-azure

File hashes

Hashes for autonomize_autorag-0.1.90-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce182d4721b857e114c103bb25c8a1e926415f290d5e2de67668b305e5cb3f8
MD5 874eb63aee34f01958daee6726c12e75
BLAKE2b-256 c1828dab58717ebb978d8a7e9c67e1a5d67c9cc7211856323369cf8120f1eec7

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