AXCEL : Automated e X plainable Consistency Evaluation using LLM s (2024)

Abstract: Large Language Models (LLMs) are widely used in both industry and academia for various tasks, yet evaluating the consistency of generated text responses continues to be a challenge. Traditional metrics like ROUGE and BLEU show a weak correlation with human judgment. More sophisticated metrics using Natural Language Inference (NLI) have shown improved correlations but are complex to implement, require domain-specific training due to poor cross-domain generalization, and lack explainability. More recently, prompt-based metrics using LLMs as evaluators have emerged; while they are easier to implement, they still lack explainability and depend on task-specific prompts, which limits their generalizability. This work introduces Automated eXplainable Consistency Evaluation using LLMs (AXCEL), a prompt-based consistency metric which offers explanations for the consistency scores by providing detailed reasoning and pinpointing inconsistent text spans. AXCEL is also a generalizable metric which can be adopted to multiple tasks without changing the prompt. AXCEL outperforms both non-prompt and prompt-based state-of-the-art (SOTA) metrics in detecting inconsistencies across summarization by 8.7%, free text generation by 6.2%, and data-to-text conversion tasks by 29.4%. We also evaluate the influence of underlying LLMs on prompt based metric performance and recalibrate the SOTA prompt-based metrics with the latest LLMs for fair comparison. Further, we show that AXCEL demonstrates strong performance using open source LLMs.

## introduction recent advances in natural language processing (nlp) have led to the development of large language models (llm), which can generate text virtually indistinguishable from that created by hu-* these authors contributed equally to this work. mans. these models are adept at interpreting and executing natural language instructions @xcite , allowing them to undertake tasks such as summarization and classification directly, without additional training @xcite . this has catalysed their incorporation into a broad spectrum of mainstream applications, including summarization systems, interactive chatbots, and virtual assistants. however, studies @xcite have shown that llm outputs can contain hallucinations, meaning the output is not consistent or irrelevant to the given context. identifying these consistency issues is challenging because the errors typically align with the task's overarching structure and theme, making them subtle and difficult to detect. evaluating the generated text for such issues is crucial to ensure trust and reliability, enabling successful adoption of llms across various applications. a widely accepted gold-standard approach for evaluating generated text is human evaluation. however, it is labor-intensive, time-consuming, and requires subject-matter expertise, making it expensive for large-scale applications. this underscores the need for automated metrics to efficiently evaluate consistency, defined as the degree to which the generated text aligns with its source. in the context of this paper, consistency and hallucination are inversely related; lower consistency scores correspond to higher degrees of hallucination. thus, inconsistency and hallucination are used interchangeably. several metrics have been proposed in the literature for measuring consistency, ranging from simple textual similarity-based metrics to natural language inference (nli) based methods. textual similarity-based metrics, such as rouge @xcite , bleu @xcite , and bertscore @xcite , require a reference text written by humans and exhibit weak correlation with human evaluation @xcite . on the other hand, nli-based methods, like alignscore @xcite and summac @xcite , are referencefree and demonstrate better correlation with human judgment; however they struggle with generalization and require bespoke models trained on specific data to enhance generalization. recent interest in llms has led to the application of llms as evaluators @xcite @xcite . these llm based approaches design prompts to assess the factual consistency of generated texts with respect to the source text. these prompt-based metrics show strong correlation with human judgments and do not require custom training, relying instead on the emergent abilities of llms. however, their effectiveness is limited by the specificity of their prompts, which are often tailored to particular tasks, such as geval @xcite using different prompts for different datasets. additionally, both nli-based and prompt-based metrics are black-box evaluators, providing scores without explanations. explainability is crucial not only for building trust in the metrics, but also for providing actionable feedback to improve upstream text generation systems. to address these challenges, we introduce automated explainable consistency evaluation using llms (axcel), a reference-free, promptbased metric that exhibits a high level of agreement with human judgment and provides explainability. axcel utilizes chain of thought (cot) and few shot prompting techniques. beyond scoring, axcel also provides detailed reasoning behind the score, facilitating more trust and easier identification of hallucinations in consistency scoring as compared to black box approaches. axcel also generalises across multiple tasks and llms of varied sizes without requiring any modifications to the prompt. this capability stems from the incontext learning via the few shot exemplars which allow it to get an understanding of the tasks. in experiments, axcel is benchmarked on three tasks: 1) summarization, a typical nlp task with textual inputs and outputs; 2) free text generation, a setting without any external knowledge source to evaluate consistency of generated text; 3) data-to-text conversion, conversion of json to a textual overview. these tasks were selected due to the diversity they represent, aiding in evaluating the generalizability of axcel. further, prompt-based metrics heavily rely on the underlying llm for their performance; however, current literature does not consider the effect of the llm when comparing these metrics. to account for the effect of llm, our experiments compare prompt-based metrics across the same set of underlying llms. the major contributions of this work are: prompt-based metrics: the advent of llms has led to an influx of consistency metrics that use llms as evaluators. these approaches range from zero-shot evaluators @xcite @xcite to those using chain of thought (cot) like g-eval @xcite . these metrics output a score, but they are black-box in nature. the stochastic nature of llms and the lack of reasoning behind the scores make these black-box metrics difficult to interpret and use. selfcheckgpt @xcite also includes a prompt-based variant, which performs setence level consitency evaluation and averages sentence level scores to obtain a paragraph level consistency score. ## methodology in this section, consistency is first defined, followed by a detailed discussion of axcel's methodology. ## experiments in this section, experimental setup and main results are discussed. due to space constrains additional results, error analysis of axcel's explanations, computational cost and detailed prompts are presented in appendix a ## conclusion in this paper, we introduce a novel reference-free, prompt-based metric, axcel, designed to mea-sure the consistency of responses generated by llms. axcel combines the cot and few-shot prompting techniques to guide llms through a process that includes fact extraction and verification. furthermore, axcel offers explainability, providing reasoning for consistency scores, which makes trusting the scores easier as compared to the blackbox approaches. it also helps pin-point the span of hallucinated text which can be used as feedback to improve the upstream text generation system. axcel was tested on three diverse tasks and was shown to outperform or perform as well as the current sota approaches. non-prompt-based metrics like alignscore and ragtruth llama-2-13b rely on domain-specific training data to achieve generalization, requiring costly data annotation. for instance, alignscore exhibits suboptimal performance on the ragtruth data2text task. conversely, prompt-based metrics such as geval and ragtruth-prompt employ task-specific prompts, limiting their generalizability. axcel bridges these approaches by maintaining consistent instruction prompts across tasks and changing only the few shot exemplars, which requires annotating approximately 10 domain-specific instances, significantly less costly than extensive training or finetuning. this highlights axcel's ability to generalize as a metric across tasks better than its counterparts. furthermore, in this paper, we show that the performance of prompt-based metrics is heavily dependent on the performance of the underlying llm. with continual improvements in llms, the performance of prompt-based metrics is bound to improve. finally, we show that axcel demonstrates strong performance using llama-3-8b across all three tasks, as seen in tables 2a, 3 and 4; making axcel extendable to open source llms.