Large Language Models (LLMs) are revolutionizing various domains, yet verifying their answers remains a significant challenge, especially for intricate open-ended tasks such as consolidation, summarization, and extraction of knowledge. In this work, we propose CheckEmbed: an accurate, scalable, and simple LLM verification approach. CheckEmbed is driven by a straightforward yet powerful idea: in order to compare LLM solutions to one another or to the ground-truth, compare their corresponding answer-level embeddings obtained with a model such as GPT Text Embedding Large. This reduces a complex textual answer to a single embedding, facilitating straightforward, fast, and meaningful verification. We develop a comprehensive verification pipeline implementing the CheckEmbed methodology. The CheckEmbed pipeline also comes with metrics for assessing the truthfulness of the LLM answers, such as embedding heatmaps and their summaries. We show how to use these metrics for deploying practical engines that decide whether an LLM answer is satisfactory or not. We apply the pipeline to real-world document analysis tasks, including term extraction and document summarization, showcasing significant improvements in accuracy, cost-effectiveness, and runtime performance compared to existing token-, sentence-, and fact-level schemes such as BERTScore or SelfCheckGPT.
翻译:大语言模型(LLM)正在革新各个领域,但其答案的验证仍是一个重大挑战,尤其对于知识整合、摘要生成和信息提取等复杂的开放式任务。本研究提出CheckEmbed:一种精确、可扩展且简洁的LLM验证方法。该方法基于一个简单而强大的核心思想:为比较LLM生成的解决方案之间或与标准答案的差异,可通过GPT Text Embedding Large等模型获取答案级别的嵌入表示并进行比对。该方法将复杂的文本答案简化为单一嵌入向量,从而实现直接、快速且具有语义意义的验证。我们开发了完整实现CheckEmbed方法的验证流程。该流程还包含用于评估LLM答案真实性的量化指标,例如嵌入热力图及其统计摘要。我们演示了如何利用这些指标构建实际决策引擎,以判定LLM答案是否满足要求。通过将验证流程应用于真实文档分析任务(包括术语提取与文档摘要),相较于现有的基于词汇、句子和事实层面的验证方案(如BERTScore或SelfCheckGPT),本方法在准确率、成本效益和运行效率方面均展现出显著优势。