Live data from Hacker News

Teach your LLM to answer with facts, not fiction

blog.myscale.com

121–130 of 149 posts

Re: Teach your LLM to answer with facts, not fiction

#121
post #6

Earlier quoted context omitted.

This article suggests that LLMs should use a database as a reference for factual information. Rather than asking LLMs to provide their own answers, it is recommended that they summarize based on the facts extracted from the database. This approach reduces the likelihood of hallucinations among LLMs.

We already had databases of facts, like Wolfram Alpha, decades before LLM, and we largely ignored them. It's ironic that when trying to solve AI problems we keep reverting to these old patterns we've tried since the 80s and they kept failing. Habits die hard, I guess. There's a categorical difference between knowing a fact, and looking up a fact. When you know a fact you can recognize it in a situation where you woul…

> I don't believe the nature of LLM is to hallucinate. It's instead a side effect of how we train them. We train them to guess, to be close, but not to be correct necessarily.

Thoughout this comment you speak about LLMs as-if they're animals, or real physical objects. An LLM is a formal model which is just to generate a sequence of tokens maximally probabilistically consistent with a corpus of historical text.

A digital machine running a LLM program is a physical object which necessarily generates text based on "guessing" because that's the algorithm it's running. LLMs are "guessing algorithms", all of Machine Learning is -- it is dumb brute-force analysis of conditional probability.

> GPT4 is roughly 40 times smaller than a human brain

This doesn't make any sense. GPT4 is an abstract algorithm with no "size". The brain has 10^{big number} cells, and GPT4 can be specified with a single real number. Is that the comparison to make? No, both comparisons are incoherent.

A physical device running GPT4 can be given a "size", but it would again have nothing to do with a brain.

LLMs arent living things where we can "measure their size" and "train them to know, rather than to guess". They are just the equation, `max P(answer|propmt, historical_corpus)`

A machine running GPT4 is just an electrical device generating text according to the rule given above. There is no sense of "training it to do something other than guesswork", and no sense of "size"

Re: Teach your LLM to answer with facts, not fiction

#122

I think LLMs need to be taught to say "I don't know"/"I am not sure" or something to that effect. Another approach might be to introduce an adversarial "censor" model to guard against hallucination (or inappropriate answers).

I don't see why this isn't a focus in RLHF. Just heavily discourage confident lies and encourage admission of ignorance. It can't be that much harder than "safety" training. But then we would probably end up with things like "As an AI language model, my knowledge of the world is limited, but if I were to guess, ..."

Re: Teach your LLM to answer with facts, not fiction

#123

Earlier quoted context omitted.

What they are doing depends entirely on what decoding algorithm you use. An LLM is mostly a token probability function, but it's not just that - a transformer model is capable of learning anything. Tokens are the interface, not necessarily the implementation.

A transformer can only memorize , it doesn't learn to do . For what that concerns us here: LLMs will never learn to fact-check anything. They'll blindly regurgitate the facts they have been "taught", but never consider or evaluate "the paper cited for this fact on wikipedia is a bunch of bullshit". Any attempt to use them to produce "facts" is ultimately just folly, in the same way Google's attempt to do so with it's…

> [LLMs] never consider or evaluate "the paper cited for this fact on wikipedia is a bunch of bullshit".

Nor do people, though! This is setting the bar way too high.

The whole point to having edited reference sources like "encyclopedias" is that so that we can rely on the expertise of the editors in lieu of having to develop the expertise ourselves[1].

No, an LLM that simply knows a priori (via prompt hacking) which sources are trustworthy would be absolutely comparable to the way an educated-but-non-expert human approaches sources.

[1] Which is a chicken and egg problem anyway. Everyone starts with edited reference sources as tutorial material. Quite frankly everyone starts learning with wikipedia.

Re: Teach your LLM to answer with facts, not fiction

#124

I believe that LLMs should be banned, but if they have to exist, we should teach them ethics first before anything else.

Do you think your phone keyboard's predictive text should be taught ethics? How? LLMs are just predictive text scaled way up: they don't know or think anything, they just predict the next word repeatedly. They can't learn ethics, but can learn to string words together into sentences about ethics, again just by predicting the next word.

Re: Teach your LLM to answer with facts, not fiction

#125

'Facts' aren't as black and white as people think. "What does Charmander evolve into?" "What does the spell 'avada kedavra' do?" "What is the Sindarin word for 'friend'?" "What are the names of Santa's reindeer?" "Where did Robin Hood live?" "Where did Achilles die?" These are all 'factual questions' you can find answers to from reputable sources like Wikipedia. Google displays 'fact boxes' for several of them. Wolfr…

> What does Charmander evolve into?

