MetadataOutput and declare fields with type annotations.
Basic schema
| Python type | Column type |
|---|---|
int | int |
float | float |
bool | bool |
str | string |
dict | json |
list[str] | enum_set |
Annotated column types
UseAnnotated with markers for special behaviors:
Enum(...)— restrict a string to allowed valuesJsonColumn()— store complex nested dataWithReasoning()— attach reasoning to a column
ReduceInput
Reduce functions receive aReduceInput[T] wrapping the child outputs. It behaves like a list with aggregation helpers:
| Method | Return type | Description |
|---|---|---|
avg(field) | float | Average of a numeric field |
sum(field) | float | Sum of a numeric field |
count_where(predicate) | int | Count matching outputs |
filter(predicate) | list[T] | Filter outputs by predicate |
get_values(field) | list | Extract a field from all outputs |