curl --request GET \
--url https://api.vainona.ai/v1/namespaces/{ns}/evaluations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/evaluations/{id}"
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}/evaluations/{id}', 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}/evaluations/{id}",
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}/evaluations/{id}"
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}/evaluations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/evaluations/{id}")
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{
"id": "<string>",
"document_id": "<string>",
"revision": 1,
"incarnation": 1,
"judgment": "<string>",
"judgment_version": 2,
"engine": "<string>",
"engine_version": "<string>",
"context_hash": "<string>",
"context_tokens": 1,
"context_truncated": true,
"output": {
"p": 0.5,
"value": "<string>",
"dist": {},
"escape_p": 0.5,
"score": 123,
"parts": {},
"features": {}
},
"status": "success",
"error": {
"class": "retryable",
"message": "<string>"
},
"shadow": true,
"created_at": "2023-11-07T05:31:56Z",
"latency_ms": 1,
"watermark": 1,
"related_documents": [
{
"relation": "<string>",
"document_id": "<string>",
"revision": 1
}
],
"context": {},
"raw": "<unknown>"
}{
"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": {}
}
}Get one evaluation record
One evaluation of any document in the namespace, any incarnation and
any judgment, with its compiled context and the engine’s raw response
(§6.7). Shadow evaluations are included, marked shadow. Unlike a
document’s history, it is found by id alone.
curl --request GET \
--url https://api.vainona.ai/v1/namespaces/{ns}/evaluations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vainona.ai/v1/namespaces/{ns}/evaluations/{id}"
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}/evaluations/{id}', 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}/evaluations/{id}",
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}/evaluations/{id}"
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}/evaluations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vainona.ai/v1/namespaces/{ns}/evaluations/{id}")
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{
"id": "<string>",
"document_id": "<string>",
"revision": 1,
"incarnation": 1,
"judgment": "<string>",
"judgment_version": 2,
"engine": "<string>",
"engine_version": "<string>",
"context_hash": "<string>",
"context_tokens": 1,
"context_truncated": true,
"output": {
"p": 0.5,
"value": "<string>",
"dist": {},
"escape_p": 0.5,
"score": 123,
"parts": {},
"features": {}
},
"status": "success",
"error": {
"class": "retryable",
"message": "<string>"
},
"shadow": true,
"created_at": "2023-11-07T05:31:56Z",
"latency_ms": 1,
"watermark": 1,
"related_documents": [
{
"relation": "<string>",
"document_id": "<string>",
"revision": 1
}
],
"context": {},
"raw": "<unknown>"
}{
"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._:/-]+$The evaluation id, ev_ and a ULID.
^ev_[0-9a-z]{26}$Response
The evaluation, with context and raw.
An immutable record of one computation.
Up to 128 bytes.
1 - 128^[A-Za-z0-9._:/-]+$x >= 0x >= 0A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..
1 - 128^[A-Za-z0-9_-]+$x >= 1^sha256:[0-9a-f]{64}$x >= 0The engine's numbers. Null when the evaluation failed.
Show child attributes
Show child attributes
success, failed Why the evaluation failed. Null on success.
Show child attributes
Show child attributes
True for shadow evaluations from activation reports, which never produce answers.
RFC 3339, UTC.
How long the engine request that produced it took, retries excluded. Absent for evaluations recorded before it was measured.
x >= 0Entity judgments only (entities, E1, §6.7). The log position the context was read at.
x >= 0Entity judgments only (entities, E1, §6.7), with
include=history,context or from GET .../evaluations/{id}.
Every related document the context read, rendered or aggregated,
with the revision it was read at.
Show child attributes
Show child attributes
With include=history,context, the compiled context the engine saw.
With include=history,raw, the engine's raw response. It never carries the engine's token counts (§6.1).