Create Llm Scorer Version
curl --request POST \
--url https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '
{
"model_name": "<string>",
"num_judges": 123,
"scoreable_node_types": [
"<string>"
],
"cot_enabled": true,
"instructions": "<string>",
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"user_prompt": "<string>"
}
'import requests
url = "https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm"
payload = {
"model_name": "<string>",
"num_judges": 123,
"scoreable_node_types": ["<string>"],
"cot_enabled": True,
"instructions": "<string>",
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"user_prompt": "<string>"
}
headers = {
"Galileo-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Galileo-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
num_judges: 123,
scoreable_node_types: ['<string>'],
cot_enabled: true,
instructions: '<string>',
chain_poll_template: {
template: '<string>',
metric_system_prompt: '<string>',
metric_description: '<string>',
value_field_name: 'rating',
explanation_field_name: 'explanation',
metric_few_shot_examples: [{generation_prompt_and_response: '<string>', evaluating_response: '<string>'}],
response_schema: {}
},
user_prompt: '<string>'
})
};
fetch('https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm', 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/{scorer_id}/version/llm",
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>',
'num_judges' => 123,
'scoreable_node_types' => [
'<string>'
],
'cot_enabled' => true,
'instructions' => '<string>',
'chain_poll_template' => [
'template' => '<string>',
'metric_system_prompt' => '<string>',
'metric_description' => '<string>',
'value_field_name' => 'rating',
'explanation_field_name' => 'explanation',
'metric_few_shot_examples' => [
[
'generation_prompt_and_response' => '<string>',
'evaluating_response' => '<string>'
]
],
'response_schema' => [
]
],
'user_prompt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Galileo-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/{scorer_id}/version/llm"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"num_judges\": 123,\n \"scoreable_node_types\": [\n \"<string>\"\n ],\n \"cot_enabled\": true,\n \"instructions\": \"<string>\",\n \"chain_poll_template\": {\n \"template\": \"<string>\",\n \"metric_system_prompt\": \"<string>\",\n \"metric_description\": \"<string>\",\n \"value_field_name\": \"rating\",\n \"explanation_field_name\": \"explanation\",\n \"metric_few_shot_examples\": [\n {\n \"generation_prompt_and_response\": \"<string>\",\n \"evaluating_response\": \"<string>\"\n }\n ],\n \"response_schema\": {}\n },\n \"user_prompt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Galileo-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/{scorer_id}/version/llm")
.header("Galileo-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"num_judges\": 123,\n \"scoreable_node_types\": [\n \"<string>\"\n ],\n \"cot_enabled\": true,\n \"instructions\": \"<string>\",\n \"chain_poll_template\": {\n \"template\": \"<string>\",\n \"metric_system_prompt\": \"<string>\",\n \"metric_description\": \"<string>\",\n \"value_field_name\": \"rating\",\n \"explanation_field_name\": \"explanation\",\n \"metric_few_shot_examples\": [\n {\n \"generation_prompt_and_response\": \"<string>\",\n \"evaluating_response\": \"<string>\"\n }\n ],\n \"response_schema\": {}\n },\n \"user_prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Galileo-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"num_judges\": 123,\n \"scoreable_node_types\": [\n \"<string>\"\n ],\n \"cot_enabled\": true,\n \"instructions\": \"<string>\",\n \"chain_poll_template\": {\n \"template\": \"<string>\",\n \"metric_system_prompt\": \"<string>\",\n \"metric_description\": \"<string>\",\n \"value_field_name\": \"rating\",\n \"explanation_field_name\": \"explanation\",\n \"metric_few_shot_examples\": [\n {\n \"generation_prompt_and_response\": \"<string>\",\n \"evaluating_response\": \"<string>\"\n }\n ],\n \"response_schema\": {}\n },\n \"user_prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"version": 123,
"scorer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"generated_scorer": {
"id": "<string>",
"name": "<string>",
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"scoreable_node_types": [],
"scorer_configuration": {
"model_alias": "gpt-4.1-mini",
"num_judges": 3,
"output_type": "boolean",
"scoreable_node_types": [
"<string>"
],
"cot_enabled": false,
"ground_truth": false,
"multimodal_capabilities": []
},
"instructions": "<string>",
"user_prompt": "<string>"
},
"registered_scorer": {
"id": "<string>",
"name": "<string>",
"score_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"scoreable_node_types": [
"<string>"
]
},
"finetuned_scorer": {
"id": "<string>",
"name": "<string>",
"lora_task_id": 123,
"prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"lora_weights_path": "<string>",
"class_name_to_vocab_ix": {}
},
"model_name": "<string>",
"num_judges": 123,
"scoreable_node_types": [
"<string>"
],
"cot_enabled": true,
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"allowed_model": true,
"created_by": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}data
Create Llm Scorer Version
POST
/
v2
/
scorers
/
{scorer_id}
/
version
/
llm
Create Llm Scorer Version
curl --request POST \
--url https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm \
--header 'Content-Type: application/json' \
--header 'Galileo-API-Key: <api-key>' \
--data '
{
"model_name": "<string>",
"num_judges": 123,
"scoreable_node_types": [
"<string>"
],
"cot_enabled": true,
"instructions": "<string>",
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"user_prompt": "<string>"
}
'import requests
url = "https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm"
payload = {
"model_name": "<string>",
"num_judges": 123,
"scoreable_node_types": ["<string>"],
"cot_enabled": True,
"instructions": "<string>",
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"user_prompt": "<string>"
}
headers = {
"Galileo-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Galileo-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model_name: '<string>',
num_judges: 123,
scoreable_node_types: ['<string>'],
cot_enabled: true,
instructions: '<string>',
chain_poll_template: {
template: '<string>',
metric_system_prompt: '<string>',
metric_description: '<string>',
value_field_name: 'rating',
explanation_field_name: 'explanation',
metric_few_shot_examples: [{generation_prompt_and_response: '<string>', evaluating_response: '<string>'}],
response_schema: {}
},
user_prompt: '<string>'
})
};
fetch('https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm', 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/{scorer_id}/version/llm",
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>',
'num_judges' => 123,
'scoreable_node_types' => [
'<string>'
],
'cot_enabled' => true,
'instructions' => '<string>',
'chain_poll_template' => [
'template' => '<string>',
'metric_system_prompt' => '<string>',
'metric_description' => '<string>',
'value_field_name' => 'rating',
'explanation_field_name' => 'explanation',
'metric_few_shot_examples' => [
[
'generation_prompt_and_response' => '<string>',
'evaluating_response' => '<string>'
]
],
'response_schema' => [
]
],
'user_prompt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Galileo-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/{scorer_id}/version/llm"
payload := strings.NewReader("{\n \"model_name\": \"<string>\",\n \"num_judges\": 123,\n \"scoreable_node_types\": [\n \"<string>\"\n ],\n \"cot_enabled\": true,\n \"instructions\": \"<string>\",\n \"chain_poll_template\": {\n \"template\": \"<string>\",\n \"metric_system_prompt\": \"<string>\",\n \"metric_description\": \"<string>\",\n \"value_field_name\": \"rating\",\n \"explanation_field_name\": \"explanation\",\n \"metric_few_shot_examples\": [\n {\n \"generation_prompt_and_response\": \"<string>\",\n \"evaluating_response\": \"<string>\"\n }\n ],\n \"response_schema\": {}\n },\n \"user_prompt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Galileo-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/{scorer_id}/version/llm")
.header("Galileo-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"model_name\": \"<string>\",\n \"num_judges\": 123,\n \"scoreable_node_types\": [\n \"<string>\"\n ],\n \"cot_enabled\": true,\n \"instructions\": \"<string>\",\n \"chain_poll_template\": {\n \"template\": \"<string>\",\n \"metric_system_prompt\": \"<string>\",\n \"metric_description\": \"<string>\",\n \"value_field_name\": \"rating\",\n \"explanation_field_name\": \"explanation\",\n \"metric_few_shot_examples\": [\n {\n \"generation_prompt_and_response\": \"<string>\",\n \"evaluating_response\": \"<string>\"\n }\n ],\n \"response_schema\": {}\n },\n \"user_prompt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/scorers/{scorer_id}/version/llm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Galileo-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model_name\": \"<string>\",\n \"num_judges\": 123,\n \"scoreable_node_types\": [\n \"<string>\"\n ],\n \"cot_enabled\": true,\n \"instructions\": \"<string>\",\n \"chain_poll_template\": {\n \"template\": \"<string>\",\n \"metric_system_prompt\": \"<string>\",\n \"metric_description\": \"<string>\",\n \"value_field_name\": \"rating\",\n \"explanation_field_name\": \"explanation\",\n \"metric_few_shot_examples\": [\n {\n \"generation_prompt_and_response\": \"<string>\",\n \"evaluating_response\": \"<string>\"\n }\n ],\n \"response_schema\": {}\n },\n \"user_prompt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"version": 123,
"scorer_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"generated_scorer": {
"id": "<string>",
"name": "<string>",
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"created_by": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"scoreable_node_types": [],
"scorer_configuration": {
"model_alias": "gpt-4.1-mini",
"num_judges": 3,
"output_type": "boolean",
"scoreable_node_types": [
"<string>"
],
"cot_enabled": false,
"ground_truth": false,
"multimodal_capabilities": []
},
"instructions": "<string>",
"user_prompt": "<string>"
},
"registered_scorer": {
"id": "<string>",
"name": "<string>",
"score_type": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"scoreable_node_types": [
"<string>"
]
},
"finetuned_scorer": {
"id": "<string>",
"name": "<string>",
"lora_task_id": 123,
"prompt": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"lora_weights_path": "<string>",
"class_name_to_vocab_ix": {}
},
"model_name": "<string>",
"num_judges": 123,
"scoreable_node_types": [
"<string>"
],
"cot_enabled": true,
"chain_poll_template": {
"template": "<string>",
"metric_system_prompt": "<string>",
"metric_description": "<string>",
"value_field_name": "rating",
"explanation_field_name": "explanation",
"metric_few_shot_examples": [
{
"generation_prompt_and_response": "<string>",
"evaluating_response": "<string>"
}
],
"response_schema": {}
},
"allowed_model": true,
"created_by": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
ClassicAPIKeyHeaderAPIKeyHeaderOAuth2PasswordBearerHTTPBasic
Path Parameters
Body
application/json
Enumeration of output types.
Available options:
boolean, categorical, count, discrete, freeform, percentage, multilabel, retrieved_chunk_list_boolean, boolean_multilabel Enumeration of input types.
Available options:
basic, llm_spans, retriever_spans, sessions_normalized, sessions_trace_io_only, tool_spans, trace_input_only, trace_io_only, trace_normalized, trace_output_only, agent_spans, workflow_spans Template for a chainpoll metric prompt, containing all the info necessary to send a chainpoll prompt.
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Enumeration of output types.
Available options:
boolean, categorical, count, discrete, freeform, percentage, multilabel, retrieved_chunk_list_boolean, boolean_multilabel What type of input to use for model-based scorers (sessions_normalized, trace_io_only, etc.).
Available options:
basic, llm_spans, retriever_spans, sessions_normalized, sessions_trace_io_only, tool_spans, trace_input_only, trace_io_only, trace_normalized, trace_output_only, agent_spans, workflow_spans Template for a chainpoll metric prompt, containing all the info necessary to send a chainpoll prompt.
Show child attributes
Show child attributes
Was this page helpful?
⌘I