Large language models (LLMs) have emerged as a dominant AI paradigm due to their exceptional text understanding and generation capabilities. However, their tendency to generate inconsistent or erroneous outputs challenges their reliability, especially in high-stakes domains requiring accuracy and trustworthiness. Existing research primarily focuses on detecting and mitigating model misbehavior in general-purpose scenarios, often overlooking the potential of integrating domain-specific knowledge. In this work, we advance misbehavior detection by incorporating domain knowledge. The core idea is to design a general specification language that enables domain experts to customize domain-specific predicates in a lightweight and intuitive manner, supporting later runtime verification of LLM outputs. To achieve this, we design a novel specification language, ESL, and introduce a runtime verification framework, RvLLM, to validate LLM output against domain-specific constraints defined in ESL. We evaluate RvLLM on three representative tasks: violation detection against Singapore Rapid Transit Systems Act, numerical comparison, and inequality solving. Experimental results demonstrate that RvLLM effectively detects erroneous outputs across various LLMs in a lightweight and flexible manner. The results reveal that despite their impressive capabilities, LLMs remain prone to low-level errors due to limited interpretability and a lack of formal guarantees during inference, and our framework offers a potential long-term solution by leveraging expert domain knowledge to rigorously and efficiently verify LLM outputs.


翻译:大语言模型(LLMs)凭借其卓越的文本理解与生成能力,已成为主导性的人工智能范式。然而,其倾向于产生不一致或错误输出的特性,对其可靠性构成了挑战,尤其是在要求精确性与可信度的高风险领域。现有研究主要集中于检测和缓解通用场景下的模型不当行为,往往忽视了整合领域特定知识的潜力。本研究通过融入领域知识,推进了不当行为检测。其核心思想是设计一种通用的规约语言,使领域专家能够以轻量级且直观的方式定制领域特定的谓词,以支持后续对LLM输出的运行时验证。为此,我们设计了一种新颖的规约语言ESL,并引入了一个运行时验证框架RvLLM,用于根据ESL中定义的领域特定约束来验证LLM输出。我们在三个代表性任务上评估了RvLLM:违反《新加坡快速交通系统法案》的检测、数值比较以及不等式求解。实验结果表明,RvLLM能够以轻量级且灵活的方式有效检测各种LLM的错误输出。结果揭示,尽管LLMs能力令人印象深刻,但由于其可解释性有限且在推理过程中缺乏形式化保证,它们仍然容易犯低级错误。我们的框架通过利用专家领域知识来严格高效地验证LLM输出,提供了一种潜在的长期解决方案。

0
下载
关闭预览

相关内容

论文浅尝 | GEOM-GCN: Geometric Graph Convolutional Networks
开放知识图谱
14+阅读 · 2020年4月8日
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
17+阅读 · 2017年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员