curl --request POST \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases \
--header 'Content-Type: application/json' \
--data '
{
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"chat_history": {},
"test_case_metadata": {},
"account_id": "<string>"
}
'import requests
url = "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases"
payload = {
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": ["<string>"],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"chat_history": {},
"test_case_metadata": {},
"account_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
test_case_data: {
input: '<string>',
artifact_ids_filter: ['<string>'],
expected_output: '<string>',
expected_extra_info: {chunks: [{text: '<string>', metadata: {}}], schema_type: 'CHUNKS'}
},
chat_history: {},
test_case_metadata: {},
account_id: '<string>'
})
};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'test_case_data' => [
'input' => '<string>',
'artifact_ids_filter' => [
'<string>'
],
'expected_output' => '<string>',
'expected_extra_info' => [
'chunks' => [
[
'text' => '<string>',
'metadata' => [
]
]
],
'schema_type' => 'CHUNKS'
]
],
'chat_history' => [
],
'test_case_metadata' => [
],
'account_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases"
payload := strings.NewReader("{\n \"test_case_data\": {\n \"input\": \"<string>\",\n \"artifact_ids_filter\": [\n \"<string>\"\n ],\n \"expected_output\": \"<string>\",\n \"expected_extra_info\": {\n \"chunks\": [\n {\n \"text\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"schema_type\": \"CHUNKS\"\n }\n },\n \"chat_history\": {},\n \"test_case_metadata\": {},\n \"account_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases")
.header("Content-Type", "application/json")
.body("{\n \"test_case_data\": {\n \"input\": \"<string>\",\n \"artifact_ids_filter\": [\n \"<string>\"\n ],\n \"expected_output\": \"<string>\",\n \"expected_extra_info\": {\n \"chunks\": [\n {\n \"text\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"schema_type\": \"CHUNKS\"\n }\n },\n \"chat_history\": {},\n \"test_case_metadata\": {},\n \"account_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"test_case_data\": {\n \"input\": \"<string>\",\n \"artifact_ids_filter\": [\n \"<string>\"\n ],\n \"expected_output\": \"<string>\",\n \"expected_extra_info\": {\n \"chunks\": [\n {\n \"text\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"schema_type\": \"CHUNKS\"\n }\n },\n \"chat_history\": {},\n \"test_case_metadata\": {},\n \"account_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"evaluation_dataset_id": "<string>",
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"autogenerated": true,
"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",
"schema_type": "GENERATION",
"chat_history": {},
"test_case_metadata": {},
"invalidated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Create Test Case
Description
Create a test case for a selected dataset.
curl --request POST \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases \
--header 'Content-Type: application/json' \
--data '
{
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"chat_history": {},
"test_case_metadata": {},
"account_id": "<string>"
}
'import requests
url = "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases"
payload = {
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": ["<string>"],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"chat_history": {},
"test_case_metadata": {},
"account_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
test_case_data: {
input: '<string>',
artifact_ids_filter: ['<string>'],
expected_output: '<string>',
expected_extra_info: {chunks: [{text: '<string>', metadata: {}}], schema_type: 'CHUNKS'}
},
chat_history: {},
test_case_metadata: {},
account_id: '<string>'
})
};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'test_case_data' => [
'input' => '<string>',
'artifact_ids_filter' => [
'<string>'
],
'expected_output' => '<string>',
'expected_extra_info' => [
'chunks' => [
[
'text' => '<string>',
'metadata' => [
]
]
],
'schema_type' => 'CHUNKS'
]
],
'chat_history' => [
],
'test_case_metadata' => [
],
'account_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases"
payload := strings.NewReader("{\n \"test_case_data\": {\n \"input\": \"<string>\",\n \"artifact_ids_filter\": [\n \"<string>\"\n ],\n \"expected_output\": \"<string>\",\n \"expected_extra_info\": {\n \"chunks\": [\n {\n \"text\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"schema_type\": \"CHUNKS\"\n }\n },\n \"chat_history\": {},\n \"test_case_metadata\": {},\n \"account_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases")
.header("Content-Type", "application/json")
.body("{\n \"test_case_data\": {\n \"input\": \"<string>\",\n \"artifact_ids_filter\": [\n \"<string>\"\n ],\n \"expected_output\": \"<string>\",\n \"expected_extra_info\": {\n \"chunks\": [\n {\n \"text\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"schema_type\": \"CHUNKS\"\n }\n },\n \"chat_history\": {},\n \"test_case_metadata\": {},\n \"account_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/test-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"test_case_data\": {\n \"input\": \"<string>\",\n \"artifact_ids_filter\": [\n \"<string>\"\n ],\n \"expected_output\": \"<string>\",\n \"expected_extra_info\": {\n \"chunks\": [\n {\n \"text\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"schema_type\": \"CHUNKS\"\n }\n },\n \"chat_history\": {},\n \"test_case_metadata\": {},\n \"account_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"evaluation_dataset_id": "<string>",
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"autogenerated": true,
"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",
"schema_type": "GENERATION",
"chat_history": {},
"test_case_metadata": {},
"invalidated_at": "2023-11-07T05:31:56Z",
"archived_at": "2023-11-07T05:31:56Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Body
The data for the test case in a format matching the provided schema_type
- ArtifactSchemaGeneration
- SchemaGenerationBase
- SchemaFlexible
Show child attributes
Show child attributes
Used for tracking previous chat interactions for multi-chat test cases
Metadata for the test case
The ID of the account that owns the given entity.
Response
Successful Response
- GenerationTestCaseVersionResponse
- FlexibleTestCaseVersionResponse
The ID of the associated evaluation dataset.
- ArtifactSchemaGeneration
- SchemaGenerationBase
Show child attributes
Show child attributes
Boolean to track whether or not the test case is autogenerated
The unique identifier of the entity.
The date and time when the entity was created in ISO format.
The date and time when the entity was last updated in ISO format.
The ID of the account that owns the given entity.
The user who originally created the entity.
The type of identity that created the entity.
user, service_account "GENERATION"Used for tracking previous chat interactions for multi-chat test cases
Metadata for the test case
The date and time when the entity was overwritten or deleted in ISO format.
The date and time when the entity was archived in ISO format.

