Skip to content

Yaraa (Yet Another Rag Automation Attempt) is a library that tackles the boring aspects of managing Rag pipelines, so you don't have to.

License

Notifications You must be signed in to change notification settings

khalilbenkhaled/yaraa

Repository files navigation

YARAA (Yet Another Rag Automation Attempt) is a library that simplifies the development of RAG (Retrieval-Augmented Generation) pipelines. You can build your vector database in any way you prefer, and YARAA will assist you in testing, evaluating, and optimizing the best configurations.

tutorial (2)

Installation

To install the library, follow these steps:

  1. Clone the repository:

    git clone https://github.com/khalilbenkhaled/yaraa
  2. Navigate to the project directory:

    cd yaraa
  3. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  4. Install the library:

    pip install .

    Optional: To install specific optional libraries, use:

    pip install .[NAME_OF_LIBRARY1, NAME_OF_LIBRARY2]
    #example:
    pip install .[ollama,chromadb,streamlit,fastapi]

    Supported options include:

    • transformers
    • ollama
    • server (for the OpenAI library)
    • chromadb
    • streamlit
    • fastapi

    Choose the options you need and include them in the command above.

Usage

Quick Start (for Fast Testing or New Users)

  1. Configure Your Settings:

    • Locate the file named example1.yaml in the repository.
    • Edit this file to specify your hyperparameters, LLM, the query encoder, and the path to your vector database directory.

    Note: Currently, the library offers limited configuration options, but more features (like multiple vector stores and additional hyperparameter controls) will be added soon.

  2. Run the Inference:

    Execute the following command:

    python inference.py example1.yaml

    This command will launch a browser window with a chat interface for interacting with your RAG pipeline.

  3. File Information:

    • example1.yaml: Controls inference settings.
    • example2.yaml: Shows how to use the YAML file for evaluating your RAG pipeline.

    For inference, the library currently supports:

    • Streamlit
    • FastAPI

    For evaluation, the only supported metric is:

    • Answer relevance by RAGAS.

Advanced Usage (for Experienced Developers and Large Projects)

  • For detailed usage and full control, explore the examples folder in the repository. It provides various examples to help you understand how to utilize the library in different scenarios.

About

Yaraa (Yet Another Rag Automation Attempt) is a library that tackles the boring aspects of managing Rag pipelines, so you don't have to.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages