experiments
Create experiments experiments
Requires scopes: eval:write
POST
/
api
/
experiments
Create experiments experiments
curl --request POST \
--url https://evalgate.com/api/experiments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluationId": 123,
"name": "<string>",
"idempotencyKey": "<string>",
"baselineVariantKey": "<string>",
"variants": [
{
"name": "<string>",
"key": "<string>",
"provider": "<string>",
"promptVersionId": "<string>",
"routingProfileId": "<string>",
"model": "<string>",
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"parameters": {},
"tools": {},
"systemPrompt": "<string>",
"policies": {},
"expectedPromptContentHash": "<string>",
"routingStrategy": {},
"scorerConfigIds": [
123
],
"calibrationMappingIds": [
"<string>"
]
}
],
"description": "<string>",
"environment": "dev",
"datasetVersionId": "<string>",
"seed": 123,
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": false,
"allowRegressions": false
},
"expectedDatasetContentHash": "<string>",
"runnerVersion": "<string>",
"codeVersion": "<string>",
"policies": {}
}
'import requests
url = "https://evalgate.com/api/experiments"
payload = {
"evaluationId": 123,
"name": "<string>",
"idempotencyKey": "<string>",
"baselineVariantKey": "<string>",
"variants": [
{
"name": "<string>",
"key": "<string>",
"provider": "<string>",
"promptVersionId": "<string>",
"routingProfileId": "<string>",
"model": "<string>",
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"parameters": {},
"tools": {},
"systemPrompt": "<string>",
"policies": {},
"expectedPromptContentHash": "<string>",
"routingStrategy": {},
"scorerConfigIds": [123],
"calibrationMappingIds": ["<string>"]
}
],
"description": "<string>",
"environment": "dev",
"datasetVersionId": "<string>",
"seed": 123,
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": False,
"allowRegressions": False
},
"expectedDatasetContentHash": "<string>",
"runnerVersion": "<string>",
"codeVersion": "<string>",
"policies": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evaluationId: 123,
name: '<string>',
idempotencyKey: '<string>',
baselineVariantKey: '<string>',
variants: [
{
name: '<string>',
key: '<string>',
provider: '<string>',
promptVersionId: '<string>',
routingProfileId: '<string>',
model: '<string>',
messages: [{id: '<string>', role: 'user', content: '<string>', name: '<string>'}],
parameters: {},
tools: {},
systemPrompt: '<string>',
policies: {},
expectedPromptContentHash: '<string>',
routingStrategy: {},
scorerConfigIds: [123],
calibrationMappingIds: ['<string>']
}
],
description: '<string>',
environment: 'dev',
datasetVersionId: '<string>',
seed: 123,
winnerPolicy: {
minimumPassRateDelta: 123,
maximumCostIncreasePercent: 123,
maximumP95LatencyIncreasePercent: 123,
allowIncomparableJudges: false,
allowRegressions: false
},
expectedDatasetContentHash: '<string>',
runnerVersion: '<string>',
codeVersion: '<string>',
policies: {}
})
};
fetch('https://evalgate.com/api/experiments', 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://evalgate.com/api/experiments",
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([
'evaluationId' => 123,
'name' => '<string>',
'idempotencyKey' => '<string>',
'baselineVariantKey' => '<string>',
'variants' => [
[
'name' => '<string>',
'key' => '<string>',
'provider' => '<string>',
'promptVersionId' => '<string>',
'routingProfileId' => '<string>',
'model' => '<string>',
'messages' => [
[
'id' => '<string>',
'role' => 'user',
'content' => '<string>',
'name' => '<string>'
]
],
'parameters' => [
],
'tools' => [
],
'systemPrompt' => '<string>',
'policies' => [
],
'expectedPromptContentHash' => '<string>',
'routingStrategy' => [
],
'scorerConfigIds' => [
123
],
'calibrationMappingIds' => [
'<string>'
]
]
],
'description' => '<string>',
'environment' => 'dev',
'datasetVersionId' => '<string>',
'seed' => 123,
'winnerPolicy' => [
'minimumPassRateDelta' => 123,
'maximumCostIncreasePercent' => 123,
'maximumP95LatencyIncreasePercent' => 123,
'allowIncomparableJudges' => false,
'allowRegressions' => false
],
'expectedDatasetContentHash' => '<string>',
'runnerVersion' => '<string>',
'codeVersion' => '<string>',
'policies' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://evalgate.com/api/experiments"
payload := strings.NewReader("{\n \"evaluationId\": 123,\n \"name\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"baselineVariantKey\": \"<string>\",\n \"variants\": [\n {\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"provider\": \"<string>\",\n \"promptVersionId\": \"<string>\",\n \"routingProfileId\": \"<string>\",\n \"model\": \"<string>\",\n \"messages\": [\n {\n \"id\": \"<string>\",\n \"role\": \"user\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"parameters\": {},\n \"tools\": {},\n \"systemPrompt\": \"<string>\",\n \"policies\": {},\n \"expectedPromptContentHash\": \"<string>\",\n \"routingStrategy\": {},\n \"scorerConfigIds\": [\n 123\n ],\n \"calibrationMappingIds\": [\n \"<string>\"\n ]\n }\n ],\n \"description\": \"<string>\",\n \"environment\": \"dev\",\n \"datasetVersionId\": \"<string>\",\n \"seed\": 123,\n \"winnerPolicy\": {\n \"minimumPassRateDelta\": 123,\n \"maximumCostIncreasePercent\": 123,\n \"maximumP95LatencyIncreasePercent\": 123,\n \"allowIncomparableJudges\": false,\n \"allowRegressions\": false\n },\n \"expectedDatasetContentHash\": \"<string>\",\n \"runnerVersion\": \"<string>\",\n \"codeVersion\": \"<string>\",\n \"policies\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://evalgate.com/api/experiments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"evaluationId\": 123,\n \"name\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"baselineVariantKey\": \"<string>\",\n \"variants\": [\n {\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"provider\": \"<string>\",\n \"promptVersionId\": \"<string>\",\n \"routingProfileId\": \"<string>\",\n \"model\": \"<string>\",\n \"messages\": [\n {\n \"id\": \"<string>\",\n \"role\": \"user\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"parameters\": {},\n \"tools\": {},\n \"systemPrompt\": \"<string>\",\n \"policies\": {},\n \"expectedPromptContentHash\": \"<string>\",\n \"routingStrategy\": {},\n \"scorerConfigIds\": [\n 123\n ],\n \"calibrationMappingIds\": [\n \"<string>\"\n ]\n }\n ],\n \"description\": \"<string>\",\n \"environment\": \"dev\",\n \"datasetVersionId\": \"<string>\",\n \"seed\": 123,\n \"winnerPolicy\": {\n \"minimumPassRateDelta\": 123,\n \"maximumCostIncreasePercent\": 123,\n \"maximumP95LatencyIncreasePercent\": 123,\n \"allowIncomparableJudges\": false,\n \"allowRegressions\": false\n },\n \"expectedDatasetContentHash\": \"<string>\",\n \"runnerVersion\": \"<string>\",\n \"codeVersion\": \"<string>\",\n \"policies\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/experiments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"evaluationId\": 123,\n \"name\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"baselineVariantKey\": \"<string>\",\n \"variants\": [\n {\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"provider\": \"<string>\",\n \"promptVersionId\": \"<string>\",\n \"routingProfileId\": \"<string>\",\n \"model\": \"<string>\",\n \"messages\": [\n {\n \"id\": \"<string>\",\n \"role\": \"user\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"parameters\": {},\n \"tools\": {},\n \"systemPrompt\": \"<string>\",\n \"policies\": {},\n \"expectedPromptContentHash\": \"<string>\",\n \"routingStrategy\": {},\n \"scorerConfigIds\": [\n 123\n ],\n \"calibrationMappingIds\": [\n \"<string>\"\n ]\n }\n ],\n \"description\": \"<string>\",\n \"environment\": \"dev\",\n \"datasetVersionId\": \"<string>\",\n \"seed\": 123,\n \"winnerPolicy\": {\n \"minimumPassRateDelta\": 123,\n \"maximumCostIncreasePercent\": 123,\n \"maximumP95LatencyIncreasePercent\": 123,\n \"allowIncomparableJudges\": false,\n \"allowRegressions\": false\n },\n \"expectedDatasetContentHash\": \"<string>\",\n \"runnerVersion\": \"<string>\",\n \"codeVersion\": \"<string>\",\n \"policies\": {}\n}"
response = http.request(request)
puts response.read_body{
"idempotentReplay": true,
"id": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluationId": 123,
"name": "<string>",
"description": "<string>",
"status": "<string>",
"baselineVariantKey": "<string>",
"datasetVersionId": "<string>",
"snapshotHash": "<string>",
"snapshotJson": {
"schemaVersion": 1,
"snapshotHashVersion": "sha256-canonical-v1",
"name": "<string>",
"description": "<string>",
"evaluationId": 123,
"environment": "dev",
"seed": 123,
"code": {
"runnerVersion": "<string>",
"codeVersion": "<string>",
"schemaVersion": "<string>"
},
"evaluation": {
"type": "<string>",
"executionSettings": {},
"modelSettings": {},
"customMetrics": {},
"executorType": "<string>",
"executorConfig": {}
},
"dataset": {
"id": "<string>",
"versionId": "<string>",
"contentHash": "<string>",
"schema": {},
"rows": [
{
"id": 123,
"name": "<string>",
"input": "<string>",
"expectedOutput": "<string>",
"metadata": true,
"lifecycleState": "<string>",
"originType": "<string>",
"datasetId": "<string>",
"datasetVersionId": "<string>",
"datasetRowId": "<string>",
"datasetRowContentHash": "<string>",
"inputHash": "<string>",
"lastLifecycleTransitionAt": "<string>",
"archivedAt": "<string>",
"supersededById": 123,
"supersededAt": "<string>",
"supersessionReason": "<string>",
"createdAt": "<string>"
}
],
"datasetHubRows": [
{
"id": "<string>",
"ordinal": 123,
"contentHash": "<string>",
"payload": {}
}
]
},
"baselineVariantKey": "<string>",
"variants": [
{
"key": "<string>",
"ordinal": 123,
"name": "<string>",
"prompt": {
"versionId": "<string>",
"artifactId": 123,
"contentHash": "<string>",
"payload": {},
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"systemPrompt": "<string>"
},
"routing": {
"profileId": "<string>",
"provider": "<string>",
"model": "<string>",
"strategy": {}
},
"parameters": {},
"tools": {},
"scorers": [
{
"id": 123,
"name": "<string>",
"model": "<string>",
"promptTemplate": "<string>",
"promptTemplateHash": "<string>",
"criteria": true,
"settings": true
}
],
"calibrationMappings": [
{
"mappingId": "<string>",
"calibrationRunId": "<string>",
"method": "<string>",
"scoreScaleVersion": "<string>",
"mapping": {}
}
],
"policies": {},
"configurationHash": "<string>"
}
],
"policies": {},
"createdFrom": {
"surface": "playground",
"playgroundId": 123
}
},
"createRequestHash": "<string>",
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": false,
"allowRegressions": false
},
"createIdempotencyKey": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}{
"idempotentReplay": true,
"id": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluationId": 123,
"name": "<string>",
"description": "<string>",
"status": "<string>",
"baselineVariantKey": "<string>",
"datasetVersionId": "<string>",
"snapshotHash": "<string>",
"snapshotJson": {
"schemaVersion": 1,
"snapshotHashVersion": "sha256-canonical-v1",
"name": "<string>",
"description": "<string>",
"evaluationId": 123,
"environment": "dev",
"seed": 123,
"code": {
"runnerVersion": "<string>",
"codeVersion": "<string>",
"schemaVersion": "<string>"
},
"evaluation": {
"type": "<string>",
"executionSettings": {},
"modelSettings": {},
"customMetrics": {},
"executorType": "<string>",
"executorConfig": {}
},
"dataset": {
"id": "<string>",
"versionId": "<string>",
"contentHash": "<string>",
"schema": {},
"rows": [
{
"id": 123,
"name": "<string>",
"input": "<string>",
"expectedOutput": "<string>",
"metadata": true,
"lifecycleState": "<string>",
"originType": "<string>",
"datasetId": "<string>",
"datasetVersionId": "<string>",
"datasetRowId": "<string>",
"datasetRowContentHash": "<string>",
"inputHash": "<string>",
"lastLifecycleTransitionAt": "<string>",
"archivedAt": "<string>",
"supersededById": 123,
"supersededAt": "<string>",
"supersessionReason": "<string>",
"createdAt": "<string>"
}
],
"datasetHubRows": [
{
"id": "<string>",
"ordinal": 123,
"contentHash": "<string>",
"payload": {}
}
]
},
"baselineVariantKey": "<string>",
"variants": [
{
"key": "<string>",
"ordinal": 123,
"name": "<string>",
"prompt": {
"versionId": "<string>",
"artifactId": 123,
"contentHash": "<string>",
"payload": {},
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"systemPrompt": "<string>"
},
"routing": {
"profileId": "<string>",
"provider": "<string>",
"model": "<string>",
"strategy": {}
},
"parameters": {},
"tools": {},
"scorers": [
{
"id": 123,
"name": "<string>",
"model": "<string>",
"promptTemplate": "<string>",
"promptTemplateHash": "<string>",
"criteria": true,
"settings": true
}
],
"calibrationMappings": [
{
"mappingId": "<string>",
"calibrationRunId": "<string>",
"method": "<string>",
"scoreScaleVersion": "<string>",
"mapping": {}
}
],
"policies": {},
"configurationHash": "<string>"
}
],
"policies": {},
"createdFrom": {
"surface": "playground",
"playgroundId": 123
}
},
"createRequestHash": "<string>",
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": false,
"allowRegressions": false
},
"createIdempotencyKey": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Show child attributes
Show child attributes
Available options:
dev Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
Create experiments experiments
curl --request POST \
--url https://evalgate.com/api/experiments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"evaluationId": 123,
"name": "<string>",
"idempotencyKey": "<string>",
"baselineVariantKey": "<string>",
"variants": [
{
"name": "<string>",
"key": "<string>",
"provider": "<string>",
"promptVersionId": "<string>",
"routingProfileId": "<string>",
"model": "<string>",
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"parameters": {},
"tools": {},
"systemPrompt": "<string>",
"policies": {},
"expectedPromptContentHash": "<string>",
"routingStrategy": {},
"scorerConfigIds": [
123
],
"calibrationMappingIds": [
"<string>"
]
}
],
"description": "<string>",
"environment": "dev",
"datasetVersionId": "<string>",
"seed": 123,
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": false,
"allowRegressions": false
},
"expectedDatasetContentHash": "<string>",
"runnerVersion": "<string>",
"codeVersion": "<string>",
"policies": {}
}
'import requests
url = "https://evalgate.com/api/experiments"
payload = {
"evaluationId": 123,
"name": "<string>",
"idempotencyKey": "<string>",
"baselineVariantKey": "<string>",
"variants": [
{
"name": "<string>",
"key": "<string>",
"provider": "<string>",
"promptVersionId": "<string>",
"routingProfileId": "<string>",
"model": "<string>",
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"parameters": {},
"tools": {},
"systemPrompt": "<string>",
"policies": {},
"expectedPromptContentHash": "<string>",
"routingStrategy": {},
"scorerConfigIds": [123],
"calibrationMappingIds": ["<string>"]
}
],
"description": "<string>",
"environment": "dev",
"datasetVersionId": "<string>",
"seed": 123,
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": False,
"allowRegressions": False
},
"expectedDatasetContentHash": "<string>",
"runnerVersion": "<string>",
"codeVersion": "<string>",
"policies": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evaluationId: 123,
name: '<string>',
idempotencyKey: '<string>',
baselineVariantKey: '<string>',
variants: [
{
name: '<string>',
key: '<string>',
provider: '<string>',
promptVersionId: '<string>',
routingProfileId: '<string>',
model: '<string>',
messages: [{id: '<string>', role: 'user', content: '<string>', name: '<string>'}],
parameters: {},
tools: {},
systemPrompt: '<string>',
policies: {},
expectedPromptContentHash: '<string>',
routingStrategy: {},
scorerConfigIds: [123],
calibrationMappingIds: ['<string>']
}
],
description: '<string>',
environment: 'dev',
datasetVersionId: '<string>',
seed: 123,
winnerPolicy: {
minimumPassRateDelta: 123,
maximumCostIncreasePercent: 123,
maximumP95LatencyIncreasePercent: 123,
allowIncomparableJudges: false,
allowRegressions: false
},
expectedDatasetContentHash: '<string>',
runnerVersion: '<string>',
codeVersion: '<string>',
policies: {}
})
};
fetch('https://evalgate.com/api/experiments', 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://evalgate.com/api/experiments",
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([
'evaluationId' => 123,
'name' => '<string>',
'idempotencyKey' => '<string>',
'baselineVariantKey' => '<string>',
'variants' => [
[
'name' => '<string>',
'key' => '<string>',
'provider' => '<string>',
'promptVersionId' => '<string>',
'routingProfileId' => '<string>',
'model' => '<string>',
'messages' => [
[
'id' => '<string>',
'role' => 'user',
'content' => '<string>',
'name' => '<string>'
]
],
'parameters' => [
],
'tools' => [
],
'systemPrompt' => '<string>',
'policies' => [
],
'expectedPromptContentHash' => '<string>',
'routingStrategy' => [
],
'scorerConfigIds' => [
123
],
'calibrationMappingIds' => [
'<string>'
]
]
],
'description' => '<string>',
'environment' => 'dev',
'datasetVersionId' => '<string>',
'seed' => 123,
'winnerPolicy' => [
'minimumPassRateDelta' => 123,
'maximumCostIncreasePercent' => 123,
'maximumP95LatencyIncreasePercent' => 123,
'allowIncomparableJudges' => false,
'allowRegressions' => false
],
'expectedDatasetContentHash' => '<string>',
'runnerVersion' => '<string>',
'codeVersion' => '<string>',
'policies' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://evalgate.com/api/experiments"
payload := strings.NewReader("{\n \"evaluationId\": 123,\n \"name\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"baselineVariantKey\": \"<string>\",\n \"variants\": [\n {\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"provider\": \"<string>\",\n \"promptVersionId\": \"<string>\",\n \"routingProfileId\": \"<string>\",\n \"model\": \"<string>\",\n \"messages\": [\n {\n \"id\": \"<string>\",\n \"role\": \"user\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"parameters\": {},\n \"tools\": {},\n \"systemPrompt\": \"<string>\",\n \"policies\": {},\n \"expectedPromptContentHash\": \"<string>\",\n \"routingStrategy\": {},\n \"scorerConfigIds\": [\n 123\n ],\n \"calibrationMappingIds\": [\n \"<string>\"\n ]\n }\n ],\n \"description\": \"<string>\",\n \"environment\": \"dev\",\n \"datasetVersionId\": \"<string>\",\n \"seed\": 123,\n \"winnerPolicy\": {\n \"minimumPassRateDelta\": 123,\n \"maximumCostIncreasePercent\": 123,\n \"maximumP95LatencyIncreasePercent\": 123,\n \"allowIncomparableJudges\": false,\n \"allowRegressions\": false\n },\n \"expectedDatasetContentHash\": \"<string>\",\n \"runnerVersion\": \"<string>\",\n \"codeVersion\": \"<string>\",\n \"policies\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://evalgate.com/api/experiments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"evaluationId\": 123,\n \"name\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"baselineVariantKey\": \"<string>\",\n \"variants\": [\n {\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"provider\": \"<string>\",\n \"promptVersionId\": \"<string>\",\n \"routingProfileId\": \"<string>\",\n \"model\": \"<string>\",\n \"messages\": [\n {\n \"id\": \"<string>\",\n \"role\": \"user\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"parameters\": {},\n \"tools\": {},\n \"systemPrompt\": \"<string>\",\n \"policies\": {},\n \"expectedPromptContentHash\": \"<string>\",\n \"routingStrategy\": {},\n \"scorerConfigIds\": [\n 123\n ],\n \"calibrationMappingIds\": [\n \"<string>\"\n ]\n }\n ],\n \"description\": \"<string>\",\n \"environment\": \"dev\",\n \"datasetVersionId\": \"<string>\",\n \"seed\": 123,\n \"winnerPolicy\": {\n \"minimumPassRateDelta\": 123,\n \"maximumCostIncreasePercent\": 123,\n \"maximumP95LatencyIncreasePercent\": 123,\n \"allowIncomparableJudges\": false,\n \"allowRegressions\": false\n },\n \"expectedDatasetContentHash\": \"<string>\",\n \"runnerVersion\": \"<string>\",\n \"codeVersion\": \"<string>\",\n \"policies\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://evalgate.com/api/experiments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"evaluationId\": 123,\n \"name\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"baselineVariantKey\": \"<string>\",\n \"variants\": [\n {\n \"name\": \"<string>\",\n \"key\": \"<string>\",\n \"provider\": \"<string>\",\n \"promptVersionId\": \"<string>\",\n \"routingProfileId\": \"<string>\",\n \"model\": \"<string>\",\n \"messages\": [\n {\n \"id\": \"<string>\",\n \"role\": \"user\",\n \"content\": \"<string>\",\n \"name\": \"<string>\"\n }\n ],\n \"parameters\": {},\n \"tools\": {},\n \"systemPrompt\": \"<string>\",\n \"policies\": {},\n \"expectedPromptContentHash\": \"<string>\",\n \"routingStrategy\": {},\n \"scorerConfigIds\": [\n 123\n ],\n \"calibrationMappingIds\": [\n \"<string>\"\n ]\n }\n ],\n \"description\": \"<string>\",\n \"environment\": \"dev\",\n \"datasetVersionId\": \"<string>\",\n \"seed\": 123,\n \"winnerPolicy\": {\n \"minimumPassRateDelta\": 123,\n \"maximumCostIncreasePercent\": 123,\n \"maximumP95LatencyIncreasePercent\": 123,\n \"allowIncomparableJudges\": false,\n \"allowRegressions\": false\n },\n \"expectedDatasetContentHash\": \"<string>\",\n \"runnerVersion\": \"<string>\",\n \"codeVersion\": \"<string>\",\n \"policies\": {}\n}"
response = http.request(request)
puts response.read_body{
"idempotentReplay": true,
"id": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluationId": 123,
"name": "<string>",
"description": "<string>",
"status": "<string>",
"baselineVariantKey": "<string>",
"datasetVersionId": "<string>",
"snapshotHash": "<string>",
"snapshotJson": {
"schemaVersion": 1,
"snapshotHashVersion": "sha256-canonical-v1",
"name": "<string>",
"description": "<string>",
"evaluationId": 123,
"environment": "dev",
"seed": 123,
"code": {
"runnerVersion": "<string>",
"codeVersion": "<string>",
"schemaVersion": "<string>"
},
"evaluation": {
"type": "<string>",
"executionSettings": {},
"modelSettings": {},
"customMetrics": {},
"executorType": "<string>",
"executorConfig": {}
},
"dataset": {
"id": "<string>",
"versionId": "<string>",
"contentHash": "<string>",
"schema": {},
"rows": [
{
"id": 123,
"name": "<string>",
"input": "<string>",
"expectedOutput": "<string>",
"metadata": true,
"lifecycleState": "<string>",
"originType": "<string>",
"datasetId": "<string>",
"datasetVersionId": "<string>",
"datasetRowId": "<string>",
"datasetRowContentHash": "<string>",
"inputHash": "<string>",
"lastLifecycleTransitionAt": "<string>",
"archivedAt": "<string>",
"supersededById": 123,
"supersededAt": "<string>",
"supersessionReason": "<string>",
"createdAt": "<string>"
}
],
"datasetHubRows": [
{
"id": "<string>",
"ordinal": 123,
"contentHash": "<string>",
"payload": {}
}
]
},
"baselineVariantKey": "<string>",
"variants": [
{
"key": "<string>",
"ordinal": 123,
"name": "<string>",
"prompt": {
"versionId": "<string>",
"artifactId": 123,
"contentHash": "<string>",
"payload": {},
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"systemPrompt": "<string>"
},
"routing": {
"profileId": "<string>",
"provider": "<string>",
"model": "<string>",
"strategy": {}
},
"parameters": {},
"tools": {},
"scorers": [
{
"id": 123,
"name": "<string>",
"model": "<string>",
"promptTemplate": "<string>",
"promptTemplateHash": "<string>",
"criteria": true,
"settings": true
}
],
"calibrationMappings": [
{
"mappingId": "<string>",
"calibrationRunId": "<string>",
"method": "<string>",
"scoreScaleVersion": "<string>",
"mapping": {}
}
],
"policies": {},
"configurationHash": "<string>"
}
],
"policies": {},
"createdFrom": {
"surface": "playground",
"playgroundId": 123
}
},
"createRequestHash": "<string>",
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": false,
"allowRegressions": false
},
"createIdempotencyKey": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}{
"idempotentReplay": true,
"id": "<string>",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"evaluationId": 123,
"name": "<string>",
"description": "<string>",
"status": "<string>",
"baselineVariantKey": "<string>",
"datasetVersionId": "<string>",
"snapshotHash": "<string>",
"snapshotJson": {
"schemaVersion": 1,
"snapshotHashVersion": "sha256-canonical-v1",
"name": "<string>",
"description": "<string>",
"evaluationId": 123,
"environment": "dev",
"seed": 123,
"code": {
"runnerVersion": "<string>",
"codeVersion": "<string>",
"schemaVersion": "<string>"
},
"evaluation": {
"type": "<string>",
"executionSettings": {},
"modelSettings": {},
"customMetrics": {},
"executorType": "<string>",
"executorConfig": {}
},
"dataset": {
"id": "<string>",
"versionId": "<string>",
"contentHash": "<string>",
"schema": {},
"rows": [
{
"id": 123,
"name": "<string>",
"input": "<string>",
"expectedOutput": "<string>",
"metadata": true,
"lifecycleState": "<string>",
"originType": "<string>",
"datasetId": "<string>",
"datasetVersionId": "<string>",
"datasetRowId": "<string>",
"datasetRowContentHash": "<string>",
"inputHash": "<string>",
"lastLifecycleTransitionAt": "<string>",
"archivedAt": "<string>",
"supersededById": 123,
"supersededAt": "<string>",
"supersessionReason": "<string>",
"createdAt": "<string>"
}
],
"datasetHubRows": [
{
"id": "<string>",
"ordinal": 123,
"contentHash": "<string>",
"payload": {}
}
]
},
"baselineVariantKey": "<string>",
"variants": [
{
"key": "<string>",
"ordinal": 123,
"name": "<string>",
"prompt": {
"versionId": "<string>",
"artifactId": 123,
"contentHash": "<string>",
"payload": {},
"messages": [
{
"id": "<string>",
"role": "user",
"content": "<string>",
"name": "<string>"
}
],
"systemPrompt": "<string>"
},
"routing": {
"profileId": "<string>",
"provider": "<string>",
"model": "<string>",
"strategy": {}
},
"parameters": {},
"tools": {},
"scorers": [
{
"id": 123,
"name": "<string>",
"model": "<string>",
"promptTemplate": "<string>",
"promptTemplateHash": "<string>",
"criteria": true,
"settings": true
}
],
"calibrationMappings": [
{
"mappingId": "<string>",
"calibrationRunId": "<string>",
"method": "<string>",
"scoreScaleVersion": "<string>",
"mapping": {}
}
],
"policies": {},
"configurationHash": "<string>"
}
],
"policies": {},
"createdFrom": {
"surface": "playground",
"playgroundId": 123
}
},
"createRequestHash": "<string>",
"winnerPolicy": {
"minimumPassRateDelta": 123,
"maximumCostIncreasePercent": 123,
"maximumP95LatencyIncreasePercent": 123,
"allowIncomparableJudges": false,
"allowRegressions": false
},
"createIdempotencyKey": "<string>",
"createdBy": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": {
"message": "<string>",
"details": "<unknown>",
"requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}