A uto D etect: Towards a Unified Framework for Automated Weakness Detection in Large Language Models (2024)

Abstract: Although Large Language Models (LLMs) are becoming increasingly powerful, they still exhibit significant but subtle weaknesses, such as mistakes in instruction-following or coding tasks.As these unexpected errors could lead to severe consequences in practical deployments, it is crucial to investigate the limitations within LLMs systematically.Traditional benchmarking approaches cannot thoroughly pinpoint specific model deficiencies, while manual inspections are costly and not scalable. In this paper, we introduce a unified framework, AutoDetect, to automatically expose weaknesses in LLMs across various tasks. Inspired by the educational assessment process that measures students’ learning outcomes, AutoDetect consists of three LLM-powered agents: Examiner, Questioner, and Assessor.The collaboration among these three agents is designed to realize comprehensive and in-depth weakness identification. Our framework demonstrates significant success in uncovering flaws, with an identification success rate exceeding 30% in prominent models such as ChatGPT and Claude.More importantly, these identified weaknesses can guide specific model improvements, proving more effective than untargeted data augmentation methods like Self-Instruct. Our approach has led to substantial enhancements in popular LLMs, including the Llama series and Mistral-7b, boosting their performance by over 10% across several benchmarks.Code and data are publicly available at https://github.com/thu-coai/AutoDetect.

## introduction the developments in large language models (llms) are phenomenal: such models have demonstrated excellent performance in diverse tasks * equal contributions. ## experiments to comprehensively demonstrate the superior performance of autodetect, we have conducted extensive experiments on diverse tasks: instructionfollowing, mathematics, and coding, including weakness detection ( §4.1), model enhancement ( §4.2), comparisons with baseline methods ( §4.3), and iterative weakness recovery ( §4.4). implementation details can be found in appendix d. ## discussion with autodetect, we systematically identify potential weaknesses across various models. our comprehensive analysis reveals several notable findings, including the limitations within llms ( §5.1, shown in figure 5 ) and strengths of au-todetect ( §5.2, shown in figure 6 ), which may facilitate further research. ## conclusion in this work, we introduce a unified framework, autodetect, for identifying weaknesses across various models and diverse tasks, including instruction-following, mathematical reasoning, and coding. leveraging our method, we not only successfully uncover specific weaknesses but also effectively enhance the model performance using the data from the assessment process. our results highlight the potential of using large language models to automatically detect and address model weaknesses on general tasks, helping us better understand the boundaries of model capabilities and paving the way for automatic llm alignment.