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
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
datasetId | string | Required in requests | Identifier of the dataset to which this run belongs. Required whenever experiment context is supplied. Minimum length: 1. |
runName | string | Required in requests | Names 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. |
datasetItemId | string | Optional | Which 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. |
description | string | Optional | Free-text description displayed with the dataset run. |
metadataJson | string | Optional | Additional run metadata serialized as a JSON object string and carried through unchanged. |
profileRevisionHash | string | Optional | Profile 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 to | Rule | Requirement |
|---|---|---|
datasetId | Minimum length | 1 |
runName | Minimum length | 1 |
Where used
| Reference | Relationship |
|---|---|
| Send a message to a conversation | POST /api/v1/llm/send-message |
| Send a message and wait for the result | POST /api/v1/llm/send-message-sync |
Download the public reference contract.
Document: DOC-API-MODEL-experiment-context.