Retrieve Results of an Evaluation Run Prompt
client.Agents.EvaluationRuns.GetResults(ctx, evaluationRunUuid, promptID) (*AgentEvaluationRunGetResultsResponse, error)
/v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}
To retrieve results of an evaluation run, send a GET request to /v2/gen-ai/evaluation_runs/{evaluation_run_uuid}/results/{prompt_id}.
Parameters
evaluationRunUuid string
promptID int64
Returns
Retrieve Results of an Evaluation Run Prompt
package main
import (
"context"
"fmt"
"github.com/stainless-sdks/-go"
"github.com/stainless-sdks/-go/option"
)
func main() {
client := gradient.NewClient(
option.WithAccessToken("My Access Token"),
)
response, err := client.Agents.EvaluationRuns.GetResults(
context.TODO(),
`"123e4567-e89b-12d3-a456-426614174000"`,
int64(1),
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Prompt)
}
{
"prompt": {
"evaluation_trace_spans": [
{
"created_at": "2023-01-01T00:00:00Z",
"input": {},
"name": "example name",
"output": {},
"retriever_chunks": [
{
"chunk_usage_pct": 123,
"chunk_used": true,
"index_uuid": "123e4567-e89b-12d3-a456-426614174000",
"source_name": "example name",
"text": "example string"
}
],
"span_level_metric_results": [
{
"error_description": "example string",
"metric_name": "example name",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"number_value": 123,
"reasoning": "example string",
"string_value": "example string"
}
],
"type": "TRACE_SPAN_TYPE_UNKNOWN"
}
],
"ground_truth": "example string",
"input": "example string",
"input_tokens": "12345",
"output": "example string",
"output_tokens": "12345",
"prompt_chunks": [
{
"chunk_usage_pct": 123,
"chunk_used": true,
"index_uuid": "123e4567-e89b-12d3-a456-426614174000",
"source_name": "example name",
"text": "example string"
}
],
"prompt_id": 123,
"prompt_level_metric_results": [
{
"error_description": "example string",
"metric_name": "example name",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"number_value": 123,
"reasoning": "example string",
"string_value": "example string"
}
],
"trace_id": "123e4567-e89b-12d3-a456-426614174000"
}
}Returns Examples
{
"prompt": {
"evaluation_trace_spans": [
{
"created_at": "2023-01-01T00:00:00Z",
"input": {},
"name": "example name",
"output": {},
"retriever_chunks": [
{
"chunk_usage_pct": 123,
"chunk_used": true,
"index_uuid": "123e4567-e89b-12d3-a456-426614174000",
"source_name": "example name",
"text": "example string"
}
],
"span_level_metric_results": [
{
"error_description": "example string",
"metric_name": "example name",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"number_value": 123,
"reasoning": "example string",
"string_value": "example string"
}
],
"type": "TRACE_SPAN_TYPE_UNKNOWN"
}
],
"ground_truth": "example string",
"input": "example string",
"input_tokens": "12345",
"output": "example string",
"output_tokens": "12345",
"prompt_chunks": [
{
"chunk_usage_pct": 123,
"chunk_used": true,
"index_uuid": "123e4567-e89b-12d3-a456-426614174000",
"source_name": "example name",
"text": "example string"
}
],
"prompt_id": 123,
"prompt_level_metric_results": [
{
"error_description": "example string",
"metric_name": "example name",
"metric_value_type": "METRIC_VALUE_TYPE_UNSPECIFIED",
"number_value": 123,
"reasoning": "example string",
"string_value": "example string"
}
],
"trace_id": "123e4567-e89b-12d3-a456-426614174000"
}
}