Running Evals in CI/CD
Athina in CI/CD Pipelines
You can use Athina evals in your CI/CD pipeline to catch regressions before they get to production. Following is a guide for setting athina-evals in your CI/CD pipeline.
All codes described here are present in our GitHub repository as well.
GitHub Actions
We’re going to use GitHub Actions to create our CI/CD pipelines. GitHub Actions allow us to define workflows that are triggered by events (pull request, push, etc.) and execute a series of actions. Our GitHub Actions are defined under our repository’s .github/workflows
directory.
We have defined a workflow for the evals too. The workflow file is named athina_ci.yml
. The workflow is triggered on every push to the main
branch.
Athina Evals Script
The run_athina_evals.py
script is the entry point for our Athina Evals. It is a simple script that uses the Athina Evals SDK to evaluate and validate the Rag Application.
For example we are testing if the response from the Rag Application answers the query using the DoesResponseAnswerQuery
evaluation from athina.
You can also load a golden dataset and run the evaluation on it.
You can also run a suite of evaluations on the dataset.
Secrets
We are using GitHub Secrets to store our API keys. We have two secrets, OPENAI_API_KEY
and ATHINA_API_KEY
. You can add these secrets to your repository by navigating to Settings
> Secrets
> New repository secret
.
Further reading
We have more examples and details in our GitHub repository