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

  1. 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."
      }'
  2. Read the verdict

    The same verdict and receipt as /api/score.

Request fields

Request fields
FieldRequiredNotes
responseTextYes10 to 100,000 characters. content also works
promptNoThe question that produced the answer
modelIdNoWhich model wrote it, for your records
sessionIdNoYour own grouping id
workspaceIdNoWhich 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, with maxLength and actualLength) 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