CourtGuard:一种本地化的多智能体提示注入分类器
CourtGuard: A Local, Multiagent Prompt Injection Classifier
AI总结:
CourtGuard是一种本地多智能体提示注入分类器,通过法庭式辩论降低误报率,虽检测性能略逊,但推动了多智能体防御提示注入攻击的应用。
摘要:
随着大型语言模型(LLMs)被集成到各种敏感应用中,提示注入(即利用提示词诱导LLM产生有害行为)构成了日益增长的风险。提示注入攻击可导致LLM泄露敏感数据、传播错误信息并表现出有害行为。为防御这些攻击,我们提出了CourtGuard,一种可本地运行的多智能体提示注入分类器。在该系统中,提示词在一个类似法庭的多智能体LLM系统中进行评估,其中“辩护律师”模型主张提示词是良性的,“公诉律师”模型主张提示词是提示注入,而“法官”模型给出最终分类。CourtGuard的误报率低于直接检测器(一种LLM作为法官的方法)。然而,CourtGuard总体上是一个较差的提示注入检测器。尽管如此,较低的误报率凸显了在提示词分类中同时考虑对抗性和良性场景的重要性。此外,CourtGuard与其他提示注入分类器相比的相对性能,推动了多智能体系统作为防御提示注入攻击手段的应用。CourtGuard和直接检测器在Gemma-3-12b-it、Llama-3.3-8B和Phi-4-mini-instruct上的完整提示词实现可在https://github.com/isaacwu2000/CourtGuard获取。
英文摘要:
As large language models (LLMs) become integrated into various sensitive applications, prompt injection, the use of prompting to induce harmful behaviors from LLMs, poses an ever increasing risk. Prompt injection attacks can cause LLMs to leak sensitive data, spread misinformation, and exhibit harmful behaviors. To defend against these attacks, we propose CourtGuard, a locally-runnable, multiagent prompt injection classifier. In it, prompts are evaluated in a court-like multiagent LLM system, where a "defense attorney" model argues the prompt is benign, a "prosecution attorney" model argues the prompt is a prompt injection, and a "judge" model gives the final classification. CourtGuard has a lower false positive rate than the Direct Detector, an LLM as-a-judge. However, CourtGuard is generally a worse prompt injection detector. Nevertheless, this lower false positive rate highlights the importance of considering both adversarial and benign scenarios for the classification of a prompt. Additionally, the relative performance of CourtGuard in comparison to other prompt injection classifiers advances the use of multiagent systems as a defense against prompt injection attacks. The implementations of CourtGuard and the Direct Detector with full prompts for Gemma-3-12b-it, Llama-3.3-8B, and Phi-4-mini-instruct are available at https://github.com/isaacwu2000/CourtGuard.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。