import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const evaluation = await client.evaluations.retrieve('evaluation_id');
console.log(evaluation.id);
{
"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>",
"created_by_identity_type": "user",
"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>",
"created_by_identity_type": "user",
"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>",
"created_by_identity_type": "user",
"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>",
"form_schema": {},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user"
}
]
}
},
"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>",
"created_by_identity_type": "user",
"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>",
"created_by_identity_type": "user",
"archived_at": "2023-11-07T05:31:56Z"
}
Gets the details of a evaluation
This API can be used to get information about a single evaluation by ID. To use this API, pass in the id
that was returned from your Create Evaluation API call as a path parameter.
Review the response schema to see the fields that will be returned.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const evaluation = await client.evaluations.retrieve('evaluation_id');
console.log(evaluation.id);
{
"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>",
"created_by_identity_type": "user",
"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>",
"created_by_identity_type": "user",
"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>",
"created_by_identity_type": "user",
"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>",
"form_schema": {},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user"
}
]
}
},
"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>",
"created_by_identity_type": "user",
"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>",
"created_by_identity_type": "user",
"archived_at": "2023-11-07T05:31:56Z"
}
Show child attributes
Successful Response
The response is of type object
.