Prompt Perturbation in Retrieval-Augmented Generation based Large Language Models

要約

大規模言語モデル (LLM) の使用が広範囲のドメインで急速に増加するにつれて、その堅牢性はますます重要になっています。
検索拡張生成 (RAG) は、LLM からのテキスト生成の信頼性を向上させる手段として考慮されています。
ただし、RAG ベースの LLM からの出力がわずかに異なる入力によってどのような影響を受けるかについては十分に研究されていません。
この研究では、プロンプトに短いプレフィックスを挿入しただけでも、事実上の正しい答えからかけ離れた出力が生成されることがわかりました。
私たちは、Gradient Guided Prompt Perturbation (GGPP) と呼ばれる新しい最適化手法を導入することにより、RAG に対するこのようなプレフィックスの影響を体系的に評価します。
GGPP は、RAG ベースの LLM の出力をターゲットを絞った誤った答えに導く際に高い成功率を達成します。
また、無関係なコンテキストを無視するように要求するプロンプト内の指示にも対処できます。
また、GGPP 摂動がある場合とない場合のプロンプト間の LLM のニューロン活性化の違いを利用して、GGPP で生成されたプロンプトによってトリガーされるニューロン活性化について訓練された非常に効果的な検出器を通じて、RAG ベースの LLM の堅牢性を向上させる方法を提供します。
オープンソースの LLM に対する私たちの評価は、私たちの手法の有効性を実証しています。

要約(オリジナル)

The robustness of large language models (LLMs) becomes increasingly important as their use rapidly grows in a wide range of domains. Retrieval-Augmented Generation (RAG) is considered as a means to improve the trustworthiness of text generation from LLMs. However, how the outputs from RAG-based LLMs are affected by slightly different inputs is not well studied. In this work, we find that the insertion of even a short prefix to the prompt leads to the generation of outputs far away from factually correct answers. We systematically evaluate the effect of such prefixes on RAG by introducing a novel optimization technique called Gradient Guided Prompt Perturbation (GGPP). GGPP achieves a high success rate in steering outputs of RAG-based LLMs to targeted wrong answers. It can also cope with instructions in the prompts requesting to ignore irrelevant context. We also exploit LLMs’ neuron activation difference between prompts with and without GGPP perturbations to give a method that improves the robustness of RAG-based LLMs through a highly effective detector trained on neuron activation triggered by GGPP generated prompts. Our evaluation on open-sourced LLMs demonstrates the effectiveness of our methods.

arxiv情報

著者 Zhibo Hu,Chen Wang,Yanfeng Shu,Helen,Paik,Liming Zhu
発行日 2024-06-20 14:07:27+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.IR, H.3.3 パーマリンク