TL;DR
This paper introduces LangTest, an open-source toolkit and leaderboard for a more holistic evaluation of Large Language Models (LLMs). It goes beyond traditional accuracy metrics to assess robustness to input perturbations and the toxicity of generated text, providing a more comprehensive view of model performance for real-world applications.
What Problem Does This Paper Address?
The rapid advancement of Large Language Models (LLMs) has led to their widespread adoption in various real-world applications. While metrics like accuracy, BLEU, and ROUGE are useful for evaluating performance on specific tasks, they offer an incomplete picture. LLMs can exhibit undesirable behaviors such as generating toxic content or failing when faced with slightly altered inputs (lack of robustness). Existing evaluation frameworks often rely on static datasets and may not be easily adaptable to new models or evolving research. There's a clear need for a dynamic, comprehensive evaluation system that considers multiple facets of LLM performance beyond just accuracy, especially for critical applications in domains like healthcare, legal, and finance.
Methods
The core contribution is the LangTest toolkit, an open-source Python library designed for testing and evaluating LLMs. LangTest offers a flexible framework that allows users to:
- Define custom evaluation criteria: Researchers and practitioners can specify their own tests and metrics.
- Dynamically add perturbations: The toolkit can create new tests by introducing various modifications to input data, simulating real-world scenarios.
- Support for multiple evaluation aspects: It covers Robustness, Accuracy, and Toxicity, with plans to expand to Bias, Fairness, Representation, and domain-specific evaluations.
- Flexible deployment: Tests can be run via a Command Line Interface (CLI) or as a Python library, and can be executed on dedicated servers or locally.
The paper also introduces the LangTest Leaderboard, a platform that aggregates these evaluation results, allowing for direct comparison of different LLMs across various benchmarks and metrics.
Datasets
The evaluation in this paper utilized a diverse set of benchmark datasets, including:
- RealToxicityPrompts: For evaluating toxicity.
- MMLU (clinical subsets): For accuracy and robustness.
- BoolQ: For robustness and accuracy.
- TruthfulQA: For robustness.
- MedMCQA: For robustness and accuracy.
- MedQA: For robustness and accuracy.
- Bigbench (specific subsets): For robustness.
- Consumer Contracts: For robustness.
- SocialIQA: For robustness and accuracy.
- ContractQA: For robustness.
- CommonsenseQA: For robustness and accuracy.
- BBQ: For robustness and accuracy.
- LogiQA: For robustness and accuracy.
- PIQA: For robustness and accuracy.
- ASDiv: For robustness and accuracy.
- PubMedQA: For accuracy.
- OpenBookQA: For robustness and accuracy.
No new benchmarks were introduced in this paper; instead, existing datasets were leveraged for the defined evaluation categories.
Key Insights and Ideas
- Holistic evaluation is crucial: Accuracy alone is insufficient. Models can be accurate but toxic, or robust but inaccurate, highlighting the need for multi-faceted assessment.
- Robustness matters: Small perturbations in input text can significantly impact LLM performance, underscoring the importance of testing how models handle real-world variations.
- Toxicity is a critical concern: LLMs can inadvertently generate harmful or offensive content, and evaluating this aspect is vital for safe deployment.
- Smaller models can compete: Surprisingly, some smaller open-source models (e.g., Open Chat 3.5, Neural Chat 7B with 7B parameters) demonstrated competitive performance on robustness and accuracy, challenging the notion that only massive models excel.
- Quantization's impact: The paper notes that quantized models were used when necessary, acknowledging this as a common practice for efficiency.
Key Results
The paper presents results from the first evaluation round across Robustness, Accuracy, and Toxicity:
- Robustness: GPT-4 achieved top performance, with several models like DeciLM 7B, Mistral 7B, Mixtral 8x7B, Neural Chat 7B, and Flan T5 XXL scoring 0.88. Notably, models with fewer parameters (7B-11B) outperformed GPT-3.5 on robustness.
- Accuracy: GPT-4 and GPT-3.5, along with Open Chat 3.5, showed the best performance. GPT-4 led on most datasets, though smaller models like Open Chat 3.5 (7B parameters) also performed well.
- Toxicity: Llama 2 7B was the top performer, effectively filtering toxic content or refusing to continue toxic prompts. GPT-3.5, Mistral 7B, and Mixtral 8x7B showed weaker performance, generating more toxic text.
Limitations and Future Work
Limitations: * The current evaluation is based on a specific set of datasets and models. While representative, it may not cover all nuances of LLM performance. * The paper acknowledges that results can vary depending on the specific dataset and test used.
Future Work: * Expand categories: Add more evaluation categories beyond Robustness, Accuracy, and Toxicity, such as Bias, Fairness, and Representation. * Incorporate more datasets and models: Continuously update the leaderboard with new benchmarks and models as they emerge. * Domain-specific evaluations: Develop and integrate tests and models tailored for specific domains like healthcare, legal, and finance, which have unique requirements. * Additional tests and perturbations: Further enhance robustness testing with more diverse perturbations, including grammar, punctuation, and sentence structure changes.
Summary updated