Skip to main content

Goals

In this documentation, you will:
  • Make an AIME 2024 evaluation environment.
  • Deploy the environment to OpenReward (optional).
  • Write an evaluation script.
  • Evaluate from a model of your choice on this evaluation.

Prerequisites

  • An OpenReward account
  • An OpenReward API key
  • An API key and SDK for your model provider of choice (e.g. OpenAI, Anthropic, Google, OpenRouter)

Setup

Environments in OpenReward are written using the OpenReward Python library. You can install this library using pip or uv:

Our evaluation: AIME 2024

The American Invitational Mathematics Examination (AIME) is a selective 15-question, 3-hour test given since 1983 to those who rank in the top 5% on the AMC 12 high school mathematics examination. Historically it has been used to evaluate the reasoning performance of language models. An example question and answer from the AIME 2024 examination:
Let x,yx,y and zz be positive real numbers that satisfy the following system of equations:
log2(xyz)=12\log_2\left({x \over yz}\right) = {1 \over 2}
log2(yxz)=13\log_2\left({y \over xz}\right) = {1 \over 3}
log2(zxy)=14\log_2\left({z \over xy}\right) = {1 \over 4}
Then the value of log2(x4y3z2)\left|\log_2(x^4y^3z^2)\right| is mn\tfrac{m}{n} where mm and nn are relatively prime positive integers. Find m+nm+n.
We’ll implement this as an evaluation using OpenReward.

Building the evaluation

Initialise a project using the OpenReward cli:
We’ll replace the server.py file with the following:
We’ll update the requirements.txt:
And update the Dockerfile:
Now create an environment on OpenReward, upload your code to GitHub and connect your repository. Alternatively, you can do your evaluations locally by running the server locally, i.e. python server.py.

Evaluating a model

Now let’s evaluate our model.
OpenAI
1

Set your API keys

Make sure you have an API key for OpenAI and OpenReward, and set the environment variables:
2

Write the code

Save the following to evaluate.py:
3

Run the code

Now, run the code to evaluate:
So the pass@1 is calculated a 5.00% for gpt-4o for these seeds.