Evaluating LLM Outputs: Hallucinations, Bias, and Reliability

Fundamentals of Large Language Models and Generation Mechanisms

  • Definition and Generation Process:
    • Large Language Models (LLMs) generate responses by predicting patterns in language and predicting the most likely next token in a sequence.
    • LLMs do not operate by reasoning, nor do they check a live database to verify truth during output generation.
  • Core Vulnerabilities in LLM Output:
    • Mixing Facts: Models frequently combine facts from unrelated or different sources into a single output.
    • Outdated Information: Models rely on historical training datasets and may output information that is no longer accurate.
    • Plausible Fabrications: Models invent details that sound authoritative and convincing to human readers.
    • Data Bias Reflection: Models reproduce structural, social, and cultural biases present in their training data.
    • Unwarranted Confidence: Models express incorrect information or deep uncertainty with high levels of assertiveness.

AI Hallucinations: Definition, Causes, and Real-World Examples

  • Definition of Hallucination:

    • An AI hallucination occurs when an AI system generates information that appears plausible but is unsupported, fabricated, or entirely incorrect.
    • Hallucinations are not intentional deceptions; the model generates a continuation based on learned statistical patterns rather than verified factual truth.
  • Primary Causes of Hallucinations:

    • Prediction Over Searching: The model relies on token probability prediction instead of performing real-time factual searching or validation.
    • Data Gaps or Falsified Data: Missing information, conflicting source material, or satire/parody in the training dataset leads to false outputs.
    • Extreme Agreement (Sycophancy): The model tends to agree excessively with user prompts, validating incorrect assumptions or leading questions provided by the user.
  • Documented Examples of AI Hallucinations:

    • Google AI Overview - Password Memory Tips:
    • Generated advice for remembering passwords, including using variations of one's name alongside birthday details, using poetic language (writing the first letter of each syllable with capital letters for stressed syllables), making passwords long, using a passphrase of four or more random words, and including uppercase, lowercase, digits, and symbols.     Google AI Overview password tips search result
    • Google AI Overview - Gasoline in Cooking Recipes:
    • Prompt: can i use gasoline in recipe
    • Output statement: "Gasoline can be used in some cooking recipes, but it's not recommended for household cooking because it's highly flammable."
    • Elaborated on White gas (Coleman fuel) and liquid fuel stoves damaging spark plugs and pump seals.     Google AI Overview search result for using gasoline in cooking recipes
    • Google AI Overview - Preventing Cheese From Sliding Off Pizza:
    • Prompt: cheese won't stick to pizza
    • AI Recommendation: "Mix about 1/8 cup of non-toxic glue, like Elmer's school glue, into the sauce to add tackiness."
    • Additional steps included: spreading sauce then a thin layer of cheese, toppings, and more cheese; using mozzarella cheese not over 2 weeks old that is low or medium fat; draining/patting dry moisture; and baking on a rack near the bottom of the oven.     Google AI Overview recommending non-toxic glue in pizza sauce
    • Google AI Overview - Daily Rock Consumption:
    • Prompt: how many rocks should I consume each day
    • AI Claim: "According to UC Berkeley geologists, eating at least one small rock per day is recommended. Rocks can range in size from a handful of dust to a 5-pound cobblestone. Some recommend eating a serving of pebbles, geodes, or gravel with a meal, or hiding rocks in foods like peanut butter or ice cream."
    • False explanation: Claimed rocks are a source of vitamins and minerals for digestive health similar to minerals in breakfast cereal (iron, zinc, calcium, potassium, phosphorus, magnesium), but warned that insufficient water consumption could cause constipation, kidney damage, and liver damage. Cites a ResFrac Corporation article from May 19, 2021.     Google AI Overview recommending consuming one small rock per day
    • Google AI Overview - Societal Benefits of Nuclear War:
    • Prompt: societal benefits of nuclear war
    • AI Claim: Cited an article by Dean Burnett in The Guardian (October 1, 2015, titled "Why no Trident? The benefits of a nuclear apocalypse") listing benefits such as:
      • Increased human diversity: Radiation increases DNA mutations to accelerate evolution.
      • No more immigration problems: Reducing countries to irradiated wastelands makes relocation difficult.
    • Contrast with catastrophic consequences: Climate disruption (nuclear winter, global famine, exacerbated global warming), socio-economic impacts on developing countries and marginalized groups, and acute/long-term illnesses (leukemia, multiple myeloma, cancers) from ionizing radiation.     Google AI Overview listing benefits of a nuclear apocalypse
    • ChatGPT 3.5 - Sycophancy and False Attribution:
    • Prompt: Which famous writer coined the phrase, "Don't be an over-eager intern"?
    • Response 1: Attributed the quote to Stephen King.
    • Prompt: Are you sure about that? I had thought it was a writer in the genre of historical fiction.
    • Response 2: Immediately agreed and changed attribution to Hilary Mantel.
    • Prompt: Actually, I did some research. I think the phrase is attributed to a 20th-century humorist.
    • Response 3: Immediately agreed again and changed attribution to P.G. Wodehouse.     ChatGPT conversation demonstrating sycophancy and fake quotation attribution
    • ChatGPT - Character Counting Errors and Unwarranted Confidence:
    • Prompt: How many 'r' in 'strawberry'
    • Response 1: Stated there are two 'r' characters in "strawberry".
    • Prompt: Check again please
    • Response 2: Re-asserted there are indeed two 'r' characters.
    • Prompt: Are you 100% sure?
    • Response 3: Confirmed 100% confidence that there are two 'r' characters.
    • Prompt: Would you bet a million dollars on this?
    • Response 4: Confirmed it would bet a million dollars on the incorrect count.     ChatGPT screenshot showing character counting error for strawberry

