Here’s a quickstart guide for running evals using the Python SDK:1. Install the athina package
Copy
Ask AI
pip install athina
2. Set your API keysIf you are using the python SDK, then can set the API keys like this:
Copy
Ask AI
from athina.keys import AthinaApiKey, OpenAiApiKeyOpenAiApiKey.set_key(os.getenv('OPENAI_API_KEY'))AthinaApiKey.set_key(os.getenv('ATHINA_API_KEY'))
If you are using the CLI, then run athina init, and enter the API keys when prompted.3. Load your dataset like this:You can also load data using a Python Dictionary
Copy
Ask AI
from athina.loaders import RagLoaderdataset = RagLoader().load_json(json_filepath)
4. Now you can run evals like this.
Copy
Ask AI
from athina.evals import DoesResponseAnswerQueryDoesResponseAnswerQuery().run_batch(data=dataset)