Skip to main content

ExperimentContext

Dataset-run attribution attached when a scripted evaluation turn is sent. Supported on SendMessageRequest and SendMessageSyncRequest; ordinary conversation traffic leaves it unset.

Usage profiles​

UsageFields and validation
In requestsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
datasetIdstringRequired in requestsIdentifier of the dataset to which this run belongs. Required whenever experiment context is supplied. Minimum length: 1.
runNamestringRequired in requestsNames the run. Repeating a run_name for the same dataset appends to that run rather than starting a new one, because the derived experiment id is deterministic — the same property that lets a retried turn land in the run it belongs to. Minimum length: 1.
datasetItemIdstringOptionalWhich dataset item this turn exercises. Optional: a run can be scored on its traces alone, and a harness that does not model items per-turn can leave it empty.
descriptionstringOptionalFree-text description displayed with the dataset run.
metadataJsonstringOptionalAdditional run metadata serialized as a JSON object string and carried through unchanged.
profileRevisionHashstringOptionalProfile revision fingerprint attached to the dataset run for comparison and attribution.

Request validation​

These rules apply when this value is supplied in a request. Request validation does not guarantee that response fields are present or satisfy the same rules.

Applies toRuleRequirement
datasetIdMinimum length1
runNameMinimum length1

Where used​

ReferenceRelationship
Send a message to a conversationPOST /api/v1/llm/send-message
Send a message and wait for the resultPOST /api/v1/llm/send-message-sync

Download the public reference contract.

Document: DOC-API-MODEL-experiment-context.