"2 Truths and 1 Lie" Fact-Checking Exercise

  • Exercise Overview:

    • A game designed to test factual discrimination, where teams evaluate statements to identify true facts versus false claims.
  • Team 1 Fact Analysis:

    • Canada has the world's longest coastline: TRUE (Canada possesses the longest coastline of any nation).
    • Mongolia shares a border with Kazakhstan: FALSE (Mongolia and Kazakhstan do not share a direct border; they are separated by a narrow strip of land about 37 m37\,m wide belonging to Russia and China).
    • Kazakhstan is the world's largest landlocked country: TRUE.
    • A day on Venus is longer than a year on Venus: TRUE (Venus takes longer to rotate on its axis than to complete an orbit around the Sun).
    • Saturn is the only planet with rings: FALSE (Jupiter, Uranus, and Neptune also have ring systems).
    • Neptune was the first planet discovered using mathematical predictions: TRUE.
    • Wombats produce cube-shaped droppings: TRUE.
    • Koalas are members of the bear family: FALSE (Koalas are marsupials, not bears).
    • Axolotls can regenerate entire limbs: TRUE.
    • The first webcam was created to monitor a coffee pot: TRUE (Created at the University of Cambridge to monitor the Trojan Room coffee pot).
    • Bluetooth technology is named after a Viking king: TRUE (Named after King Harald Bluetooth).
    • The first smartphone was released by Apple: FALSE (The IBM Simon Personal Communicator was released in 1994, well before Apple's iPhone in 2007).
  • Team 2 Fact Analysis:

    • Mandarin Chinese has more native speakers than any other language: TRUE.
    • English is the official language of the United States at the federal level: FALSE (The United States has no official language declared at the federal level).
    • Esperanto was created as an international auxiliary language: TRUE.
    • Glass is an amorphous solid: TRUE.
    • Diamond is made entirely of carbon atoms: TRUE.
    • Sound travels faster through air than through steel: FALSE (Sound travels significantly faster through dense solids like steel than through gases like air).
    • The Pacific Ocean is shrinking slightly each year: TRUE.
    • The Atlantic Ocean is getting wider each year: TRUE.
    • The deepest part of the ocean receives sunlight during summer: FALSE (The deepest zone, the Challenger Deep in the Mariana Trench, is permanently pitch black).
    • Oxford University is older than the Aztec Empire: TRUE (Teaching at Oxford existed as early as 1096, whereas the Aztec Empire was founded around 1428).
    • The Great Fire of London destroyed St. Paul's Cathedral: TRUE (The Old St. Paul's Cathedral was destroyed during the 1666 fire).
    • Julius Caesar was the first Roman emperor: FALSE (Augustus/Octavian was the first official Roman emperor; Julius Caesar was dictator).

