Skip to main content

EvalFilter

Typed comparison operand and column selector for querying evaluation-provider records.

Usage profiles​

UsageFields and validation
In requestsView fields

In requests​

API JSON uses JSON field names (camelCase).

FieldTypePresenceMeaning
typestring (EVAL_FILTER_TYPE_DATETIME, EVAL_FILTER_TYPE_STRING, EVAL_FILTER_TYPE_NUMBER, EVAL_FILTER_TYPE_STRING_OPTIONS, EVAL_FILTER_TYPE_CATEGORY_OPTIONS, EVAL_FILTER_TYPE_ARRAY_OPTIONS, EVAL_FILTER_TYPE_BOOLEAN, EVAL_FILTER_TYPE_NULL, EVAL_FILTER_TYPE_STRING_OBJECT, EVAL_FILTER_TYPE_NUMBER_OBJECT, EVAL_FILTER_TYPE_BOOLEAN_OBJECT) or integer (int32) (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)Required in requestsDiscriminator selecting the evaluation filter’s operand type.
columnstringRequired in requestsEvaluation filter column identifier, for example traceName, scores_avg, metadata or level. Minimum length: 1.
operatorstringRequired in requestsOperator accepted for the selected filter type, for example contains, any of or >=. Minimum length: 1.
keystringOptionalSet only for the *_OBJECT types: the metadata key or score name.
stringValuestringOptionalExactly one value field is meaningful, chosen by type — flat siblings rather than a oneof, per repo convention.
numberValuenumber (double) or string (NaN, Infinity, -Infinity)OptionalNumeric operand used by the evaluation filter.
booleanValuebooleanOptionalBoolean operand or score value used by the selected evaluation type.
stringValuesArray of stringOptionalThe *_OPTIONS types.
timeValuestring (date-time)OptionalTimestamp operand used by the evaluation filter.

Values of type​

Operand shape and comparison vocabulary for an evaluation-record filter.

ValueNo.FormMeaning
EVAL_FILTER_TYPE_DATETIME1CanonicalCompare a date-time value using ordered comparisons.
EVAL_FILTER_TYPE_STRING2CanonicalCompare text using equality or supported substring and prefix or suffix operators.
EVAL_FILTER_TYPE_NUMBER3CanonicalCompare a numeric value using equality or ordered comparisons.
EVAL_FILTER_TYPE_STRING_OPTIONS4CanonicalMatch a string against a set of allowed or excluded choices.
EVAL_FILTER_TYPE_CATEGORY_OPTIONS5CanonicalMatch a category against a set of allowed or excluded choices.
EVAL_FILTER_TYPE_ARRAY_OPTIONS6CanonicalMatch array contents using any-of, none-of or all-of selection.
EVAL_FILTER_TYPE_BOOLEAN7CanonicalCompare a boolean value for equality or inequality.
EVAL_FILTER_TYPE_NULL8CanonicalTest whether the selected property is null or non-null.
EVAL_FILTER_TYPE_STRING_OBJECT9CanonicalCompare a string-valued member identified by a key, such as a metadata property.
EVAL_FILTER_TYPE_NUMBER_OBJECT10CanonicalCompare a numeric member identified by a key, such as a named score.
EVAL_FILTER_TYPE_BOOLEAN_OBJECT11CanonicalCompare a boolean member identified by a key.

Request validation​

These rules apply when this value is supplied in a request. Request validation does not guarantee that response fields are present or satisfy the same rules.

Applies toRuleRequirement
typeDefined enum valuetrue
typeDisallowed values0
columnMinimum length1
operatorMinimum length1

Where used​

ReferenceRelationship
List observationsPOST /api/v1/evals/list-observations
List scoresPOST /api/v1/evals/list-scores
List sessionsPOST /api/v1/evals/list-sessions
List tracesPOST /api/v1/evals/list-traces

Download the public reference contract.

Document: DOC-API-MODEL-eval-filter.