News for hackers. Stuff that matters.
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.