Addendum to my answer (can't edit, because I used a guest account, maybe someone can edit it in):
One comment to OP states
I asked Bard "How many references do you have to Python in your training data?" The answer it gave was 2,000. No DK effect there then! It was totally focussed on the computer language with no mention of snakes.
The answer of an LLM does not in itself indicate anything factual about the LLM, except for that the answer is inside the possible results of the generative process. Think of it like the value of a random variable. A single value does not say anything about the random distribution. Plus, even with multiple values it's very hard to determine, if a variable is a random variable.
In an attempt to determine whether the LLM is actually self-reflecting vs. generating text that only seems to be self-reflecting, I would have added the prompts:
"What's your definition of 'references' in your answer above?"
2000 references seems awfully low as a count of actual python scripts. At least, if you want the LLM trained on those reference to write working code.
Maybe the LLM has read 2000 books and articles on Python?
Let's suppose it states that it has read books, articles and/or online resources such as tutorials.
"List 3 examples of any kind of references, including all information available such as title and author of any book, article and blog post and information on how and where to find it online such as web address and ISBN."
Then check the references returned. I'm reasonably certain that the LLM will just make stuff up, i.e. show some kind of hallucinatory behaviour. Any LLM that returns existing references (and only those) is worth investigating, which features enable it to actually self-reflect.
I agree to some extent with the commentor: This "some kind of hallucinatory behaviour" is not necessarily comparable to Dunning Kruger effect. For that it would have to be more confident in topics that it has less data on. Again 2000 references (if taking the LLM's answer at face value, which I think is a mistake) seem relatively low for training a LLM on a topic. If the LLM exhibits more confidence in its knowledge on Python than in an area for which more training data has been used, that would resemble the Dunning-Kruger effect.
Again, see my other answer on what's necessary for an LLM to actually possess confidence, the ability to employ it in answering and thus exhibit bugs that could be compared to Dunning-Kruger effect.
OverLordGoldDragon has made a valid point about redefining the Dunning-Kruger effect for LLMs. The definition makes sense and might be seen as obvious. I chose to tiptoe changing existing definitions, because I like to leave original definitions in place. In fact, I would propose that the redefined effect should be called the OverLordGoldDragon effect and be stated like:
Without specific and careful design choices being made, LLMs will exhibit overconfidence on topics for which the subset of the training data included highly confident language while being too small to sufficiently explore the topic.
(above definition is extrapolated from OverLordGoldDragon: "If AI is fed data that's only confident on a subject, the "best fit" may be to mimic said confidence.")
If that's the new definition, then yes, LLMs will almost certainly exhibit that. The "specific and careful design choices" are
- to include confidence scoring
- to penalize small subsets of training data in the confidence scoring
The difference between Dunning-Kruger effect and OverLordGoldDragon effect is that humans naturally exhibit some level of confidence and self-reflection while LLMs may not model confidence and self-reflection at all. Thus they hallucinate when asked to self-reflect on their confidence. Asking the test subjects to self-reflect on confidence about a topic is exactly how Dunning and Kruger found their effect. Hallucinated answers of LLMs should not be taken at face value, because this is where the LLM will likely be inconsistent.
What good is it, if an LLM answers that it is "very confident" as often as it answers "not confident at all" when asked the very same question multiple times? You won't be able to determine the actual confidence of an LLM that does not model confidence from its hallucinations.