QEUR23_PHI2SFT17: アンサンブル処理でReasoningの品質を改善する
~ アンサンブルは機械学習でよく使います。なぜなら・・・。 ~ ・・・ 前回の続きです ・・・ QEU:FOUNDER : “今回、せっかく2つのLLMからの推論出力が出てきたのだから、アンサンブル処理をやってみたいと思うんだ。” D先生(設定年齢65歳) : “古典的な機械学習では、 ランダムフォレスト(RF)のような手法 ですか?LLMで、そんなことができるんですか?” QEU:FOUNDER : “ Prompt Engineeringを駆使すればアンサンブル処理を実施することができます 。じゃあ、プログラムをドン!!ただし、プログラムの1部だけです。Prompt Engineeringにかかわる部分だけです。” ################### # テンプレートの準備 ############### # ---- str_template_1reasoning = """ You are an excellent logician who teaches your client (user) ```thinking procedures('reasoning') to provide higher quality answers to user-provided prompt ('question').``` Read the example named 'Question_and_Answer' below and write the appropriate reasoning logic ('improved_reasoning') fol-lowing the prompt. Here, 'ref_reasoning' which was already generated by other LLM models, are shown for reference. User is not very satisfied with the reasoning and would like to improve them. Please write your answer('impro...