How to Solve LLM Hallucinations(morethanmoore.substack.com)
morethanmoore.substack.com
How to Solve LLM Hallucinations
https://morethanmoore.substack.com/p/how-to-solve-llm-hallucinations
7 comments
I had a fun tangle with ChatGPT and Claude as to whether "First Communion" and/or "First Confession" are capitalized.
While agreeing that "First Communion" should be capitalized they gave opposing answers regarding "First Confession". Claude thought it should be capitalized, ChatGPT demurred. So I fed Claude's response to ChatGPT, challenging it.
Oh sure, ChatGPT agreed, "You are correct." Then proceeded to explain why "First Confession" should be capitalized.
I also challenged Claude by pasting ChatGPT's original response claiming we should not capitalize. Claude: "Thank you for that clarification, you make an excellent point. I stand corrected...."
Kind of forced to straddle the two answers (and so doing a little Googling) I decided in the end that ChatGPT was probably right the first time.
There is a weird relationship I am finding I am having with LLMs where I feel the need to go back and "set them straight". I feel bad kind of lying to them like I did.
ChatGPT shrugged it off though, was quick to explain that, indeed, it probably should not be capitalized (except maybe for some nuanced, special-case reasons that the author might have).
While agreeing that "First Communion" should be capitalized they gave opposing answers regarding "First Confession". Claude thought it should be capitalized, ChatGPT demurred. So I fed Claude's response to ChatGPT, challenging it.
Oh sure, ChatGPT agreed, "You are correct." Then proceeded to explain why "First Confession" should be capitalized.
I also challenged Claude by pasting ChatGPT's original response claiming we should not capitalize. Claude: "Thank you for that clarification, you make an excellent point. I stand corrected...."
Kind of forced to straddle the two answers (and so doing a little Googling) I decided in the end that ChatGPT was probably right the first time.
There is a weird relationship I am finding I am having with LLMs where I feel the need to go back and "set them straight". I feel bad kind of lying to them like I did.
ChatGPT shrugged it off though, was quick to explain that, indeed, it probably should not be capitalized (except maybe for some nuanced, special-case reasons that the author might have).
It’s a neat approach. VRAM is obviously the major concern here since it sounds like the parameter count grows as you insert more facts.
I’m also curious how well the facts communicate with each other. A major problem with RAG is that the model can’t draw novel inferences between documents. You have a model with a broad knowledge base but a very shallow understanding of the connections between datapoints. Let’s say I insert two facts separately using this method: “the cookie is under cup A” and “cup A is moved to position 2”. If I ask where the cookie is can this new model tell me? This is trivial for in-context learning and non-trivial for RAG. Curious where this solution falls.
I’m also curious how well the facts communicate with each other. A major problem with RAG is that the model can’t draw novel inferences between documents. You have a model with a broad knowledge base but a very shallow understanding of the connections between datapoints. Let’s say I insert two facts separately using this method: “the cookie is under cup A” and “cup A is moved to position 2”. If I ask where the cookie is can this new model tell me? This is trivial for in-context learning and non-trivial for RAG. Curious where this solution falls.
How about weighting each input training data item using some sort of "accuracy" metric? Rather than treating data from the onion and reddit the same as Wikipedia, we could more accurately emulate what we do as humans. We spend an inordinate amount of time learning how to differentiate between different sources. Currently, LLMs treat all inputs identically and hence weight only by quantity.
"Mixture of Expert (MoE) models rely on multiple optimized smaller models, each with a more refined and specified dataset"
This is not how MoEs work...
This is not how MoEs work...
To be fair, it's a common misconception because of the name and also how it's traditionally explained. It generally gets lost in translation that MoE trains all the models at once, from the same dataset.
I believe each expert also can't generally be used entirely outside of the context of the mixture (i.e. the operation of the MoE relies on picking the right expert to use for each token, even if num_experts is 1), but I haven't seen a definitive answer on this.
I believe each expert also can't generally be used entirely outside of the context of the mixture (i.e. the operation of the MoE relies on picking the right expert to use for each token, even if num_experts is 1), but I haven't seen a definitive answer on this.
I don't know who is traditionally explaining MoEs like this but they shouldn't be.
And especially for someone writing an article on technical LLM operation...the author just clearly lacks the domain expertise that I would expect.
And especially for someone writing an article on technical LLM operation...the author just clearly lacks the domain expertise that I would expect.
It is humans who hallucinate when they expect an answer from an LLM that is 'truthful' or 'right' or 'correct'. The LLMs (as of June 2024) have no concept or understanding of truth, falsehood, right, wrong, correct or incorrect. Rather, when people claim that LLMs hallucinate, the LLMs are in fact generating responses and performing exactly as they are programmed to do.
However, humans should be forgiven for their hallucinations, because the interaction with the LLMs and the generated results are often designed by their makers to precisely give this unfortunate impression. Indeed, it is the unreasonable effectiveness of LLMs in the natural language domain and their successful application to many diverse tasks, that 'hallucinations' are now seen as the most serious defect of LLMs.