메인 콘텐츠로 건너뛰기
POST
/
v2
/
{entity}
/
{project}
/
eval_results
/
query
평가 결과 쿼리
curl --request POST \
  --url https://api.example.com/v2/{entity}/{project}/eval_results/query \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "evaluation_call_ids": [
    "<string>"
  ],
  "evaluation_run_ids": [
    "<string>"
  ],
  "filters": [
    {
      "query": {
        "$expr": {
          "$and": [
            {
              "$literal": "<string>"
            }
          ]
        }
      },
      "evaluation_call_id": "<string>"
    }
  ],
  "include_predict_and_score_children": true,
  "include_raw_data_rows": false,
  "include_rows": true,
  "include_summary": false,
  "limit": 123,
  "offset": 0,
  "require_intersection": false,
  "resolve_row_refs": false,
  "sort_by": [
    {
      "field": "<string>",
      "evaluation_call_id": "<string>",
      "mode": "value"
    }
  ],
  "summary_require_intersection": true
}
'
import requests

url = "https://api.example.com/v2/{entity}/{project}/eval_results/query"

payload = {
"evaluation_call_ids": ["<string>"],
"evaluation_run_ids": ["<string>"],
"filters": [
{
"query": { "$expr": { "$and": [{ "$literal": "<string>" }] } },
"evaluation_call_id": "<string>"
}
],
"include_predict_and_score_children": True,
"include_raw_data_rows": False,
"include_rows": True,
"include_summary": False,
"limit": 123,
"offset": 0,
"require_intersection": False,
"resolve_row_refs": False,
"sort_by": [
{
"field": "<string>",
"evaluation_call_id": "<string>",
"mode": "value"
}
],
"summary_require_intersection": True
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
evaluation_call_ids: ['<string>'],
evaluation_run_ids: ['<string>'],
filters: [
{
query: {$expr: {$and: [{$literal: '<string>'}]}},
evaluation_call_id: '<string>'
}
],
include_predict_and_score_children: true,
include_raw_data_rows: false,
include_rows: true,
include_summary: false,
limit: 123,
offset: 0,
require_intersection: false,
resolve_row_refs: false,
sort_by: [{field: '<string>', evaluation_call_id: '<string>', mode: 'value'}],
summary_require_intersection: true
})
};

