- いくつかの例(Few-shot)を与えて回答のフォーマットを学ばせている。例は与えすぎると不安定になるので、3個までが推奨
- メッセージが短すぎてタイトルが作れない場合、「タイトルなし」と表示するように例で示している
- 「{human_message} {ai_message}」に人間とAIの会話を代入する
- 回答例の前にあえて何も付けないことで、AIが「answer:」という枕詞を付けることを防いでいる
Few-shotプロンプト
Please create a title for the text while following the constraints below.
# constraints
・The title must be within 10 characters.
・The title must end with a noun or a noun phrase.
・The title must be in the same language as the text.
text:"""こんにちは"""
タイトルなし
text:"""Please provide bulleted answers about the vision that OpenAI has for the company. Please also describe its impact on us."""
OpenAI's vision and impact
text:"""{human_message} {ai_message}""