# AutoRAG

*Powering seamless retrieval and generation workflows for our internal AI systems*

![Python Version](https://img.shields.io/badge/Python-3.12+-blue?style=for-the-badge&logo=python)
![Code Formatter](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)
![Code Linter](https://img.shields.io/badge/linting-pylint-green.svg?style=for-the-badge)
![Code Checker](https://img.shields.io/badge/mypy-checked-blue?style=for-the-badge)
![Code Coverage](https://img.shields.io/badge/coverage-100%25-a4a523?style=for-the-badge&logo=codecov)

## 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](https://docs.anaconda.com/miniconda/) for environment management:
    ```bash
    conda create -n autorag python=3.12
    conda activate autorag
    ```
2. Install the package:
    ```bash
    pip install autonomize-autorag
    ```

## Usage

The full set of API can be found in [api.md](api.md)

```python
import os
from autorag.language_models import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),
)

generation = client.generate(
    message="What is GPT?"
    model="gpt-4o"
)
```

## Contribution

To contribute in our AutoRAG SDK, please refer to our [Contribution Guidelines](CONTRIBUTING.md).

## License
Copyright (C) Autonomize AI - All Rights Reserved

This file is part of this project.

This project can not be copied and/or distributed without the express
permission of Autonomize AI.
