Catalog PyPI
PACKAGE EXPLORERView in registry

ai01-eval

PyPI

Benchmark your AI agent / RAG pipeline on the AI01 leaderboard.

aibenchmarkevalleaderboardllmrag
Versions collected1
Direct dependencies3From release 0.2.1
Last observed21 Oct, 09:44 UTC

README

Version 0.2.1 documentation

ai01-eval

Benchmark your AI agent or RAG pipeline against the AI01 leaderboard.

Install

pip install ai01-eval

Quick start

from ai01_eval import AI01Eval

client = AI01Eval(api_key="your-api-key")

# 1. Browse datasets
datasets = client.datasets.list()

# 2. Download a dataset
dataset = client.datasets.get("general-single-topic-v1")

# 3. Run your pipeline (ground-truth references are looked up server-side)
results = []
for item in dataset:
    answer = your_agent.run(item["query"], item.get("context"))
    results.append({
        "id":     item["id"],
        "query":  item["query"],
        "answer": answer,
    })

# 4. Submit — metrics are computed server-side
run = client.submit(
    dataset="general-single-topic-v1",
    results=results,
    agent_name="My RAG Agent v1",
)
print(run.scores)
# {'exact_match': 0.71, 'f1': 0.84, 'faithfulness': 0.79}
print(run.report_url)
# https://ai01.dev/benchmark?run=a3f2b1c9

Configuration

API key

Log in at ai01.dev to get your API key, then pass it explicitly or set the AI01_API_KEY environment variable:

# Explicit
client = AI01Eval(api_key="your-api-key")

# Via environment variable
# export AI01_API_KEY=your-api-key
client = AI01Eval()

API Reference

AI01Eval

Main entry point for the package.

client = AI01Eval(api_key="...", base_url="https://api.ai01.dev")
ParameterTypeDefaultDescription
api_keystrenv AI01_API_KEYYour AI01 API key. Get one at ai01.dev.

The client exposes three sub-clients:

AttributeTypeDescription
client.datasetsDatasetClientList and download datasets.
client.runsRunsClientRetrieve past submission reports.
client.submit(...)methodShortcut to submit results (see below).

client.datasets

client.datasets.list()

Returns metadata for all available datasets.

datasets = client.datasets.list()
# [
#   {"id": "general-single-topic-v1", "name": "...", "num_queries": 120, "metrics": [...]},
#   ...
# ]

Returns: list[dict]


client.datasets.get(dataset_id)

Downloads a dataset by ID and returns a Dataset object you can iterate over.

dataset = client.datasets.get("general-single-topic-v1")
print(dataset.id)          # "general-single-topic-v1"
print(dataset.name)        # human-readable name
print(dataset.num_queries) # total number of items
print(dataset.metrics)     # ["exact_match", "f1", "faithfulness"]
print(len(dataset))        # number of items downloaded

for item in dataset:
    print(item["id"])       # unique item identifier
    print(item["query"])    # the question to answer
    print(item["context"])  # grounding document (RAG datasets only)

Note: Ground-truth references are not included in downloaded items — they are looked up server-side when you submit results.

Returns: Dataset


Dataset

An iterable container for dataset items.

Property / MethodTypeDescription
.idstrDataset ID.
.namestrHuman-readable dataset name.
.num_queriesintTotal number of queries in the dataset.
.metricslist[str]Metrics this dataset is evaluated on.
len(dataset)intNumber of items downloaded.
for item in datasetdictIterate over items. Each item has id, query, and optionally context.

client.submit(...)

Submits your results to the AI01 server. Metrics are computed server-side.

run = client.submit(
    dataset="general-single-topic-v1",
    results=results,
    agent_name="My RAG Agent v1",
    submitter="your-username",       # optional, defaults to "anonymous"
    experiment_name="RAG baseline",  # optional
    description="First run",         # optional
    duration_seconds=t["duration_seconds"],  # optional
)

Parameters:

ParameterTypeDefaultDescription
datasetstrrequiredDataset ID you ran against.
resultslist[dict]requiredList of result dicts (see format below).
agent_namestrrequiredDisplay name shown on the leaderboard.
submitterstr"anonymous"Your username or team name.
experiment_namestrNoneLabel for this experiment run.
descriptionstrNoneFree-text notes about this run.
duration_secondsfloatNonePipeline wall-clock time.

Each dict in results must contain:

KeyTypeDescription
idstrItem ID from the dataset.
querystrThe original query string.
answerstrYour agent's answer.

Returns: RunReport


RunReport

Returned by client.submit(...) and client.runs.get(run_id).

PropertyTypeDescription
.idstrUnique run ID.
.scoresdict[str, float]Metric scores, e.g. {"f1": 0.84, "exact_match": 0.71}.
.report_urlstrURL to the full report on the AI01 leaderboard.
.duration_secondsfloat | NonePipeline duration if provided at submit time.
.submitted_atstrISO-8601 timestamp of the submission.
print(run.id)          # "a3f2b1c9"
print(run.scores)      # {'exact_match': 0.71, 'f1': 0.84}
print(run.report_url)  # "https://ai01.dev/benchmark?run=a3f2b1c9"

client.runs

client.runs.get(run_id)

Retrieves a past submission report by run ID.

run = client.runs.get("a3f2b1c9")
print(run.scores)

Returns: RunReport


Error handling

All errors raised by this library inherit from AI01Error:

from ai01_eval import AI01Error, AI01AuthError, AI01NotFoundError, AI01RateLimitError

try:
    dataset = client.datasets.get("unknown-dataset")
except AI01AuthError:
    print("Check your API key.")
except AI01NotFoundError:
    print("Dataset not found.")
except AI01RateLimitError:
    print("Slow down — rate limit hit.")
except AI01Error as exc:
    print(f"Unexpected error: {exc}")
ExceptionHTTP statusCause
AI01AuthError401Invalid or missing API key
AI01NotFoundError404Dataset or run ID not found
AI01RateLimitError429Too many requests
AI01ServerError5xx / other 4xxUnexpected server error

Available datasets

IDDescriptionQueriesMetrics
general-single-topic-v1RAG QA over a single shared corpus120exact_match, F1, faithfulness
general-knowledge-v1Factual QA, no context10exact_match, F1, BLEU

Metrics

All metrics are computed server-side to ensure fairness:

MetricDescription
exact_matchNormalised string equality (lowercased, punctuation stripped).
f1Token-level F1 overlap between answer and reference.
bleuUnigram BLEU with brevity penalty.
faithfulnessWhether the answer is grounded in the provided context (LLM judge).

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.2.125 Mar 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
cobuildx/ai01-eval

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:44 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f60602975aa2aa8b7464fc78e39108dbfc96d6c217ceadb52207159d90641ad7