Skip to main content
POST
/
v2
/
scorers
/
llm
/
validate
/
log_record
Validate Llm Scorer Log Record
curl --request POST \
  --url https://api.galileo.ai/v2/scorers/llm/validate/log_record \
  --header 'Content-Type: application/json' \
  --header 'Galileo-API-Key: <api-key>' \
  --data '
{
  "query": "<string>",
  "response": "<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": {}
  },
  "scorer_configuration": {
    "model_alias": "gpt-4.1-mini",
    "num_judges": 3,
    "output_type": "boolean",
    "scoreable_node_types": [
      "<string>"
    ],
    "cot_enabled": false,
    "ground_truth": false
  },
  "user_prompt": "<string>",
  "starting_token": 0,
  "limit": 100,
  "previous_last_row_id": "<string>",
  "log_stream_id": "<string>",
  "experiment_id": "<string>",
  "metrics_testing_id": "<string>",
  "filters": [
    {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  ],
  "filter_tree": {
    "filter": {
      "column_id": "<string>",
      "value": "<string>",
      "operator": "eq",
      "type": "id"
    }
  },
  "sort": {
    "column_id": "created_at",
    "ascending": false,
    "sort_type": "column"
  },
  "truncate_fields": false
}
'
{
  "metrics_experiment_id": "<string>"
}

Authorizations

Galileo-API-Key
string
header
required

Body

application/json

Request to validate a new LLM scorer based on a log record. This is used to create a new experiment with the copied log records to store the metric testing results.

query
string
required
response
string
required
chain_poll_template
ChainPollTemplate · object
required

Template for a chainpoll metric prompt, containing all the info necessary to send a chainpoll prompt.

scorer_configuration
GeneratedScorerConfiguration · object
required
user_prompt
string
required
starting_token
integer
default:0
limit
integer
default:100
previous_last_row_id
string<uuid4> | null
log_stream_id
string<uuid4> | null

Log stream id associated with the traces.

experiment_id
string<uuid4> | null

Experiment id associated with the traces.

metrics_testing_id
string<uuid4> | null

Metrics testing id associated with the traces.

filters
(LogRecordsIDFilter · object | LogRecordsDateFilter · object | LogRecordsNumberFilter · object | LogRecordsBooleanFilter · object | LogRecordsCollectionFilter · object | LogRecordsTextFilter · object)[]
filter_tree
FilterLeaf[Annotated[Union[LogRecordsIDFilter, LogRecordsDateFilter, LogRecordsNumberFilter, LogRecordsBooleanFilter, LogRecordsCollectionFilter, LogRecordsTextFilter], FieldInfo(annotation=NoneType, required=True, discriminator='type')]] · object
sort
LogRecordsSortClause · object
truncate_fields
boolean
default:false

Response

Successful Response

Response model for validating a new LLM scorer based on a log record.

Returns the uuid of the experiment created with the copied log records to store the metric testing results.

metrics_experiment_id
string<uuid4>
required