For the complete documentation index, see llms.txt. This page is also available as Markdown.

POST /v2/evals/evaluator-previews

Preview Evaluator

post

Judge up to three samples without saving the evaluator or score rows.

How to use

Test 1–3 samples without saving an evaluator or score rows. Use this to check rubric/config behavior before production use. A preview may still consume judge resources; it is not a persistence operation.

Authentication and permissions

Required permissions: evals.run. Resource and owner access checks also apply.

Prepare request.json

Save the example body below as request.json for the curl sample. Replace example IDs, node keys, and dynamic configuration with values for your organization; these are illustrative, not pre-existing resources.

{
  "project_id": "YOUR_PROJECT_ID",
  "evaluator_type": "builtin_rule",
  "config": {
    "rule": "exact_match",
    "target_output_node_id": "out-0"
  },
  "samples": [
    {
      "generated_output": {
        "out-0": "billing"
      },
      "expected_output": {
        "out-0": "billing"
      }
    }
  ]
}
Authorizations
AuthorizationstringRequired

Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.

Body
project_idstring · min: 1Required
evaluator_typestring · enumRequired

How an evaluator scores: LLM judge or built-in rule.

Possible values:
judge_providerstring · enum · nullableOptional

LLM provider identifiers.

Possible values:
judge_model_idstring · nullableOptional
Responses
200

Successful Response

application/json
response_codestring · nullableOptional

Machine-readable response code, when provided.

post/v2/evals/evaluator-previews
curl
curl --fail-with-body -sS \
  "$STACKAI_BASE_URL/v2/evals/evaluator-previews" \
  -H "Authorization: Bearer $STACKAI_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json
{
  "response_code": "text",
  "meta": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "data": [
    {
      "score_kind": "numeric",
      "score": 1,
      "choice_label": "text",
      "feedback": "text",
      "status": "pending",
      "error": "text"
    }
  ]
}

Last updated

Was this helpful?