curl --request GET \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion', 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-suggestion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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-suggestion"
req, _ := http.NewRequest("GET", 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.get("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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": {}
}
}Get the cheaper context recipe the outcomes support
The last recipe-tuning run of the active version (§6.10). Once a
version’s calibration is fitted, and then at most every 30 days, a
run tries smaller recipes: one field or relation dropped, or one
last_n or window halved. Each is priced in units per answer
first, and only those at least 20% cheaper are judged again, on the
fit’s labelled answers, from the stored contexts made smaller. A
variant qualifies when neither its held-out log loss nor its
accuracy is worse beyond noise. suggestion is the cheapest that
qualifies, with the exact definition to post as a new version;
nothing is applied for you.
On every plan. Below Team the numbers are shown, and recipe,
removed and definition are null with plan_required beside
them (§9).
curl --request GET \
--url https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion', 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-suggestion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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-suggestion"
req, _ := http.NewRequest("GET", 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.get("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/judgments/{name}/recipe-suggestion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.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": {}
}
}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 suggestion, or why there is none; status says which.
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