Evaluate datasets with specified metrics
curl --request POST \
--url https://beta.getplum.ai/v1/evaluate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"synthetic_data_id": "<string>",
"seed_data_id": "<string>",
"metrics_id": "<string>",
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": [
"<string>"
],
"last_n_seconds": 123
}
}
'import requests
url = "https://beta.getplum.ai/v1/evaluate"
payload = {
"synthetic_data_id": "<string>",
"seed_data_id": "<string>",
"metrics_id": "<string>",
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": ["<string>"],
"last_n_seconds": 123
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
synthetic_data_id: '<string>',
seed_data_id: '<string>',
metrics_id: '<string>',
pair_query: {latest_n_pairs: 123, pair_labels: ['<string>'], last_n_seconds: 123}
})
};
fetch('https://beta.getplum.ai/v1/evaluate', 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://beta.getplum.ai/v1/evaluate",
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([
'synthetic_data_id' => '<string>',
'seed_data_id' => '<string>',
'metrics_id' => '<string>',
'pair_query' => [
'latest_n_pairs' => 123,
'pair_labels' => [
'<string>'
],
'last_n_seconds' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://beta.getplum.ai/v1/evaluate"
payload := strings.NewReader("{\n \"synthetic_data_id\": \"<string>\",\n \"seed_data_id\": \"<string>\",\n \"metrics_id\": \"<string>\",\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ],\n \"last_n_seconds\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://beta.getplum.ai/v1/evaluate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"synthetic_data_id\": \"<string>\",\n \"seed_data_id\": \"<string>\",\n \"metrics_id\": \"<string>\",\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ],\n \"last_n_seconds\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://beta.getplum.ai/v1/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"synthetic_data_id\": \"<string>\",\n \"seed_data_id\": \"<string>\",\n \"metrics_id\": \"<string>\",\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ],\n \"last_n_seconds\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"eval_results_id": "<string>",
"dataset_id": "<string>",
"created_at": "<string>",
"scores": [
{
"metric": "<string>",
"mean_score": 123,
"std_dev": 123,
"ci_low": 123,
"ci_high": 123,
"ci_confidence": 123,
"median_score": 123,
"min_score": 123,
"max_score": 123,
"lowest_scoring_pairs": [
{
"pair_id": "<string>",
"score_reason": "<string>"
}
]
}
],
"pair_count": 123
}{
"error": "<string>"
}{
"error": "<string>"
}API Reference
Evaluate datasets with specified metrics
POST
/
evaluate
Evaluate datasets with specified metrics
curl --request POST \
--url https://beta.getplum.ai/v1/evaluate \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"synthetic_data_id": "<string>",
"seed_data_id": "<string>",
"metrics_id": "<string>",
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": [
"<string>"
],
"last_n_seconds": 123
}
}
'import requests
url = "https://beta.getplum.ai/v1/evaluate"
payload = {
"synthetic_data_id": "<string>",
"seed_data_id": "<string>",
"metrics_id": "<string>",
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": ["<string>"],
"last_n_seconds": 123
}
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
synthetic_data_id: '<string>',
seed_data_id: '<string>',
metrics_id: '<string>',
pair_query: {latest_n_pairs: 123, pair_labels: ['<string>'], last_n_seconds: 123}
})
};
fetch('https://beta.getplum.ai/v1/evaluate', 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://beta.getplum.ai/v1/evaluate",
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([
'synthetic_data_id' => '<string>',
'seed_data_id' => '<string>',
'metrics_id' => '<string>',
'pair_query' => [
'latest_n_pairs' => 123,
'pair_labels' => [
'<string>'
],
'last_n_seconds' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://beta.getplum.ai/v1/evaluate"
payload := strings.NewReader("{\n \"synthetic_data_id\": \"<string>\",\n \"seed_data_id\": \"<string>\",\n \"metrics_id\": \"<string>\",\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ],\n \"last_n_seconds\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://beta.getplum.ai/v1/evaluate")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"synthetic_data_id\": \"<string>\",\n \"seed_data_id\": \"<string>\",\n \"metrics_id\": \"<string>\",\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ],\n \"last_n_seconds\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://beta.getplum.ai/v1/evaluate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"synthetic_data_id\": \"<string>\",\n \"seed_data_id\": \"<string>\",\n \"metrics_id\": \"<string>\",\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ],\n \"last_n_seconds\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"eval_results_id": "<string>",
"dataset_id": "<string>",
"created_at": "<string>",
"scores": [
{
"metric": "<string>",
"mean_score": 123,
"std_dev": 123,
"ci_low": 123,
"ci_high": 123,
"ci_confidence": 123,
"median_score": 123,
"min_score": 123,
"max_score": 123,
"lowest_scoring_pairs": [
{
"pair_id": "<string>",
"score_reason": "<string>"
}
]
}
],
"pair_count": 123
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json
ID of synthetic dataset to evaluate (either this or seed_data_id is required)
ID of seed dataset to evaluate (either this or synthetic_data_id is required)
ID of metrics to use for evaluation (will use latest if not provided)
Optional query parameters to filter dataset pairs
Show child attributes
Show child attributes
⌘I