Knowledge-based Consistency Testing of Large Language Models

Sai Sathiesh Rajan, Ezekiel Soremekun, Sudipta Chattopadhyay


Abstract
In this work, we systematically expose and measure the inconsistency and knowledge gaps of Large Language Models (LLMs). Specifically, we propose an automated testing framework (called KONTEST) which leverages a knowledge graph to construct test cases. KONTEST probes and measures the inconsistencies in the LLM’s knowledge of the world via a combination of semantically-equivalent queries and test oracles (metamorphic or ontological oracle). KONTEST further mitigates knowledge gaps via a weighted LLM model ensemble. Using four state-of-the-art LLMs (Falcon, Gemini, GPT3.5, and Llama2), we show that KONTEST generates 19.2% error inducing inputs (1917 errors from 9979 test inputs). It also reveals a 16.5% knowledge gap across all tested LLMs. A mitigation method informed by KONTEST’s test suite reduces LLM knowledge gap by 32.48%. Our ablation study further shows that GPT3.5 is not suitable for knowledge-based consistency testing because it is only 60%-68% effective in knowledge construction.
Anthology ID:
2024.findings-emnlp.596
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2024
Month:
November
Year:
2024
Address:
Miami, Florida, USA
Editors:
Yaser Al-Onaizan, Mohit Bansal, Yun-Nung Chen
Venue:
Findings
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
10185–10196
Language:
URL:
https://aclanthology.org/2024.findings-emnlp.596/
DOI:
10.18653/v1/2024.findings-emnlp.596
Bibkey:
Cite (ACL):
Sai Sathiesh Rajan, Ezekiel Soremekun, and Sudipta Chattopadhyay. 2024. Knowledge-based Consistency Testing of Large Language Models. In Findings of the Association for Computational Linguistics: EMNLP 2024, pages 10185–10196, Miami, Florida, USA. Association for Computational Linguistics.
Cite (Informal):
Knowledge-based Consistency Testing of Large Language Models (Rajan et al., Findings 2024)
Copy Citation:
PDF:
https://aclanthology.org/2024.findings-emnlp.596.pdf