wait why is this implied to not be black and white? Charmeleon is the only correct answer.

Re: Teach your LLM to answer with facts, not fiction

#126
post #123

Earlier quoted context omitted.

A transformer can only memorize , it doesn't learn to do . For what that concerns us here: LLMs will never learn to fact-check anything. They'll blindly regurgitate the facts they have been "taught", but never consider or evaluate "the paper cited for this fact on wikipedia is a bunch of bullshit". Any attempt to use them to produce "facts" is ultimately just folly, in the same way Google's attempt to do so with it's…

> [LLMs] never consider or evaluate "the paper cited for this fact on wikipedia is a bunch of bullshit". Nor do people, though! This is setting the bar way too high. The whole point to having edited reference sources like "encyclopedias" is that so that we can rely on the expertise of the editors in lieu of having to develop the expertise ourselves[1]. No, an LLM that simply knows a priori (via prompt hacking) which…

This is setting the bar way too high.

No. If these things are claimed to be sources of truth, then the bar needs to be that high.

It is precisely because people don't fact-check that the bar has to be so high.

Re: Teach your LLM to answer with facts, not fiction

#127
What's not jumping out to me is why you need an LLM for this? What unique code is the LLM actually generating when de-hallucinating?

From the looks of it, they're just advertising a SQL extension that adds vectorization and vector search. Further, it looks like the only thing that the LLM is doing here is deciding which column to run the vector search on. Why is that even necessary? Why are you not pre-processing "vector'd" columns into a normalized format to query against?

They're basically adding an unnecessary LLM step to what amounts to a vector search. In fact, the LLM is essentially blindly deciding which column is the best column to pull an answer from.

-----

EDIT: Just struck me how terrifyingly dangerous this blog is. Really tired of seeing this crap in the LLM community.

The basic premise of this blog is "give an LLM complete access to your database. Let it decide how and where it should pull data from". This is basically useless without talking about how you prevent the LLM from pulling data from places you don't want it to.

A far better and safer approach remains to push your relevant fields to a separate place for your LLM. In the spirit of this blog, you should just index to a new table. More realistically, you should just put this in a vector store.

Re: Teach your LLM to answer with facts, not fiction

#128

'Facts' aren't as black and white as people think. "What does Charmander evolve into?" "What does the spell 'avada kedavra' do?" "What is the Sindarin word for 'friend'?" "What are the names of Santa's reindeer?" "Where did Robin Hood live?" "Where did Achilles die?" These are all 'factual questions' you can find answers to from reputable sources like Wikipedia. Google displays 'fact boxes' for several of them. Wolfr…

Absolutely agreed. And I'll just put this here:

    "You need to believe in things that aren't true. How else can they become?"
    - "Hogfather" by Terry Pratchett

Re: Teach your LLM to answer with facts, not fiction

#129

Earlier quoted context omitted.

“ When an LLM is suggesting what might come next in a piece of text... it doesn't know if it's supposed to guess a probable word from a Wikipedia article, an Onion article, a Project Gutenberg manuscript, or an Archive Of Our Own fanfic” LLMs are very good at inferring context, so that only really applies if you’re using an un-RLHFed base model with no context given

Here, "supposed to guess" means "having the goal of..." So no LLM knows what it's supposed to do. If you prefer, you could say it only ever has one goal: to generate a sequence of tokens which are jointly the most probable to occur along with the prompt tokens, given such probabilities in a historical corpus. This imitates knowledge, goal-directness, "inferring context" etc. without doing any of those things. Conside…

What does RLHF do then? I feel like you completely ignored the central point of GP's comment.

RLHF is the difference between GPT-3.5 and ChatGPT, and it's the whole reason why LLMs are suddenly such a big deal. ChatGPT demonstrated that it's possible to give language models a goal beyond just "complete most likely next word" and that they can actually be somewhat competent at achieving those goals despite not being explicitly trained for them.

Re: Teach your LLM to answer with facts, not fiction

#130
post #6
post #3

It is not a good start that they begin with a dictionary definition of Hallucinations. While the similarities to what a LLM does are apparent enough for the term to be used, LLMs are under no obligation to behave similar to the dictionary definition of Hallucinations. In general facts are not the answer to Hallucinations. You can't possibly have every fact for every situation. The true solution to Hallucinations is f…

This article suggests that LLMs should use a database as a reference for factual information. Rather than asking LLMs to provide their own answers, it is recommended that they summarize based on the facts extracted from the database. This approach reduces the likelihood of hallucinations among LLMs.

This blog is only having an LLM assess what column it should run a query against.

Why is that necessary? Why have an LLM guess where the facts are?

Put all of that data in a place where it's normalized and ready to vector search.

Post reply on HN