Live data from Hacker News

Don't classify, hallucinate

softwaredoug.com

101–110 of 118 posts

Re: Don't classify, hallucinate

#101
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 couldn't believe programming has become all strings either. In the olden days it was either a code smell or compiler tests.

Re: Don't classify, hallucinate

#103

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

> 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_(m…

Now that you mention it, I think "statistical" might be a good word choice as it probably closely matches what people mean when they say an LLM is nondeterministic. However, on a technical level, neural network inference truly is inherently deterministic. The only nondeterminism in LLMs is parallelism-dependency in the way floating point operations are carried out and in the decoding strategy

Re: Don't classify, hallucinate

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

deterministic but completely unpredictable is not really any more useful

Re: Don't classify, hallucinate

#105

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 ... 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_(m…

Now that you mention it, I think "statistical" might be a good word choice as it probably closely matches what people mean when they say an LLM is nondeterministic. However, on a technical level, neural network inference truly is inherently deterministic. The only nondeterminism in LLMs is parallelism-dependency in the way floating point operations are carried out and in the decoding strategy

only if you bias your "random sampling of the distributions it gives"

Fixing the seed is still intentional bias. Or you could force it to always take the one token with the highest probability, but that is still biased sampling. Deterministic, sure, but intentionally wrong just to avoid a technically

Re: Don't classify, hallucinate

#106

Earlier quoted context omitted.

Now that you mention it, I think "statistical" might be a good word choice as it probably closely matches what people mean when they say an LLM is nondeterministic. However, on a technical level, neural network inference truly is inherently deterministic. The only nondeterminism in LLMs is parallelism-dependency in the way floating point operations are carried out and in the decoding strategy

only if you bias your "random sampling of the distributions it gives" Fixing the seed is still intentional bias. Or you could force it to always take the one token with the highest probability, but that is still biased sampling. Deterministic, sure, but intentionally wrong just to avoid a technically

There's nothing inherently biased or intentionally wrong with greedy decoding. Why would there be? Let's say you're trying to predict what an expert doctor would say to a patient with cancer. You think there's a 99% chance the doctor would say "start chemotherapy" and a 1% chance the doctor would say "don't worry about it". If you have to pick one to output, you'll pick "start chemotherapy". It would be crazy to say the best thing to do is to roll a 100-sided die to determine your answer. A language model is literally in that exact situation.

Re: Don't classify, hallucinate

#107
post #93
post #75

Earlier quoted context omitted.

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!

I regularly ask Claude to find that one book, that one short story, that one meme, you know the one, it had the guy and the thing, no not quite like that...

It nearly always works.

Re: Don't classify, hallucinate

#108
This is awesome, it's literally harnessing llms for creativity. There's got to be a deeper angle here to develop llms in this direction explicitly: exploring possibility space and then mapping that into reality as post processing / tooling, in lieu of training so heavily around reality.

Re: Don't classify, hallucinate

#109
post #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.

What does it mean that an "embedding model supports queries"? An embedding model maps text to embedding vectors. You can always perform queries with such embedding vectors against a stored set of embeddings.

Retrieval models are trained on query/document pairs. At inference you tell it which side the text is on via a prefix it learned during training.

Which accomplishes the same thing as HyDE, but in the model instead of in text space. If the encoder has a query mode you skip the rewrite.

Voyage has an example of this in `input_type` https://docs.voyageai.com/reference/embeddings-api

Re: Don't classify, hallucinate

#110
post #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

I was thinking more along the lines of using text search [1] [2]

[1] https://www.postgresql.org/docs/current/textsearch-intro.htm...

[2] https://www.elastic.co/docs/explore-analyze/query-filter

Post reply on HN