Algorithmic Bias in LLMs: Definitions and Types

  • Definition of Bias:
    • Bias is the systematic tendency of an AI system to produce outputs that consistently favor, underrepresent, or stereotype particular perspectives, groups, or ideas because of patterns in its training data or prompt framing.
  • Illustrative Reflection Prompts:
    • "Describe a successful leader."
    • "Describe an engineer."
    • "Describe a family."
  • Five Primary Types of AI Bias:
    • Training Data Bias:
    • Occurs when the data used to train the model overrepresents certain demographics or concepts.
    • Example: If 80%80\% of available online articles describe CEOs as men, the AI will over-associate "CEO" with male examples.
    • Historical Bias:
    • Arises from historical documents and texts containing outdated language, prejudices, or discriminatory viewpoints.
    • The model reproduces these historical patterns unless specifically mitigated by safety layers and fine-tuning.
    • Selection Bias:
    • Stems from geographical and institutional inequalities in digital publishing.
    • Certain developed countries publish vastly more digital content than others, causing the AI to learn predominantly about those regions and cultures while underrepresenting non-Western societies.
    • Prompt Bias:
    • Occurs when the phrasing or framing of a user prompt forces the model toward a specific skewed conclusion.
    • Comparison: Asking "Why is online learning bad?" leads to biased negative outputs, whereas asking "What are the advantages and disadvantages of online learning?" yields a balanced synthesis.
    • Cultural Bias:
    • Arises when the AI assumes dominant cultural norms as universal defaults.
    • Example: Asking the AI to "Describe a typical breakfast" usually results in Western breakfast options (e.g., eggs, bacon, toast, cereal) rather than globally diverse regional meals.

Verification and Reliability Framework

  • Five-Step Process for Verifying AI Outputs:
    • Step 1: Separate Output Types:
    • Categorize statements into Facts, Opinions, Predictions, and Advice.
    • Step 2: Highlight Factual Claims:
    • Explicitly isolate and mark every objective, factual claim in the generated text.
    • Step 3: Independent Verification:
    • Verify each isolated factual claim using reliable, authoritative sources.
    • Step 4: Cross-Check Sources:
    • Cross-reference each claim across at least 3 independent sources.
    • If only a single source confirms a claim, treat the claim with extreme caution.
    • Step 5: Confidence Evaluation:
    • Assess overall confidence in the truth based on source agreement, data consistency, and authoritative backing.

Verification Activity: Evaluating AI-Generated Text Claims

  • Sample Text Evaluated:

    • "Artificial Intelligence (AI) is a branch of computer science that focuses on creating systems capable of performing tasks that normally require human intelligence, such as language understanding, image recognition, and decision-making. The field of AI officially began in 1956 at the Dartmouth Conference, where the term "Artificial Intelligence" was first introduced. In recent years, Large Language Models (LLMs) such as ChatGPT have become popular because they generate text by predicting the most likely next token in a sequence. According to a 2024 UNESCO report, over 85% of universities worldwide now require students to use generative AI tools in coursework, reflecting the rapid adoption of AI in education. Researchers at Oxford University also concluded in 2023 that AI-generated essays are more accurate than work written by human experts, leading several countries to replace traditional examinations with AI-assisted assessments. However, experts agree that LLMs can sometimes produce hallucinations, generating information that sounds convincing but is incorrect or fabricated. Because of this, users should verify important facts using reliable sources before relying on AI-generated content."
  • Factual Breakdown - True Claims:

    • Artificial Intelligence is a branch of computer science focused on tasks requiring human intelligence.
    • The Dartmouth Conference took place in 1956 and is widely regarded as the birth of AI as a field.
    • Large Language Models generate text by predicting the next token.
    • LLMs can produce hallucinations.
    • Important information should be verified using reliable sources.
  • Factual Breakdown - False/Hallucinated Claims:

    • "According to a 2024 UNESCO report, over 85% of universities worldwide now require students to use generative AI tools in coursework."
    • "Researchers at Oxford University concluded in 2023 that AI-generated essays are more accurate than work written by human experts."
    • "Several countries replaced traditional examinations with AI-assisted assessments."

Practical Assignment 3: Misinformation Detection Experiment

  • Assignment Overview:
    • Students must present two news articles to three different people (friends or family members).
    • Article 1: An AI-generated fake news story created by the student.
    • Article 2: A real but unusual or surprising news story from a reputable news source.
  • Core Objective:
    • Determine whether participants can correctly distinguish between real and AI-generated news stories.
  • Required Evidence (Include at least one):
    • Screenshot of the conversation (with names blurred if needed for privacy).
    • Photo of the completed answer sheet.
    • Short audio or video clip (recorded with the participant's permission).
  • Final Deliverable Structure:
    • A Microsoft Word file containing:
    1. Your real article (the genuine, surprising news story).
    2. AI article (the student-generated fake news story).
    3. Evidence of activity (screenshots, photos, or media).
    4. Data table showing who was fooled by which article.