Description
API ReferenceEvaluations

Create Evaluation Results Batch

The Batch Create Evaluation Results endpoint lets you import external evaluations into the Patronus platform. The order of input evaluations is preserved in the output.

POST
/v1/evaluation-results/batch
/v1/evaluation-results/batch

The Authorization access token

Authorization

X-API-KEY<token>

In: header

Request Body

application/jsonRequired

evaluation_results
Required
Evaluation Results

curl -X POST "https://api.patronus.ai/v1/evaluation-results/batch" \
  -H "X-API-KEY: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "evaluation_results": [
      {
        "app": "string",
        "experiment_id": "string",
        "evaluator_id": "string",
        "profile_name": "string",
        "criteria": "string",
        "evaluated_model_system_prompt": "string",
        "evaluated_model_retrieved_context": [
          "string"
        ],
        "evaluated_model_input": "string",
        "evaluated_model_output": "string",
        "evaluated_model_gold_answer": "string",
        "evaluated_model_attachments": [
          {
            "url": "string",
            "media_type": "string",
            "usage_type": "string"
          }
        ],
        "pass": true,
        "score_raw": 0,
        "text_output": "string",
        "explanation": "string",
        "evaluation_duration": "string",
        "explanation_duration": "string",
        "evaluation_metadata": {},
        "evaluated_model_name": "string",
        "evaluated_model_provider": "string",
        "evaluated_model_params": {
          "property1": 0,
          "property2": 0
        },
        "evaluated_model_selected_model": "string",
        "dataset_id": "string",
        "dataset_sample_id": 0,
        "tags": {}
      }
    ]
  }'

Successful Response

{
  "evaluation_results": [
    {
      "id": "string",
      "app": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "evaluator_id": "string"
    }
  ]
}