curl --request POST \
--url https://beta.getplum.ai/v1/augment \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"target_metric_idx": [
123
],
"multiple": 1,
"eval_results_id": "<string>",
"include_gathered": false,
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": [
"<string>"
]
}
}
'import requests
url = "https://beta.getplum.ai/v1/augment"
payload = {
"target_metric_idx": [123],
"multiple": 1,
"eval_results_id": "<string>",
"include_gathered": False,
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": ["<string>"]
}
}
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({
target_metric_idx: [123],
multiple: 1,
eval_results_id: '<string>',
include_gathered: false,
pair_query: {latest_n_pairs: 123, pair_labels: ['<string>']}
})
};
fetch('https://beta.getplum.ai/v1/augment', 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/augment",
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([
'target_metric_idx' => [
123
],
'multiple' => 1,
'eval_results_id' => '<string>',
'include_gathered' => false,
'pair_query' => [
'latest_n_pairs' => 123,
'pair_labels' => [
'<string>'
]
]
]),
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/augment"
payload := strings.NewReader("{\n \"target_metric_idx\": [\n 123\n ],\n \"multiple\": 1,\n \"eval_results_id\": \"<string>\",\n \"include_gathered\": false,\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ]\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/augment")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"target_metric_idx\": [\n 123\n ],\n \"multiple\": 1,\n \"eval_results_id\": \"<string>\",\n \"include_gathered\": false,\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://beta.getplum.ai/v1/augment")
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 \"target_metric_idx\": [\n 123\n ],\n \"multiple\": 1,\n \"eval_results_id\": \"<string>\",\n \"include_gathered\": false,\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"synthetic_data_id": "<string>",
"created_at": "<string>",
"seed_data_size": 123,
"synthetic_data_size": 123,
"system_prompt": "<string>",
"target_metrics": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Augment seed data to generate synthetic data
curl --request POST \
--url https://beta.getplum.ai/v1/augment \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"target_metric_idx": [
123
],
"multiple": 1,
"eval_results_id": "<string>",
"include_gathered": false,
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": [
"<string>"
]
}
}
'import requests
url = "https://beta.getplum.ai/v1/augment"
payload = {
"target_metric_idx": [123],
"multiple": 1,
"eval_results_id": "<string>",
"include_gathered": False,
"pair_query": {
"latest_n_pairs": 123,
"pair_labels": ["<string>"]
}
}
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({
target_metric_idx: [123],
multiple: 1,
eval_results_id: '<string>',
include_gathered: false,
pair_query: {latest_n_pairs: 123, pair_labels: ['<string>']}
})
};
fetch('https://beta.getplum.ai/v1/augment', 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/augment",
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([
'target_metric_idx' => [
123
],
'multiple' => 1,
'eval_results_id' => '<string>',
'include_gathered' => false,
'pair_query' => [
'latest_n_pairs' => 123,
'pair_labels' => [
'<string>'
]
]
]),
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/augment"
payload := strings.NewReader("{\n \"target_metric_idx\": [\n 123\n ],\n \"multiple\": 1,\n \"eval_results_id\": \"<string>\",\n \"include_gathered\": false,\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ]\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/augment")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"target_metric_idx\": [\n 123\n ],\n \"multiple\": 1,\n \"eval_results_id\": \"<string>\",\n \"include_gathered\": false,\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://beta.getplum.ai/v1/augment")
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 \"target_metric_idx\": [\n 123\n ],\n \"multiple\": 1,\n \"eval_results_id\": \"<string>\",\n \"include_gathered\": false,\n \"pair_query\": {\n \"latest_n_pairs\": 123,\n \"pair_labels\": [\n \"<string>\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"synthetic_data_id": "<string>",
"created_at": "<string>",
"seed_data_size": 123,
"synthetic_data_size": 123,
"system_prompt": "<string>",
"target_metrics": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
Array of indices of target metrics for redrafting synthetic data (from the evaluation results)
Number of synthetic examples to generate per seed example (max 50)
x <= 50ID of evaluation results to use for target metrics (will use latest if not provided)
If true, includes gathered pairs (high-scoring and positively critiqued) in the synthetic dataset
Optional query parameters to filter seed dataset pairs
Show child attributes
Show child attributes
Response
Data successfully augmented
ID of the generated synthetic dataset
Timestamp when the synthetic data was created
Number of pairs in the original seed dataset
Total number of pairs in the synthetic dataset (including gathered pairs if include_gathered is true)
System prompt used for the synthetic data
Array of target metrics that were used for redrafting