Use this file to discover all available pages before exploring further.
Upload datasets to HoneyHive through the web UI or programmatically via the SDK.If your dataset is managed outside HoneyHive (S3, Google Sheets, internal tools) and you want to keep it synced over time, see Sync datasets from external sources.
[ {"user_query": "What's the history of AI?", "response": "The history of AI is a long one."}, {"user_query": "What is AI?", "response": "AI is the simulation of human intelligence in machines."}]
import osfrom honeyhive import HoneyHivefrom honeyhive.models import ( CreateDatasetRequest, AddDatapointsToDatasetRequest, DatapointMapping,)client = HoneyHive(api_key=os.environ["HH_API_KEY"])# Step 1: Create an empty datasetdataset = client.datasets.create(CreateDatasetRequest( name="My Q&A Dataset", description="Questions and answers for evaluation",))dataset_id = dataset.result.insertedId# Step 2: Add datapoints with field mappingresponse = client.datasets.add_datapoints( dataset_id, AddDatapointsToDatasetRequest( data=[ {"question": "How do I make tables?", "answer": "Use the Table component"}, {"question": "How do I make modals?", "answer": "Use the Modal component"}, {"question": "How do I make forms?", "answer": "Use the Form component"}, ], mapping=DatapointMapping( inputs=["question"], ground_truth=["answer"], ) ))print(f"Created dataset {dataset_id} with {len(response.datapoint_ids)} datapoints")