curl --request POST \
--url https://api.galileo.ai/v2/scorers/decision/validate \
--header 'Content-Type: application/json' \
--header 'Splunk-AO-API-Key: <api-key>' \
--data '
{
"model_name": "<string>",
"question": "<string>",
"scorer_configuration": {
"scoreable_node_types": [],
"ground_truth": false
},
"query": "<string>",
"response": "<string>",
"answer_options": [
"<string>"
],
"reference_output": "<string>"
}
'import requests
url = "https://api.galileo.ai/v2/scorers/decision/validate"
payload = {
"model_name": "<string>",
"question": "<string>",
"scorer_configuration": {
"scoreable_node_types": [],
"ground_truth": False
},
"query": "<string>",
"response": "<string>",
"answer_options": ["<string>"],
"reference_output": "<string>"
}
headers = {
"Splunk-AO-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Splunk-AO-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
question: '<string>',
scorer_configuration: {scoreable_node_types: [], ground_truth: false},
query: '<string>',
response: '<string>',
answer_options: ['<string>'],
reference_output: '<string>'
})
};
fetch('https://api.galileo.ai/v2/scorers/decision/validate', 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.galileo.ai/v2/scorers/decision/validate",
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([
'model_name' => '<string>',
'question' => '<string>',
'scorer_configuration' => [
'scoreable_node_types' => [
],
'ground_truth' => false
],
'query' => '<string>',
'response' => '<string>',
'answer_options' => [
'<string>'
],
'reference_output' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Splunk-AO-API-Key: <api-key>"
],
]);
$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://api.galileo.ai/v2/scorers/decision/validate"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"question\": \"<string>\",\n \"scorer_configuration\": {\n \"scoreable_node_types\": [],\n \"ground_truth\": false\n },\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"answer_options\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Splunk-AO-API-Key", "<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://api.galileo.ai/v2/scorers/decision/validate")
.header("Splunk-AO-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"question\": \"<string>\",\n \"scorer_configuration\": {\n \"scoreable_node_types\": [],\n \"ground_truth\": false\n },\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"answer_options\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/scorers/decision/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Splunk-AO-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"question\": \"<string>\",\n \"scorer_configuration\": {\n \"scoreable_node_types\": [],\n \"ground_truth\": false\n },\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"answer_options\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_result_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Validate Decision Scorer
Test an unsaved decision evaluator on a query and response typed in the Test tab (Manual Input).
The body has the shape of the log-record test, with query, response and an optional
reference_output in place of the fields that select log records. scoreable_node_types holds
exactly one node type, trace or llm. Poll GET /generated-scorers/task-results/{task_result_id}
for the result, as for an LLM test.
curl --request POST \
--url https://api.galileo.ai/v2/scorers/decision/validate \
--header 'Content-Type: application/json' \
--header 'Splunk-AO-API-Key: <api-key>' \
--data '
{
"model_name": "<string>",
"question": "<string>",
"scorer_configuration": {
"scoreable_node_types": [],
"ground_truth": false
},
"query": "<string>",
"response": "<string>",
"answer_options": [
"<string>"
],
"reference_output": "<string>"
}
'import requests
url = "https://api.galileo.ai/v2/scorers/decision/validate"
payload = {
"model_name": "<string>",
"question": "<string>",
"scorer_configuration": {
"scoreable_node_types": [],
"ground_truth": False
},
"query": "<string>",
"response": "<string>",
"answer_options": ["<string>"],
"reference_output": "<string>"
}
headers = {
"Splunk-AO-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Splunk-AO-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
question: '<string>',
scorer_configuration: {scoreable_node_types: [], ground_truth: false},
query: '<string>',
response: '<string>',
answer_options: ['<string>'],
reference_output: '<string>'
})
};
fetch('https://api.galileo.ai/v2/scorers/decision/validate', 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.galileo.ai/v2/scorers/decision/validate",
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([
'model_name' => '<string>',
'question' => '<string>',
'scorer_configuration' => [
'scoreable_node_types' => [
],
'ground_truth' => false
],
'query' => '<string>',
'response' => '<string>',
'answer_options' => [
'<string>'
],
'reference_output' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Splunk-AO-API-Key: <api-key>"
],
]);
$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://api.galileo.ai/v2/scorers/decision/validate"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"question\": \"<string>\",\n \"scorer_configuration\": {\n \"scoreable_node_types\": [],\n \"ground_truth\": false\n },\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"answer_options\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Splunk-AO-API-Key", "<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://api.galileo.ai/v2/scorers/decision/validate")
.header("Splunk-AO-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"question\": \"<string>\",\n \"scorer_configuration\": {\n \"scoreable_node_types\": [],\n \"ground_truth\": false\n },\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"answer_options\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/scorers/decision/validate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Splunk-AO-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"question\": \"<string>\",\n \"scorer_configuration\": {\n \"scoreable_node_types\": [],\n \"ground_truth\": false\n },\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"answer_options\": [\n \"<string>\"\n ],\n \"reference_output\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_result_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
Test a decision evaluator on one query and response that the user types, before it is saved.
The input is text only. The job scores a synthetic trace with one LLM span, or the span alone, at the one node type of scorer_configuration. reference_output is the ground truth. It is needed when scorer_configuration.ground_truth is true, and ignored otherwise.
1 - 2551 - 2000The evaluator settings of a decision Test request, the same place as the LLM scorer_configuration.
scoreable_node_types holds exactly one node type. input_type defaults to the decision default for it (get_decision_input_type).
Show child attributes
Show child attributes
Response
Successful Response