Re:Show HN: Autolicious – AI-powered bookmark cataloging Chr...
by ayaanmomin on Monday October 23, 2023 @08:53PM
(#37993683)
"train the query encoder and doc encoder to be closer in their embedding space using click data" <- Any papers/resources you know where I can learn more about this process?
Re:Show HN: Autolicious – AI-powered bookmark cataloging Chr...
by janalsncm on Monday October 23, 2023 @09:35PM
(#37993948)
Triplet loss.
https://pytorch.org/docs/stable/generated/torch.nn.TripletMa...
Triplet loss takes an anchor, positive, and negative. In this case the anchor is your query, the positive is a similar doc, and the negative is a dissimilar doc. When you train, backpropagate the loss to both the doc and the query encoder.
You’re right in saying there’s not enough semantic meaning in the text of the query. The domain of queries and the domain of documents are very different. That’s why a real retrieval system will train the query encoder and doc encoder to be closer in their embedding space using click data. This is what Google is doing.