Datasets
Add Rows to Dataset
You can add rows to an existing dataset using the Python SDK.
Import the required classes and initialize Athina API key.
Now you can add rows to an existing dataset.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
You can add rows to an existing dataset using the Python SDK.
import os
from athina_client.datasets import Dataset
from athina_client.keys import AthinaApiKey
AthinaApiKey.set_key(os.getenv('ATHINA_API_KEY'))
# Add rows to a dataset
try:
Dataset.add_rows(
dataset_id=DATASET_ID,
rows=[
{
'query': 'What is the capital of France?',
'context': ['France is a country in Western Europe.', 'Paris is the capital of France.'],
'response': 'Paris',
'expected_response': 'Paris'
},
]
)
except Exception as e:
print(f"Failed to add rows: {e}")