23/36
Part 3 of 5 · Ranking and featuresLearn and do

Group features by how fresh they must be

The ranker's features don't all change at the same speed, and that decides where each one is computed.

Freshness decides where a feature is computed

SourceHoldsReaches the ranker
daily batch job, into a feature storelisting, guest, engagementper request
stream of clicks, into a session storeclicked, skipped, seconds oldper request
the request itselfquery, price for these dates, cross featuresper request

Group features by family and by how fresh they need to be. The freshness column decides where each one is computed and stored.

FamilyExamplesFreshnessWatch out for
ListingPrice for these dates, location, capacity, amenities, rating, photo qualityDaily, price per requestPrice depends on the dates searched
Listing engagementPast bookings, views, conversion rate, host acceptanceDailyMissing for new listings
GuestPast bookings, typical price, party size, deviceDailyMissing for logged-out guests
QueryLocation, check-in, nights, lead time, guests, filters, map zoomPer requestNo text, so this is all the intent you get
SessionListings clicked and skipped, similarity to themSecondsThe freshest signal you have
CrossPrice against this guest's usual price, distance to the map centerPer requestComputed at scoring time

In the editor, write cross_features(listing, guest, query): the two features in the table's Cross row, price_ratio and km_to_center. A listing holds its price per night by date and its map position in km, a guest holds a usual price or is None when logged out, and a query holds its nights and the map's center.