fetch('https://api.example.com/v2/{entity}/{project}/eval_results/query', 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.example.com/v2/{entity}/{project}/eval_results/query",
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([
'evaluation_call_ids' => [
'<string>'
],
'evaluation_run_ids' => [
'<string>'
],
'filters' => [
[
'query' => [
'$expr' => [
'$and' => [
[
'$literal' => '<string>'
]
]
]
],
'evaluation_call_id' => '<string>'
]
],
'include_predict_and_score_children' => true,
'include_raw_data_rows' => false,
'include_rows' => true,
'include_summary' => false,
'limit' => 123,
'offset' => 0,
'require_intersection' => false,
'resolve_row_refs' => false,
'sort_by' => [
[
'field' => '<string>',
'evaluation_call_id' => '<string>',
'mode' => 'value'
]
],
'summary_require_intersection' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);

$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.example.com/v2/{entity}/{project}/eval_results/query"

payload := strings.NewReader("{\n \"evaluation_call_ids\": [\n \"<string>\"\n ],\n \"evaluation_run_ids\": [\n \"<string>\"\n ],\n \"filters\": [\n {\n \"query\": {\n \"$expr\": {\n \"$and\": [\n {\n \"$literal\": \"<string>\"\n }\n ]\n }\n },\n \"evaluation_call_id\": \"<string>\"\n }\n ],\n \"include_predict_and_score_children\": true,\n \"include_raw_data_rows\": false,\n \"include_rows\": true,\n \"include_summary\": false,\n \"limit\": 123,\n \"offset\": 0,\n \"require_intersection\": false,\n \"resolve_row_refs\": false,\n \"sort_by\": [\n {\n \"field\": \"<string>\",\n \"evaluation_call_id\": \"<string>\",\n \"mode\": \"value\"\n }\n ],\n \"summary_require_intersection\": true\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Basic <encoded-value>")
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.example.com/v2/{entity}/{project}/eval_results/query")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"evaluation_call_ids\": [\n \"<string>\"\n ],\n \"evaluation_run_ids\": [\n \"<string>\"\n ],\n \"filters\": [\n {\n \"query\": {\n \"$expr\": {\n \"$and\": [\n {\n \"$literal\": \"<string>\"\n }\n ]\n }\n },\n \"evaluation_call_id\": \"<string>\"\n }\n ],\n \"include_predict_and_score_children\": true,\n \"include_raw_data_rows\": false,\n \"include_rows\": true,\n \"include_summary\": false,\n \"limit\": 123,\n \"offset\": 0,\n \"require_intersection\": false,\n \"resolve_row_refs\": false,\n \"sort_by\": [\n {\n \"field\": \"<string>\",\n \"evaluation_call_id\": \"<string>\",\n \"mode\": \"value\"\n }\n ],\n \"summary_require_intersection\": true\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v2/{entity}/{project}/eval_results/query")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"evaluation_call_ids\": [\n \"<string>\"\n ],\n \"evaluation_run_ids\": [\n \"<string>\"\n ],\n \"filters\": [\n {\n \"query\": {\n \"$expr\": {\n \"$and\": [\n {\n \"$literal\": \"<string>\"\n }\n ]\n }\n },\n \"evaluation_call_id\": \"<string>\"\n }\n ],\n \"include_predict_and_score_children\": true,\n \"include_raw_data_rows\": false,\n \"include_rows\": true,\n \"include_summary\": false,\n \"limit\": 123,\n \"offset\": 0,\n \"require_intersection\": false,\n \"resolve_row_refs\": false,\n \"sort_by\": [\n {\n \"field\": \"<string>\",\n \"evaluation_call_id\": \"<string>\",\n \"mode\": \"value\"\n }\n ],\n \"summary_require_intersection\": true\n}"

response = http.request(request)
puts response.read_body
{
  "rows": [
    {
      "row_digest": "<string>",
      "evaluations": [
        {
          "evaluation_call_id": "<string>",
          "trials": [
            {
              "predict_and_score_call_id": "<string>",
              "genai_span_ref": [
                {
                  "span_id": "<string>",
                  "trace_id": "<string>"
                }
              ],
              "model_latency_seconds": 123,
              "model_output": null,
              "predict_call_id": "<string>",
              "scorer_call_ids": {},
              "scores": {},
              "total_tokens": 123
            }
          ]
        }
      ],
      "raw_data_row": null
    }
  ],
  "total_rows": 123,
  "summary": {
    "evaluations": [
      {
        "evaluation_call_id": "<string>",
        "display_name": "<string>",
        "evaluation_ref": "<string>",
        "model_ref": "<string>",
        "scorer_stats": [
          {
            "scorer_key": "<string>",
            "numeric_count": 0,
            "numeric_mean": 123,
            "pass_known_count": 0,
            "pass_rate": 123,
            "pass_signal_coverage": 123,
            "pass_true_count": 0,
            "path": "<string>",
            "trial_count": 0
          }
        ],
        "started_at": "<string>",
        "trace_id": "<string>",
        "trial_count": 0
      }
    ],
    "row_count": 0
  },
  "warnings": [
    "<string>"
  ]
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

인증

Authorization
string
header
필수

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

경로 매개변수

entity
string
필수
project
string
필수

본문

application/json
evaluation_call_ids
string[] | null

포함할 Evaluation 루트 호출 ID입니다.

evaluation_run_ids
string[] | null

Evaluation Runs API의 evaluation 호출 ID에 대한 별칭입니다.

filters
EvalResultsFilter · object[] | null

그룹화된 행에 적용되는 필터입니다. 여러 필터는 AND로 결합됩니다.

include_predict_and_score_children
boolean
기본값:true

true(기본값)로 설정하면 각 predict_and_score Call의 하위 Call(predict/score)을 가져와 predict_call_id, scorer_call_ids 및 더 정확한 지연 시간/토큰 데이터를 채웁니다. false이면 이러한 필드는 predict_and_score Call 자체에서 파생됩니다(predict_call_id 및 scorer_call_ids는 null/empty가 됨).

include_raw_data_rows
boolean
기본값:false

true이면 각 결과 행의 raw_data_row를 채웁니다. 인라인 행은 해당 dict 값으로 반환되며, dataset를 참조하는 행은 resolve_row_refs도 true가 아닌 한 ref 문자열로 반환됩니다.

include_rows
boolean
기본값:true

true이면 그룹화된 행/트라이얼 데이터를 rows에 포함하고, 요청된 행 수준 뷰에 대해 total_rows를 계산합니다.

include_summary
boolean
기본값:false

true이면 집계된 scorer/evaluation summary 데이터를 summary에 포함합니다.

limit
integer | null

그룹화와 교집합 적용 후 적용되는 선택적 행 수준 페이지 크기입니다.

offset
integer
기본값:0

그룹화와 교집합 적용 후 적용되는 선택적 행 수준 페이지 오프셋입니다.

require_intersection
boolean
기본값:false

true이면 요청된 모든 evaluation에 있는 행만 포함합니다.

resolve_row_refs
boolean
기본값:false

true이면(include_raw_data_rows=True 필요) 테이블 조회를 통해 dataset 행 참조 문자열을 실제 행 데이터로 해석합니다. false이면 dataset 행 ref를 있는 그대로 반환합니다.

sort_by
EvalResultsSortBy · object[] | null

결과 행의 정렬 지정입니다. 지원되는 필드 접두사: scores., inputs., outputs.. null이면 행이 row_digest ASC 기준으로 정렬됩니다.

summary_require_intersection
boolean | null

summary 섹션에 대한 선택적 교집합 동작입니다. null이면 require_intersection 값을 사용합니다.

응답

성공 응답

rows
EvalResultsRow · object[]
필수
total_rows
integer
필수
summary
EvalResultsSummaryRes · object | null
warnings
string[]

치명적이지 않은 경고입니다(예: dataset 행 ref를 해석하지 못한 경우).