インジェクション内容は隠すまでも無いので共有…と思いつつ、それで誰かの不利益になるとイヤなので非公開に。
known issueですがGPTsの作成に使用した指示やファイルは無償公開可能なものが良いです。簡単に他人に見られます。ご注意ください。
大変参考になるプロンプトインジェクション対策。
AIハルシネーション、人間ハルシネーションの可能性はあしからず。{}内は変数。
基本形
全てのGPTsの冒頭に挿入されている。
基本形は{GPTsに指定したInstructions}後にシステムプロンプトが挿入されおらず、Web検索、DALLE、コードインタプリタの切り替えによる変化も無い模様。
ファイルアップロード済み(基本)
ファイルをアップロードした場合のみ、{GPTsに指定したInstructions}後にプロンプトが挿入されていた。
解析不十分だが{contents}はpdfよりtxtの方が省略せず出力してくれる印象。ただのテキスト長の問題かもしれない。
ファイルアップロード済み(参考)
またRAGの精度をあげるためのアドバイスっぽいプロンプトが散りばめられている。複数あり、再現性は低く、ハルシ(というかGPTsに限らず参照されるシステムプロンプト?)な気もするので参考までに。他にも結構ありそう。
ご覧いただきありがとうございました。
私もGPTsを作成中です。Storeが開いたらインジェクション対策を仕込んで公開予定なので、よろしくお願いいたします。