Live data from Hacker News

Don't classify, hallucinate

softwaredoug.com

61–70 of 118 posts

Re: Don't classify, hallucinate

#61
post #50

I can’t believe programming is now at the stage where advice like "first have the computer give you totally wrong answers, then just find a function that maps the wrong answers to the correct ones!" is a thing.

the trick is that it's not totally wrong to start with

Re: Don't classify, hallucinate

#62
post #50

I can’t believe programming is now at the stage where advice like "first have the computer give you totally wrong answers, then just find a function that maps the wrong answers to the correct ones!" is a thing.

This is so similar to human decision-making though. First I my innate experience to approximate to what I expect is right, then I map that to the truth.

It's the same for so many things:

- reading documentation (what do I expect this function to be called?)

- finding clothes in a shop (something long-sleeved and light)

- picking the fridge for dinner

- finding a book in the library...

so many analogues where I'm not coming cold to a choice.

Re: Don't classify, hallucinate

#63
post #61
post #50

I can’t believe programming is now at the stage where advice like "first have the computer give you totally wrong answers, then just find a function that maps the wrong answers to the correct ones!" is a thing.

the trick is that it's not totally wrong to start with

If there is no truth, there is no wrong.

Re: Don't classify, hallucinate

#64

Earlier quoted context omitted.

Is there a solution you are using to solve this that is more accurate and cost effective? I'm working through it now so would be curious

Is scraping and putting this in a structured format too inaccurate or expensive?

That's the whole problem. If you have tons (100s of thousands or more) of labels, then you have "structured" data, but how do you correctly classify that scraped item into the correct label?

Putting all the labels into the LLM is super expensive per call when you have millions of items to classify.

You can't reduce the number of labels becasue they are correctly organizes/structured. This class of problem exists in many different domains.

Re: Don't classify, hallucinate

#65
post #50

I can’t believe programming is now at the stage where advice like "first have the computer give you totally wrong answers, then just find a function that maps the wrong answers to the correct ones!" is a thing.

I can't believe people spend their lives finding lazier ways to classify a bunch of objects that will end up heaped in dormitory dumpsters across the US next spring.

Re: Don't classify, hallucinate

#66
post #38

Nice trick. Couldn't you embed the query though, compare it to the embedding of the categories, then ship only categories that are close to it in the prompt to a smaller model?

It's basically a variation of HyDE (Hypothetical Document Embeddings), and the rationale is that the embedding of the query is not necessarily close to the embedding of the answer. If you generate a hallucinated answer, it can line up with the actual document better (in the embedding space, via BM25, or hybrid).

But honestly, it only works for common knowledge that's already in the LLM. If the target document contains very niche or private information, then the hallucinated answer's embedding can be even farther away than the query's.

Re: Don't classify, hallucinate

#67
New embedding models support queries, so you don’t need to hallucinate a document before finding the nearest neighbor. Curious how it compares to this approach since you’d get to skip the LLM altogether.

Re: Don't classify, hallucinate

#68
I did something similar 10 years ago, but instead of llms I used word2vec to calculate a embeddings of product descriptions and map those to existing categories. The LLM approach is very likely better, but I'm curious what the cost difference is.

Re: Don't classify, hallucinate

#69
post #50

I can’t believe programming is now at the stage where advice like "first have the computer give you totally wrong answers, then just find a function that maps the wrong answers to the correct ones!" is a thing.

[deleted]

Re: Don't classify, hallucinate

#70

Earlier quoted context omitted.

Is scraping and putting this in a structured format too inaccurate or expensive?

That's the whole problem. If you have tons (100s of thousands or more) of labels, then you have "structured" data, but how do you correctly classify that scraped item into the correct label? Putting all the labels into the LLM is super expensive per call when you have millions of items to classify. You can't reduce the number of labels becasue they are correctly organizes/structured. This class of problem exists in m…

100s of thousand? In that case I would label about a 100 by hand and train a supervised learning model.

This problem has also been solved for 3 decades now.

Post reply on HN