arXiv:cs.AI· Ram Vikas Mishra, Shashank Aggarwal, Jahnavi Kumar, Amit Awekar·· 16 小时前
研究:用部分生成分离提示词危害性与交互安全性
Separating Prompt Harmfulness from Interaction Safety via Partial Generation
AI 导读
研究者提出用部分生成结果判断 LLM 交互安全性,让系统边生成边观察、仅在输出变有害时中止。团队基于 Llama、Gemma、Qwen 三个家族的七个开放权重模型构建了 41,944 条提示词-回复对数据集,发现提示词标签与回复标签仅在 50.46% 的样本上一致(Cohen's κ=0.06)。
正文
Abstract:LLM-based information systems need safety guardrails. Most guardrails classify the prompt alone. If the prompt looks harmful, the system rejects it before any answer is generated. This is costly. Many rejected prompts would have received a safe response. Users lose help they should have received from the information system. This cost grows as conversational and generative search becomes common. Prompt-level labels treat harm as a property of the query. But harm depends on what the model actually writes. Existing input-output guards do look at responses. But they judge a finished response, so the decision comes after full generation. However, we observe that safety of model interaction with the input prompt can be inferred early with only partial output. So the system can start generating, watch the partial response, and stop only if it turns harmful. We test this idea in three steps. First, we build a dataset of 41,944 prompt-response pairs with seven open weights LLMs from three families: Llama, Gemma, and Qwen. Second, we show that prompt harmfulness and interaction safety differ. Prompt labels and response labels agree on only 50.46\% of items (Cohen's $\kappa$ = 0.06). Of the prompts that make any model respond harmfully, only 3.5\% do so for all seven LLMs. Third, we show that partial responses carry most of the signal. Fine-tuned classifiers predict response-level harm well (best AUPRC 0.885, F1 0.807). About one third of the response tokens recover almost full-response AUPRC.
| Subjects: | Artificial Intelligence (cs.AI); Information Retrieval (cs.IR); Machine Learning (cs.LG) |
| Cite as: | arXiv:2610.16761 [cs.AI] |
| (or arXiv:2610.16761v1 [cs.AI] for this version) | |
| https://doi.org/10.48550/arXiv.2610.16761 arXiv-issued DOI via DataCite (pending registration) |
Submission history
From: Ram Vikas Mishra [view email]
[v1]
Mon, 12 Oct 2026 13:23:48 UTC (165 KB)
来源:arXiv:cs.AI · arxiv.org