arXiv:2502.08142cs.AI2025-02被引 9

构建安全防护流水线,提升大模型推理的可靠性和安全性。

Bridging the Safety Gap: A Guardrail Pipeline for Trustworthy LLM Inferences

  • 分模块设计安全防护流水线,覆盖输入检测、上下文增强、实时修正等环节。
  • 误报率低,100%准确拦截恶意链接,每查询仅需1.06秒。
  • 可有效减少幻觉,修复准确率达80.7%,适合部署于高安全需求场景。

我们提出Wildflare GuardRail,一个用于提升大语言模型(LLM)推理安全性和可靠性的防护流水线,系统性地应对整个处理流程中的风险。该流水线集成多个核心模块:Safety Detector 能识别不安全输入并检测模型输出中的幻觉,同时生成根因解释;Grounding 通过向量数据库检索信息,为用户查询提供上下文;Customizer 使用轻量级规则封装器实时调整输出;Repairer 则利用Safety Detector提供的幻觉解释纠正错误输出。实验表明,Safety Detector在小规模公开数据集上训练,其不安全内容检测性能接近OpenAI API;轻量级封装器可在每查询1.06秒内以100%准确率拦截恶意链接,无需昂贵的模型调用;幻觉修复模型在减少幻觉方面表现良好,准确率达80.7%。

原文摘要 · Abstract (English)

We present Wildflare GuardRail, a guardrail pipeline designed to enhance the safety and reliability of Large Language Model (LLM) inferences by systematically addressing risks across the entire processing workflow. Wildflare GuardRail integrates several core functional modules, including Safety Detector that identifies unsafe inputs and detects hallucinations in model outputs while generating root-cause explanations, Grounding that contextualizes user queries with information retrieved from vector databases, Customizer that adjusts outputs in real time using lightweight, rule-based wrappers, and Repairer that corrects erroneous LLM outputs using hallucination explanations provided by Safety Detector. Results show that our unsafe content detection model in Safety Detector achieves comparable performance with OpenAI API, though trained on a small dataset constructed with several public datasets. Meanwhile, the lightweight wrappers can address malicious URLs in model outputs in 1.06s per query with 100% accuracy without costly model calls. Moreover, the hallucination fixing model demonstrates effectiveness in reducing hallucinations with an accuracy of 80.7%.

大模型安全幻觉抑制防护流水线

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。