Skip to main content

Record a score

POST 

/api/v1/evals/record-score

Records a tenant-side reviewer/operator score.

Resolving the rated turn​

Turn addressing is trace-only. A bare conversation ID is qualified with trusted tenant context. Messages without the required historical addressing metadata can be rejected; use an independently verified trace ID in that case.

The API assigns human-source classification and derives rater context from trusted credentials, not the body. A machine key does not identify a human reviewer. A deterministic per-rater/target/name score ID supports replacing a rating, but the current delete operation does not enforce author ownership.

Supported ratings​

Use a trace target with numeric or boolean values. The current API maps the resolved target into traceId; categorical/text values and observation/session/dataset-run targets in the schema are not faithfully supported. Use the supported trace/value combinations shown here.

Examples​

{
"targetType": "EVAL_TARGET_TYPE_TRACE",
"targetId": "<verified-trace-id>",
"name": "helpfulness",
"dataType": "SCORE_DATA_TYPE_NUMERIC",
"numericValue": 4,
"configId": "<compatible-config-id>"
}

Re-rating and withdrawing​

A stable per-rater/target/name score ID does not alone guarantee one current record across dates. The current API omits the original creation timestamp needed for cross-day replacement. Verify read-back after retries or re-rating. Withdrawal must check creator and scope; delete-score currently lacks that creator check and must remain restricted to trusted operators.

Request​

Responses​

OK

Document ID: DOC-IS-evaluation-api-recordScore. Section identities and revisions.

SectionStable reference
OverviewDOC-IS-evaluation-api-recordScore#overview
RequestDOC-IS-evaluation-api-recordScore#request
ResponsesDOC-IS-evaluation-api-recordScore#responses
Resolving the rated turnDOC-IS-evaluation-api-recordScore#resolving-the-rated-turn
Supported ratingsDOC-IS-evaluation-api-recordScore#supported-ratings
ExamplesDOC-IS-evaluation-api-recordScore#examples
Re-rating and withdrawingDOC-IS-evaluation-api-recordScore#re-rating-and-withdrawing