Our Python SDK got smarter. We developed a Typscript SDK too. We are updating our SDK code blocks. Python SDKhere.Typscript SDKhere.
Description
Patronus AI APIEvaluations

Search Evaluations

POST
/v1/evaluations/search
/v1/evaluations/search

The Authorization access token

Authorization

X-API-KEY<token>

In: header

Request Body

application/jsonRequired

log_id_in
Deprecated
Log Id In

Deprecated, please use 'filters' instead.

trace_id
Deprecated
Trace Id

Deprecated, please use 'filters' instead.

filtersFilters

curl -X POST "https://api.patronus.ai/v1/evaluations/search" \
  -H "X-API-KEY: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "log_id_in": [
      "string"
    ],
    "trace_id": "string",
    "filters": [
      {
        "field": "string",
        "operation": "starts_with",
        "value": {},
        "or_": [
          {
            "field": "string",
            "operation": "starts_with",
            "value": {},
            "or_": [
              {}
            ],
            "and_": [
              {
                "field": "string",
                "operation": "starts_with",
                "value": {},
                "or_": [
                  {}
                ],
                "and_": [
                  {}
                ]
              }
            ]
          }
        ],
        "and_": [
          {
            "field": "string",
            "operation": "starts_with",
            "value": {},
            "or_": [
              {
                "field": "string",
                "operation": "starts_with",
                "value": {},
                "or_": [
                  {}
                ],
                "and_": [
                  {}
                ]
              }
            ],
            "and_": [
              {}
            ]
          }
        ]
      }
    ]
  }'

Successful Response

{
  "evaluations": [
    {
      "id": "string",
      "log_id": "14b5977f-7a80-40ca-bb79-eca6c2abdb34",
      "created_at": "2019-08-24T14:15:22Z",
      "trace_id": "string",
      "span_id": "string",
      "app": "string",
      "project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
      "experiment_id": 0,
      "evaluator_family": "string",
      "evaluator_id": "string",
      "criteria_id": "2139c95e-d32e-497b-94da-8263b88244e6",
      "criteria": "string",
      "criteria_revision": 0,
      "explain_strategy": "string",
      "pass": true,
      "score": 0,
      "text_output": "string",
      "metadata": {},
      "explanation": "string",
      "evaluation_duration": "string",
      "explanation_duration": "string",
      "usage": {},
      "metric_name": "string",
      "metric_description": "string",
      "annotation_criteria_id": "e5d4b10b-c239-4b00-9620-5b9e8428bf29",
      "evaluation_type": "patronus_evaluation",
      "tags": {},
      "dataset_id": "string",
      "dataset_sample_id": "string",
      "feedback": "positive"
    }
  ]
}