Feature logging records computed feature values for each labeled query-document pair so a learning-to-rank model can learn how ranking signals relate to relevance. A feature may describe the document, query, or their relationship, provided the search engine can compute it quickly. section 10.3
A practical feature-logging workflow connects judgments to search-engine computations:
- Start with a judgment list containing queries, graded documents, and relevance labels. section 10.1.2
- Define and load features such as title matching, overview matching, release year, commute distance, or knowledge-graph relationships. section 10.3
- Request feature values for every graded document associated with each unique query, passing query-time information required by the features. section 10.3.2
- Attach returned values to the judgments in feature-store order, producing training rows for model training and evaluation. section 10.3.2
Logging features for “social network”
For one relevant movie and three irrelevant movies, the search engine returns title_bm25, overview_bm25, and release_year. The relevant The Social Network row becomes [8.243603, 3.8143613, 2010.0], while each competing document receives its own vector. These vectors remain paired with their grades so an algorithm can learn relative ranking patterns. section 10.3 section 10.3.2
Listing 10.5 Logging feature values for social network results
ids = ["37799", "267752", "38408", "28303"] #1
options = {"keywords": "social network"}
ltr.get_logged_features("movie_model", ids, #2
options=options, ) #2
fields=["id", "title"]) #2
display(response)
Inspect an engine-specific request that retrieves logged features for selected document IDs, using a feature store and query-time keywords. section 10.3.2
