How to score an answer and its prompt with POST /api/evaluate
Send POST /api/evaluate with responseText and, if you have it, the prompt that produced it. The answer must be 10 to 100,000 characters. You get back verdict and receipt.
Last updated
Steps
Send the request
curl -s https://api.clearrun.net/api/evaluate \ -H "Authorization: Bearer $CLEARRUN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "When was the Eiffel Tower finished?", "responseText": "It was definitely finished in 1925, everyone agrees." }'Read the verdict
The same
verdictandreceiptas/api/score.
Request fields
| Field | Required | Notes |
|---|---|---|
responseText | Yes | 10 to 100,000 characters. content also works |
prompt | No | The question that produced the answer |
modelId | No | Which model wrote it, for your records |
sessionId | No | Your own grouping id |
workspaceId | No | Which workspace's receipt chain to use |
Errors
- 400
responseText is required (alias: content)(RESPONSE_TEXT_REQUIRED) - 400
Content is too short to score(CONTENT_TOO_SHORT) under 10 characters - 400
Content too long(CONTENT_TOO_LONG, withmaxLengthandactualLength) over 100,000 - 400
Request blocked(ACTION_NOT_ALLOWED) - 400
Content blocked(CONTENT_BLOCKED), the same on score, evaluate and chat. See Why am I getting 400 'Request blocked'? - 402, 403, 429 as on every scored route