curl --request POST \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning', 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.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"version": 2,
"status": "not_run",
"reason": "awaiting_run",
"message": "<string>",
"headline": "<string>",
"suggestion": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {}
},
"removed": [
"<string>"
],
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {}
},
"engine": {
"name": "jev",
"version": "<string>"
},
"horizon": "0s",
"applies_to": {},
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
],
"freshness": {
"policy": "on_read",
"debounce_ms": 0,
"interval": "<string>",
"max_wait_ms": 2,
"fanout": {
"scope": {
"created_within": "<string>",
"where": {}
},
"debounce_ms": 600000,
"max_wait_ms": 2,
"job_above": 1,
"confirm_jobs": true,
"auto_daily_limit": 100000
}
},
"activate": true,
"confirm": false
},
"unit_reduction": 0.6,
"cost_per_answer_before": 1,
"cost_per_answer_after": 1,
"held_out": {
"log_loss_before": 1,
"log_loss_after": 1,
"accuracy_before": 0.5,
"accuracy_after": 0.5,
"interval": [
123
]
},
"labels": 101,
"engine_version": "<string>",
"computed_at": "2023-11-07T05:31:56Z"
},
"computed_at": "2023-11-07T05:31:56Z",
"next_run_after": "2023-11-07T05:31:56Z",
"plan_required": {
"message": "<string>",
"capability": "recipe_tuning",
"required_plan": "team",
"plan": "developer"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Run this month's recipe tuning now
Starts this month’s recipe-tuning run of the active version, or
returns it (§6.10): one run per version, engine epoch and calendar
month (UTC), whether this or the nightly calibration starts it. The
response is the suggestion as it stands, running until the run
ends. Runs are never billed.
invalid_request when the version cannot be tuned: a judgment the
namespace inherits from a template, a composite, no context recipe,
a recipe with nothing to drop or halve, or no calibration fit yet
(100 outcomes, 20 of each kind). On the Team plan and above: below
it, plan_required (§9).
curl --request POST \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning', 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.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-tuning")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"version": 2,
"status": "not_run",
"reason": "awaiting_run",
"message": "<string>",
"headline": "<string>",
"suggestion": {
"recipe": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {}
},
"removed": [
"<string>"
],
"definition": {
"name": "<string>",
"question": "<string>",
"type": "bool",
"criteria": "<string>",
"context": {
"fields": [
"<string>"
],
"last_n": {},
"window": {},
"max_tokens": 2,
"related": {}
},
"engine": {
"name": "jev",
"version": "<string>"
},
"horizon": "0s",
"applies_to": {},
"thresholds": {},
"parts": [
{
"name": "<string>",
"question": "<string>"
}
],
"features": [
"<string>"
],
"freshness": {
"policy": "on_read",
"debounce_ms": 0,
"interval": "<string>",
"max_wait_ms": 2,
"fanout": {
"scope": {
"created_within": "<string>",
"where": {}
},
"debounce_ms": 600000,
"max_wait_ms": 2,
"job_above": 1,
"confirm_jobs": true,
"auto_daily_limit": 100000
}
},
"activate": true,
"confirm": false
},
"unit_reduction": 0.6,
"cost_per_answer_before": 1,
"cost_per_answer_after": 1,
"held_out": {
"log_loss_before": 1,
"log_loss_after": 1,
"accuracy_before": 0.5,
"accuracy_after": 0.5,
"interval": [
123
]
},
"labels": 101,
"engine_version": "<string>",
"computed_at": "2023-11-07T05:31:56Z"
},
"computed_at": "2023-11-07T05:31:56Z",
"next_run_after": "2023-11-07T05:31:56Z",
"plan_required": {
"message": "<string>",
"capability": "recipe_tuning",
"required_plan": "team",
"plan": "developer"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_request",
"message": "<string>",
"details": {}
}
}Authorizations
An organization API key. Keys carry a role (read_write or
read_only) and may be restricted to a namespace prefix such as
acme/*, or to one namespace such as acme/prod/tenant_1. A prefix
matches on a / boundary: acme/prod/tenant_1* covers
acme/prod/tenant_1 and everything under acme/prod/tenant_1/,
never acme/prod/tenant_12.
Path Parameters
The namespace name, with any / sent as %2F.
Up to 256 bytes. / separates levels of the hierarchy, as in acme/prod/tenant_123.
1 - 256^[A-Za-z0-9._:/-]+$A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..
1 - 128^[A-Za-z0-9_-]+$Response
The run started, is running, or ended this month.
The cheaper context recipe a version's outcomes support, from its last recipe-tuning run (§6.10), or why there is none.
x >= 1not_run: no run yet;reasonsays why.running: a run is testing smaller recipes.ready:suggestionholds a cheaper recipe.none: the last run found none;reasonsays why.
not_run, running, ready, none Why there is no suggestion. Not run: awaiting_run (the next
calibration run starts it), too_few_outcomes (no calibration fit
yet), no_recipe, composite, inherited (the template has the
suggestion). None: nothing_to_save (every answer already costs
one unit), no_smaller_recipe, no_cheaper_recipe (nothing at
least 20% cheaper), accuracy_would_drop, too_few_outcomes,
cost_cap (the run stopped at this month's limit) or
superseded (the engine's model changed during the run). Null
while running and when ready.
awaiting_run, too_few_outcomes, no_recipe, composite, inherited, nothing_to_save, no_smaller_recipe, no_cheaper_recipe, accuracy_would_drop, cost_cap, superseded What status and reason mean, in a sentence.
One sentence when ready, such as "A context recipe 42% cheaper per answer, with accuracy unchanged within noise on 312 labelled answers."
One smaller recipe, measured against the current one on the same
labelled answers and engine epoch. Apply it by posting definition
as a new version and activating it through its shadow report.
Show child attributes
Show child attributes
When the last run ended. Null before one has.
The earliest the nightly calibration starts the next run, 30 days after the last started. Null before one has.
Set below Team, where the recipe itself is withheld (§9).
Show child attributes
Show child attributes