genai-apps / aggrag

Other
11 stars 15 forks source link

🎛️ Aggrag

Built with

  1. Python 3.11.9
  2. Node.js 22.2.0

Aggrag allows you to configure LLM experiments, and take them from prototype to deployment wthin a single framework. With Aggrag library, you get a framework that allows:

Table of Contents

Local Setup

  1. import the repo from https://github.com/genai-apps/aggrag.git. checkout to 'develop' branch
  2. To start the UI: get into the 'react-server' directory, and run npm install and then npm run start
  3. Open a new terminal to run the python backend files(as we need to run python backend scripts and react scripts in different terminals)
  4. To start the server: get into the root aggrag directory and run: python -m library.app serve. Note, however:
    • You will need to create .env file in the root directory. Use the .env-sample file as a reference.
    • run pip install -r requirements.txt. It is recommended to create a new virtualenv in the root directory to avoid installing packages globally. Command to create a new virtual env: python3 -m venv venv

For deployment, however, you can use a command same or similar to: gunicorn --workers=4 --threads=4 -b 0.0.0.0:8000 --log-file=logs/app.log --log-level=info library.wsgi:app

Managing Dependencies

When adding a new package, please make sure to:

  1. Add the package to the requirements.in file.
  2. Run pip-compile requirements.in to automatically update the requirements.txt file with the new package and its sub-dependencies.
  3. Use pip install -r requirements.txt to install the updated dependencies.

NOTE: After adding a new package and running pip-compile, always run pip install -r requirements.txt to ensure that all dependencies are installed correctly and that there are no issues with the installation process.

Documentation

Detailed documentation is work in progress.

Installation

You will be able to install aggrag locally with Python 3.8 and higher, or use a playground environment hosted by us. The web version of aggrag will have a limited feature set. In a locally installed version you can load API keys automatically from environment variables, write Python code to evaluate LLM/RAG responses.

RAGstore

Aggrag library comes with a directory of RAGs that you can integrate into your application on the fly, or run experiments with them. More details coming soon.

Supported providers

Example use cases

Real-world case studies and sample use cases can be found in the '/examples' directory. We will continue to add more until a substantial number of use cases are covered.

You are also welcome to contribute by adding your own use cases to this directory:)


License

Aggrag is released under the MIT License.

Citations

Aggrag is our original concept, however, for implementation we have relied on the existing development of: arXiv pre-print