Propose Classifier metrics for an LLM judge revision
curl --request POST \
--url https://api.galtea.ai/v2/revisions/{id}/classifier-conversion \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/v2/revisions/{id}/classifier-conversion"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/v2/revisions/{id}/classifier-conversion', 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.galtea.ai/v2/revisions/{id}/classifier-conversion",
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.galtea.ai/v2/revisions/{id}/classifier-conversion"
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.galtea.ai/v2/revisions/{id}/classifier-conversion")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/v2/revisions/{id}/classifier-conversion")
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{
"proposals": [
{
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
],
"label": "<string>",
"text": "<string>"
}
],
"merged": {
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
]
},
"refused": [
{
"text": "<string>",
"reason": "<string>",
"suggestion": "<string>"
}
],
"specifications": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"productId": "<string>"
}
]
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Propose Classifier metrics for an LLM judge revision
Splits the judge prompt of an LLM judge (PARTIAL_PROMPT) revision into one classifier question per condition, plus one question listing them all when every condition always applies. Persists nothing, consumes no credits, and leaves the revision unchanged. Answers 400 where the deployment does not enable Classifier metrics. The id is a revision id. A metric id answers 404.
POST
/
v2
/
revisions
/
{id}
/
classifier-conversion
Propose Classifier metrics for an LLM judge revision
curl --request POST \
--url https://api.galtea.ai/v2/revisions/{id}/classifier-conversion \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/v2/revisions/{id}/classifier-conversion"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/v2/revisions/{id}/classifier-conversion', 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.galtea.ai/v2/revisions/{id}/classifier-conversion",
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.galtea.ai/v2/revisions/{id}/classifier-conversion"
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.galtea.ai/v2/revisions/{id}/classifier-conversion")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/v2/revisions/{id}/classifier-conversion")
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{
"proposals": [
{
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
],
"label": "<string>",
"text": "<string>"
}
],
"merged": {
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
]
},
"refused": [
{
"text": "<string>",
"reason": "<string>",
"suggestion": "<string>"
}
],
"specifications": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"productId": "<string>"
}
]
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Authorizations
Path Parameters
Response
The proposed classifier metrics