arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.15543cs.SEcs.AI
收藏

跨大语言模型(LLM)API的对话保留测试:用于检测隐性信息丢失的基于规则的预言机

Testing Conversation Preservation Across LLM APIs: A Rule-Based Oracle for Detecting Silent Information Loss

Griffith University(格里菲斯大学)

Xin Liu, Xu Han, Yuxin Wang, Haoran Song, Mingjian Zhao, Lei Wang

AI总结:

本研究提出基于规则的预言机isloss,用于检测LLM API转换中的隐性信息丢失,经评估其故障检测率达76.0%,证实对话保留是LLM可靠应用的关键正确性要求。

摘要:

LLM应用越来越依赖转换器和兼容层在API间迁移对话。然而,转换后的请求可能被目标API接受,却隐性丢失指令角色、工具交互、错误状态或生成控制等信息。我们推出isloss,一种用于测试LLM API转换中对话信息保留的确定性预言机。它将源请求与转换后的请求、回复映射到共享中间表示ConvIR,并应用显式规则区分合法表示变更与信息丢失。与模式验证或基于参考的差异测试不同,isloss既不需要参考转换,也不需要额外的模型调用,还能区分可避免的丢失与目标API限制导致的降级。我们通过基于规范的故障注入、人工审查,以及在转换器、网关和客户端库上的实验对isloss进行评估:在保留的测试中,它检测到125个植入故障中的95个(76.0%),误报为100个中的2个(2.0%);在涵盖5个转换器代码库6种配置的合成请求套件中,685次完成转换里有127次(18.5%)通过静态目标检查,却隐性更改了目标API本可保留的提示、角色或工具信息;在转换后的回复中,558个流里有203个(36.4%)会在至少一个受测官方OpenAI SDK中引发异常或隐性损坏;针对6种模型的定向实验显示,当任务依赖受影响信息时,转换引发的变更可改变模型行为。这些结果确立了对话保留是可靠LLM互操作性、智能体执行及模型评估的一项独特正确性要求。

英文摘要:

LLM applications increasingly rely on translators and compatibility layers to move conversations across APIs. Yet a translated request can be accepted by the target API while silently losing information about instruction roles, tool interactions, error states, or generation controls. We introduce isloss, a deterministic oracle for testing conversation-information preservation across LLM API translations. It maps source and translated requests and replies to a shared intermediate representation, ConvIR, and applies explicit rules to distinguish legitimate representation changes from information loss. Unlike schema validation or reference-based differential testing, isloss requires neither a reference translation nor additional model calls. It also distinguishes avoidable loss from degradation caused by target API limitations. We evaluate isloss using specification-based fault injection, human review, and experiments on translators, gateways, and client libraries. On held-out tests, it detects 95/125 planted faults (76.0%) with 2/100 false alarms (2.0%). Across a synthetic request suite spanning six configurations of five translator codebases, 127/685 completed translations (18.5%) pass static target checks while silently changing prompt, role, or tool information in ways the target API could have preserved. In translated replies, 203/558 streams (36.4%) cause exceptions or silent corruption in at least one tested official OpenAI SDK. Targeted experiments across six models show that translation-induced changes can alter model behaviour when tasks depend on the affected information. These results establish conversation preservation as a distinct correctness requirement for reliable LLM interoperability, agent execution, and model evaluation.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