logoalt Hacker News

Majromaxtoday at 1:44 PM1 replyview on HN

> In the notebook, I compute a MiniLM embedding of every real Wayfair classification. I compute the embedding of the fake, hypothetical embedding from the LLM. I then dot product the fake embedding into the real ones to find the most similar. Producing: [the right answer]

Isn't this begging the question that the hallucinated classification will be more selective with respect to the real schema than the query itself? What would the dot product of <E(search query), E(schema)> have given?

Even if that is too vague, smaller LLMs are capable rerankers; return the top N matching true categories and ask for a contextual ordering.


Replies

softwaredougtoday at 2:38 PM

Yes what you're describing is a classic way of doing query understanding.

I've found, though, getting it in the language of the vocabulary has generally improved performance.

Further, when searching for "blue shoes" you want to separate the color from the item type. So its useful to have a dumb LLM do this for you. And with the LLM in the loop, its further useful to get it into the language of the taxonomy to improve embedding retrieval accuracy.

There are of course many ways to skin the cat here :)