Chronological (Rule-Based)
warning
This is an article from the Shaped 1.0 documentation. The APIs have changed and information may be outdated. Go to Shaped 2.0 docs
Description
The Chronological policy ranks or scores items based on a specified timestamp feature associated with them. It allows sorting items from newest-to-oldest or oldest-to-newest. Useful for time-sensitive content like news feeds or event listings.
Policy Type: chronological
Supports: scoring_policy
Configuration Example
policy_configs:
scoring_policy:
policy_type: chronological
time_col: "item_creation_timestamp" # Name of the feature column containing the relevant timestamp.
ascending: false # Sort order: false = newest first (descending), true = oldest first (ascending).