Live data from Hacker News

Don't classify, hallucinate

softwaredoug.com

91–100 of 118 posts

Re: Don't classify, hallucinate

#91
Nice. I heard something similar years ago. Instead of doing a RAG search based on the question, first hallucinate a plausible answer, and then use that as the query...

Re: Don't classify, hallucinate

#93
post #75

Earlier quoted context omitted.

> On two occasions I have been asked, – "Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?" ... I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question. He clearly didn't know enough about vector embeddings.

Unironically, LLM is absolutely amazing at giving you the right answers when you put in wrong input, compared to every other algorithm ever invented.

Yeah they solved the main issue I had with Google. "I remember this exact thing, but not exactly how it was phrased..."

Except not as much as I'd like... they often also don't know what the hell I'm talking about, and it still takes them twenty minutes of Googling to find the right page!

Re: Don't classify, hallucinate

#94
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

#95
post #84

Earlier quoted context omitted.

That’s one of the properties that distinguishes intelligence from traditional deterministic algorithms.

I feel like I'm fighting a losing battle but I don't see why so many people consider LLMs innately non-deterministic, an LLM running on a CPU with greedy decoding would be 100% deterministic and still have the intelligence we associate with LLMs

> I feel like I'm fighting a losing battle but I don't see why so many people consider LLMs innately non-deterministic ...

Because LLMs are artificial neural networks[0] (ANN), which are statistical in nature, and thus intrinsically non-deterministic. Pretty much every AI algorithm has randomness involved in its definition and many (most?) incorporate probabilities.

0 - https://en.wikipedia.org/wiki/Neural_network_(machine_learni...

Re: Don't classify, hallucinate

#96
post #88

Earlier quoted context omitted.

I feel like I'm fighting a losing battle but I don't see why so many people consider LLMs innately non-deterministic, an LLM running on a CPU with greedy decoding would be 100% deterministic and still have the intelligence we associate with LLMs

Valid point, it’s why I included the word “traditional”, to try to qualify that. What I meant is something more like explicitly programmed vs. learned. Intelligence can result from learned behavior, but not from explicit programming of rules by humans. An aspect of this is that “learning” is unpredictable - we can’t predict in advance exactly how the resulting model will behave, except broadly. It seems non-determini…

> Intelligence can result from learned behavior, but not from explicit programming of rules by humans.

This is incorrect.

Simulated intelligence can and has been encoded explicitly by humans defining rules programmatically in the form of expert systems[0].

0 - https://en.wikipedia.org/wiki/Expert_system

Re: Don't classify, hallucinate

#97
post #84

Earlier quoted context omitted.

That’s one of the properties that distinguishes intelligence from traditional deterministic algorithms.

I feel like I'm fighting a losing battle but I don't see why so many people consider LLMs innately non-deterministic, an LLM running on a CPU with greedy decoding would be 100% deterministic and still have the intelligence we associate with LLMs

I've seen this debate several times and often there's a terminology issue, where the same word isn't being interpreted the same way by different sides.

Often it's a difference between repeatable versus predictable, or whether a system has chaotic aspects like the configurations of a double-pendulum or weather-forecasting.

Sometimes it's the difference between determinism in-theory versus in-practice, especially when various optimizations are being applied to save money.

Re: Don't classify, hallucinate

#98
post #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 contain…

I feel like querying for the smaller distance from the set of embeddings of both the query and a fake answer structure might solve that. If there's something very close to the query, it dominates, otherwise the fake answer is the guide. Plus, why not use an LLM to judge between them if we've got a token-burner all warmed up to start.

Re: Don't classify, hallucinate

#99

Earlier quoted context omitted.

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.

Ahhh, but the LLM processing is the kind corporate leadership and investors will actually agree to buy!

Orginally I started writing that as sarcasm, and now I'm not quite so sure.

Re: Don't classify, hallucinate

#100
post #76

I don't know the exact syntax any more, but I expect this could be solved by a single sql query that uses "inexact but close" queries and a bunch of indexes (and perhaps tags) on each category.

Like some sort of Jaccard Index based on how many tags are shared?

https://en.wikipedia.org/wiki/Jaccard_index

Post reply on HN