EvalFilter
Typed comparison operand and column selector for querying evaluation-provider records.
Usage profiles
| Usage | Fields and validation |
|---|---|
| In requests | View fields |
In requests
API JSON uses JSON field names (camelCase).
| Field | Type | Presence | Meaning |
|---|---|---|---|
type | string (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 requests | Discriminator selecting the evaluation filter’s operand type. |
column | string | Required in requests | Evaluation filter column identifier, for example traceName, scores_avg, metadata or level. Minimum length: 1. |
operator | string | Required in requests | Operator accepted for the selected filter type, for example contains, any of or >=. Minimum length: 1. |
key | string | Optional | Set only for the *_OBJECT types: the metadata key or score name. |
stringValue | string | Optional | Exactly one value field is meaningful, chosen by type — flat siblings rather than a oneof, per repo convention. |
numberValue | number (double) or string (NaN, Infinity, -Infinity) | Optional | Numeric operand used by the evaluation filter. |
booleanValue | boolean | Optional | Boolean operand or score value used by the selected evaluation type. |
stringValues | Array of string | Optional | The *_OPTIONS types. |
timeValue | string (date-time) | Optional | Timestamp operand used by the evaluation filter. |
Values of type
Operand shape and comparison vocabulary for an evaluation-record filter.
| Value | No. | Form | Meaning |
|---|---|---|---|
EVAL_FILTER_TYPE_DATETIME | 1 | Canonical | Compare a date-time value using ordered comparisons. |
EVAL_FILTER_TYPE_STRING | 2 | Canonical | Compare text using equality or supported substring and prefix or suffix operators. |
EVAL_FILTER_TYPE_NUMBER | 3 | Canonical | Compare a numeric value using equality or ordered comparisons. |
EVAL_FILTER_TYPE_STRING_OPTIONS | 4 | Canonical | Match a string against a set of allowed or excluded choices. |
EVAL_FILTER_TYPE_CATEGORY_OPTIONS | 5 | Canonical | Match a category against a set of allowed or excluded choices. |
EVAL_FILTER_TYPE_ARRAY_OPTIONS | 6 | Canonical | Match array contents using any-of, none-of or all-of selection. |
EVAL_FILTER_TYPE_BOOLEAN | 7 | Canonical | Compare a boolean value for equality or inequality. |
EVAL_FILTER_TYPE_NULL | 8 | Canonical | Test whether the selected property is null or non-null. |
EVAL_FILTER_TYPE_STRING_OBJECT | 9 | Canonical | Compare a string-valued member identified by a key, such as a metadata property. |
EVAL_FILTER_TYPE_NUMBER_OBJECT | 10 | Canonical | Compare a numeric member identified by a key, such as a named score. |
EVAL_FILTER_TYPE_BOOLEAN_OBJECT | 11 | Canonical | Compare 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 to | Rule | Requirement |
|---|---|---|
type | Defined enum value | true |
type | Disallowed values | 0 |
column | Minimum length | 1 |
operator | Minimum length | 1 |
Where used
| Reference | Relationship |
|---|---|
| List observations | POST /api/v1/evals/list-observations |
| List scores | POST /api/v1/evals/list-scores |
| List sessions | POST /api/v1/evals/list-sessions |
| List traces | POST /api/v1/evals/list-traces |
Download the public reference contract.
Document: DOC-API-MODEL-eval-filter.