Live data from Hacker News

Don't classify, hallucinate

softwaredoug.com

21–30 of 118 posts

Re: Don't classify, hallucinate

#21
post #18
post #13

Earlier quoted context omitted.

Because that's structured data and structured data is usually hidden away from users _and_ machines. Product rarely want to be honest, unless it's B2B in a very competitive market (and even then!). So, yeah, it's not that they are bad, it's that there are few good sources of information. (Lets ignore for now that no one seems to agree to what should be the spec sheets)

An LLM can read websites, right? And turn them into structured data.

It can do that on run time, but it does not store data like that. The data is typically stored as embeddings in which it is hard to query data in a structured form. Example give me all products whose price is less than 200$ vs suggest me products for my spouse's birthday.

Re: Don't classify, hallucinate

#23
post #12

Can anyone explain why LLMs are so bad at finding products (their webpages) with given specifications? You'd think they would have solved it by now.

Amazon Rufus has been mildly successful for me. I think the failures I've experienced with it are mostly because the product I'm looking for doesn't exist in the catalog.

Re: Don't classify, hallucinate

#25
post #13
post #12

Can anyone explain why LLMs are so bad at finding products (their webpages) with given specifications? You'd think they would have solved it by now.

Because that's structured data and structured data is usually hidden away from users _and_ machines. Product rarely want to be honest, unless it's B2B in a very competitive market (and even then!). So, yeah, it's not that they are bad, it's that there are few good sources of information. (Lets ignore for now that no one seems to agree to what should be the spec sheets)

It gets worse: shopping agents are hostile adversaries to Amazon unless they're paying Amazon and they've agreed to be friendly agents. No agent that won't betray you to an Amazon pricing strategy is going to be allowed access to Amazon structured data. They might even be fed poisoned data to discredit them.

But you'll be amazed by the abundance.

Re: Don't classify, hallucinate

#26
post #23
post #12

Can anyone explain why LLMs are so bad at finding products (their webpages) with given specifications? You'd think they would have solved it by now.

Amazon Rufus has been mildly successful for me. I think the failures I've experienced with it are mostly because the product I'm looking for doesn't exist in the catalog.

It's been an absolute fucking disaster for me. It hallucinates endlessly and its searches are terrible. It even managed to confidently gaslight me about there being a VAT invoice available for a specific product.

I noticed yesterday when browsing on mobile that there used to be a box where I could search reviews and it got swapped with a Rufus box. I guess somebody needs to juice their engagement numbers for an investor briefing.

honestly, Amazon doesnt even need AI it just needs a better UI, more metadata for its products and to make reviews less scammy.

Re: Don't classify, hallucinate

#27
post #8

I would propose the following, query vector store for 10 closest categories based on a query, feed it to an LLM, in the prompt ask it to produce a single digit 0-9 representing the number of the most appropriate choice. Use plain text prompt, dont inflate token count with JSON. There you go, you just drastically reduced the output pricing. Additionally you could experiment with a reranker instead of an LLM or after r…

Or press 9 to hear these options again

Re: Don't classify, hallucinate

#28
Just this week I tried doing something similar with a nasty vibe-coded codebase I was trying to organize. I had Gemini Flash 3.6 classify each function/method in a similar way, giving a few plausible classifications for each (one agent per method).

It didn't end up being very useful - I ran a comparison where I just had a bigger agent do the organization in a more straightforward way, and that had better results.

I did find that Flash 3.6 High was >9x faster than Luna xhigh for this task, and got very similar results, though.

Re: Don't classify, hallucinate

#29
post #18

Earlier quoted context omitted.

An LLM can read websites, right? And turn them into structured data.

It can do that on run time, but it does not store data like that. The data is typically stored as embeddings in which it is hard to query data in a structured form. Example give me all products whose price is less than 200$ vs suggest me products for my spouse's birthday.

Then they shouldn't store the data as embeddings.

Instead: use an LLM to build a large (old-school) database of products with all their specifications. The LLM can also build the schema for that database as it finds more data.

Then use an LLM to query that database based on the user's specifications (+ add some intelligence to find nice suggestions for a birthday if wanted, but I'd consider that an extra).

Re: Don't classify, hallucinate

#30
> 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 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.

Post reply on HN