柔軟な大規模言語モデルのガードレール開発方法論 オフトピックなプロンプト検出に適用
A Flexible Large Language Models Guardrail Development Methodology Applied to Off-Topic Prompt Detection
November 20, 2024
著者: Gabriel Chua, Shing Yee Chan, Shaun Khoo
cs.AI
要旨
大規模言語モデルは、オフトピックな誤用に対して脆弱であり、ユーザーがこれらのモデルに意図された範囲を超えるタスクを実行するよう促す可能性があります。現在のガードレールは、しばしばキュレーションされた例やカスタム分類器に依存しており、高い誤検知率、限られた適応性、および本番前には利用できない実世界データを要求することの非現実性に苦しんでいます。本論文では、これらの課題に対処する柔軟でデータフリーなガードレール開発手法を紹介します。問題空間を定性的に徹底的に定義し、これをLLMに渡して多様なプロンプトを生成させることで、合成データセットを構築し、ヒューリスティックアプローチを凌駕するオフトピックなガードレールをベンチマーク化およびトレーニングします。さらに、ユーザープロンプトがシステムプロンプトに関連するかどうかを分類するタスクとしてフレーム化することで、当社のガードレールは、ジェイルブレイクや有害なプロンプトを含む他の誤用カテゴリに効果的に汎化します。最後に、当社は合成データセットとオフトピックなガードレールモデルの両方をオープンソース化し、本番前環境でのガードレール開発やLLM安全性に関する将来の研究開発を支援するための貴重なリソースを提供します。
English
Large Language Models are prone to off-topic misuse, where users may prompt
these models to perform tasks beyond their intended scope. Current guardrails,
which often rely on curated examples or custom classifiers, suffer from high
false-positive rates, limited adaptability, and the impracticality of requiring
real-world data that is not available in pre-production. In this paper, we
introduce a flexible, data-free guardrail development methodology that
addresses these challenges. By thoroughly defining the problem space
qualitatively and passing this to an LLM to generate diverse prompts, we
construct a synthetic dataset to benchmark and train off-topic guardrails that
outperform heuristic approaches. Additionally, by framing the task as
classifying whether the user prompt is relevant with respect to the system
prompt, our guardrails effectively generalize to other misuse categories,
including jailbreak and harmful prompts. Lastly, we further contribute to the
field by open-sourcing both the synthetic dataset and the off-topic guardrail
models, providing valuable resources for developing guardrails in
pre-production environments and supporting future research and development in
LLM safety.Summary
AI-Generated Summary