GET
/
v4
/
evaluations
/
{evaluation_id}
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const evaluation = await client.evaluations.retrieve('evaluation_id');

  console.log(evaluation.id);
}

main();
{
  "evaluation_datasets": [
    {
      "name": "<string>",
      "schema_type": "GENERATION",
      "knowledge_base_id": "<string>",
      "evaluation_dataset_metadata": {},
      "out_of_date": true,
      "vendor": "scale",
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "account_id": "<string>",
      "created_by_user_id": "<string>",
      "archived_at": "2023-11-07T05:31:56Z",
      "schema_sub_type": "summarization"
    }
  ],
  "evaluation_config_expanded": {
    "evaluation_type": "studio",
    "question_set_id": "<string>",
    "studio_project_id": "<string>",
    "auto_evaluation_model": "gpt-4-32k-0613",
    "auto_evaluation_parameters": {
      "temperature": 1,
      "batch_size": 13
    },
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "account_id": "<string>",
    "created_by_user_id": "<string>",
    "question_set": {
      "name": "<string>",
      "question_id_to_config": {},
      "instructions": "<string>",
      "id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "account_id": "<string>",
      "created_by_user_id": "<string>",
      "archived_at": "2023-11-07T05:31:56Z",
      "questions": [
        {
          "type": "categorical",
          "title": "<string>",
          "prompt": "<string>",
          "choices": [
            {
              "label": "<string>",
              "value": "<string>",
              "audit_required": false
            }
          ],
          "ratingOptions": {
            "minLabel": "<string>",
            "maxLabel": "<string>",
            "scaleSteps": 123
          },
          "numberOptions": {
            "min": 123,
            "max": 123
          },
          "freeTextOptions": {
            "characterLimit": {
              "min": 50,
              "max": 1000
            }
          },
          "multi": true,
          "dropdown": true,
          "required": true,
          "conditions": [
            {}
          ],
          "default": "<any>",
          "id": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "account_id": "<string>",
          "created_by_user_id": "<string>"
        }
      ]
    }
  },
  "async_jobs": [
    {
      "job_type": "<string>",
      "parent_job_id": "<string>",
      "status": "<string>",
      "progress": {},
      "job_metadata": {},
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "id": "<string>"
    }
  ],
  "application_spec": {
    "name": "<string>",
    "description": "<string>",
    "theme_id": "<string>",
    "run_online_evaluation": true,
    "parent_application_spec_id": "<string>",
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "account_id": "<string>",
    "created_by_user_id": "<string>",
    "archived_at": "2023-11-07T05:31:56Z"
  },
  "name": "<string>",
  "description": "<string>",
  "status": "PENDING",
  "application_spec_id": "<string>",
  "application_variant_id": "<string>",
  "tags": {},
  "evaluation_config": {},
  "evaluation_config_id": "<string>",
  "completed_at": "2023-11-07T05:31:56Z",
  "total_test_case_result_count": 123,
  "completed_test_case_result_count": 123,
  "annotation_config": {
    "annotation_config_type": "generation",
    "components": [
      [
        {
          "optional": true,
          "data_loc": [
            "<string>"
          ],
          "label": "<string>"
        }
      ]
    ],
    "direction": "col",
    "llm_prompt": {
      "variables": [
        {
          "name": "<string>",
          "optional": true,
          "data_loc": [
            "<string>"
          ]
        }
      ],
      "template": "<string>"
    }
  },
  "question_id_to_annotation_config": {},
  "metric_config": {
    "components": [
      {
        "type": "rouge",
        "name": "<string>",
        "mappings": {},
        "params": {}
      }
    ]
  },
  "id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "account_id": "<string>",
  "created_by_user_id": "<string>",
  "archived_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Path Parameters

evaluation_id
string
required

Query Parameters

view
enum<string>[]
Available options:
ApplicationSpec,
AsyncJobs,
EvaluationConfig,
EvaluationDatasets

Response

200
application/json
Successful Response
name
string
required
description
string
required
status
enum<string>
required
Available options:
PENDING,
COMPLETED,
FAILED
application_spec_id
string
required
total_test_case_result_count
integer
required

The total number of test case results for the evaluation

completed_test_case_result_count
integer
required

The number of test case results that have been completed for the evaluation

id
string
required

The unique identifier of the entity.

created_at
string
required

The date and time when the entity was created in ISO format.

account_id
string
required

The ID of the account that owns the given entity.

created_by_user_id
string
required

The user who originally created the entity.

evaluation_datasets
object[]
evaluation_config_expanded
object
async_jobs
object[]
application_spec
object
application_variant_id
string
tags
object
evaluation_config
object
evaluation_config_id
string

The ID of the associated evaluation config.

completed_at
string

The date and time that all test case results for the evaluation were completed for the evaluation in ISO format.

annotation_config
object

Annotation configuration for tasking

question_id_to_annotation_config
object

Specifies the annotation configuration to use for specific questions.

metric_config
object

Specifies the config for the metrics to be computed.

archived_at
string

The date and time when the entity was archived in ISO format.