A relevancy score expresses how well an item matches a user’s query. A search engine can calculate a score for each query–item pair and rank the candidates accordingly. Before scoring, hard requirements such as file format, image width, and price can reduce the candidate set. section 3.4.2
relevancy = f(encode_text(query), encode_image(item))
A query and an image can be encoded separately before a function produces their relevancy score. section 3.4.2
For a photo search, labelers can assign scores based on how closely images match queries. Past queries paired with clicks offer another signal of relevance and interest; time on the photo page and subsequent purchases can add context. Query–image pairs for labeling can initially be sampled randomly, then selected using active learning. section 6.7.2
Several baselines can produce a score, with different tradeoffs:
- A simple linear model can use TF-IDF features from queries and photo metadata. It is easy to train and debug, but does not use the images themselves. section 8.6.2
- A pretrained CLIP model can use query–image output as a score. A two-component score can also combine query–image and query–description distances. section 8.6.2
- A unified score can incorporate additional signals, such as user and document features. A weighted sum offers one way to combine distances, using a small linear model. section 11.5.2
Scoring still leaves design questions: how to encode queries and items, choose a scoring function, measure relevance, and incorporate feedback. More features may improve the system, but they also expand its scope, so it helps to leave room for later extensions. section 3.4.2 section 11.5.2
