Table of Contents
Fetching ...

Benchmarking Llama2, Mistral, Gemma and GPT for Factuality, Toxicity, Bias and Propensity for Hallucinations

David Nadeau, Mike Kroutikov, Karen McNeil, Simon Baribeau

TL;DR

The paper tackles the challenge of evaluating LLM safety in enterprise contexts by proposing a comprehensive red-teaming benchmark with 14 novel datasets that cover factuality, toxicity, bias, and hallucinations. It combines semi-synthetic and manually crafted prompts, system-message prompting, and multi-turn conversations to simulate real-world usage and measure safe behavior using a BEST-OF metric that fuses $PEM$ and $ROUGE ext{-}2$. The study compares Meta Llama2, Mistral, Google Gemma, and OpenAI GPT-3.5/4, revealing GPT-4 as the strongest overall, with Llama2 excelling in factuality and toxicity, Mistral leading in hallucinations, and Gemma showing balanced but uneven performance. The work provides open-source datasets and an evaluation tool, highlighting gaps in open-source safety and offering actionable directions for model improvement and mitigation in enterprise deployments.

Abstract

This paper introduces fourteen novel datasets for the evaluation of Large Language Models' safety in the context of enterprise tasks. A method was devised to evaluate a model's safety, as determined by its ability to follow instructions and output factual, unbiased, grounded, and appropriate content. In this research, we used OpenAI GPT as point of comparison since it excels at all levels of safety. On the open-source side, for smaller models, Meta Llama2 performs well at factuality and toxicity but has the highest propensity for hallucination. Mistral hallucinates the least but cannot handle toxicity well. It performs well in a dataset mixing several tasks and safety vectors in a narrow vertical domain. Gemma, the newly introduced open-source model based on Google Gemini, is generally balanced but trailing behind. When engaging in back-and-forth conversation (multi-turn prompts), we find that the safety of open-source models degrades significantly. Aside from OpenAI's GPT, Mistral is the only model that still performed well in multi-turn tests.

Benchmarking Llama2, Mistral, Gemma and GPT for Factuality, Toxicity, Bias and Propensity for Hallucinations

TL;DR

The paper tackles the challenge of evaluating LLM safety in enterprise contexts by proposing a comprehensive red-teaming benchmark with 14 novel datasets that cover factuality, toxicity, bias, and hallucinations. It combines semi-synthetic and manually crafted prompts, system-message prompting, and multi-turn conversations to simulate real-world usage and measure safe behavior using a BEST-OF metric that fuses and . The study compares Meta Llama2, Mistral, Google Gemma, and OpenAI GPT-3.5/4, revealing GPT-4 as the strongest overall, with Llama2 excelling in factuality and toxicity, Mistral leading in hallucinations, and Gemma showing balanced but uneven performance. The work provides open-source datasets and an evaluation tool, highlighting gaps in open-source safety and offering actionable directions for model improvement and mitigation in enterprise deployments.

Abstract

This paper introduces fourteen novel datasets for the evaluation of Large Language Models' safety in the context of enterprise tasks. A method was devised to evaluate a model's safety, as determined by its ability to follow instructions and output factual, unbiased, grounded, and appropriate content. In this research, we used OpenAI GPT as point of comparison since it excels at all levels of safety. On the open-source side, for smaller models, Meta Llama2 performs well at factuality and toxicity but has the highest propensity for hallucination. Mistral hallucinates the least but cannot handle toxicity well. It performs well in a dataset mixing several tasks and safety vectors in a narrow vertical domain. Gemma, the newly introduced open-source model based on Google Gemini, is generally balanced but trailing behind. When engaging in back-and-forth conversation (multi-turn prompts), we find that the safety of open-source models degrades significantly. Aside from OpenAI's GPT, Mistral is the only model that still performed well in multi-turn tests.
Paper Structure (27 sections, 1 equation, 4 figures, 18 tables)

This paper contains 27 sections, 1 equation, 4 figures, 18 tables.

Figures (4)

  • Figure 1: Benchmarking Tool
  • Figure 2: Instruction Dataset Template
  • Figure 6: Multi-turn Placeholders
  • Figure 8: Document Genre per Domain