1

Install the Atla Python Library

Start by installing the Atla Python library. From the terminal, run the following:

pip install atla
2

Set up your API key

To use Atla, you need to provide your Atla API key. You can set it as an environment variable, pass it to the api_key field, or define it in a local .env file.

If you haven’t set up your account yet, you can do so on the sign up page and retrieve your API key from your dashboard.

export ATLA_API_KEY=pk-...
3

Send your first eval

The final step is to send your first evaluation request to Atla. Create a new Python file (e.g. atla_test.py) and add the following code:

from atla import Atla

client = Atla()

evaluation = client.evaluation.create(
  model_id="atla-selene",
  model_input="If 5 machines take 5 minutes to make 5 widgets, how long would it take 100 machines to make 100 widgets?",
  model_output="Total processing time is 5 widgets * 5 minutes = 25 minutes. Then 25 mins / 100 machines = 15 seconds.",
  metric_name="atla_default_logical_coherence",
).result.evaluation

print(f"Atla's score: {evaluation.score} out of 5")
print(f"Atla's critique: {evaluation.critique}")

To run the code, enter python atla_test.py into the terminal.

Atla will return an evaluation consisting of a score rating the model output’s logical coherence on a scale of 1-5 and a critique explaining the underlying reasoning.

Next steps

Now that you have performed your first evaluations, explore what else is possible with Atla:

  • For a deeper dive into available features, see our usage guide.
  • For an overview of available metrics and how to create your own, see our metrics docs.
  • For guidance on getting the most out of your evaluations, see our best practices guide.
  • For examples of integrating Atla into common applications, see our example use cases.
  • For detailed API specifications, see our API reference.