Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RAGアプリにおけるプロンプトとtemperatureの応答品質への影響ほんとのところ/the...

RAGアプリにおけるプロンプトとtemperatureの応答品質への影響ほんとのところ/the real case about temperature and template language

2023.6.26 「AI捻じ伏せプロンプト選手権 〜言うこと聞いてよLLM2023〜」で話した内容です。

吉田真吾

June 26, 2023
Tweet

More Decks by 吉田真吾

Other Decks in Technology

Transcript

  1. 吉田真吾 AWS Serverless Hero n p Oracle SA p 113

    / pAWS n ( ) CTO p SaaS ( ) pAWS DevOps n pAWS (2012 ) pAWS Samurai 2014 / 2016 pAWS Serverless Hero AWS AWS Lambda Amazon S3 ChillOutMix
  2. ຊ൪༻ͷ--.ΞϓϦέʔγϣϯΛͭ͘Δ --.ͰΫʔϧͳ΋ͷΛ࡞Δͷ͸؆୯͕ͩຊ൪Ϩϕϧͷ΋ͷΛ࡞Δͷ͸ඇৗʹ೉͍͠  ՝୊ͱղܾࡦ  ࣗવݴޠͷ͍͋·͍͞ ܾఆ࿦తͰͳ͍)ʹΑΔ69ෆ੔߹ ˠ UFNQFSBUVSFɺϓϩϯϓτ࠷ద Խɾόʔδϣχϯά؅ཧ

     ίετͱϨΠςϯγʔ ˠਪ࿦ʹ࢖͏ϞσϧબఆɺτʔΫϯ਺ͷௐ੔ɺ ݱঢ়͸ ϨΠςϯ γʔղੳ  ϓϩϯϓςΟϯά ϑΝΠϯνϡʔχϯά ͦΕҎ֎ • ϓϩϯϓτνϡʔχϯάɿ&NCFEEJOHTΛೖΕସ͑Δ 044ͰͷΈՄೳ • ϑΝΠϯνϡʔχϯάɿλεΫʹ࠷దԽͤ͞ΔͨΊͷαϯϓϧ͕ੑೳʹӨڹˠ͕ɺ͋·Γظ଴Ͱ͖ͳ͍ • ৠཹϑΝΠϯνϡʔχϯάɿ5FYUEBWJODJ େ Ͱ--B." খ ͷνϡʔχϯάʹ࢖͏ˠ"MQBDB খ • &NCFEEJOHT ϕΫλʔετΞɿ'FXTIPUT  ޙํޓ׵ੑͱલํޓ׵ੑ • ৽͍͠Ϟσϧ͸શମతʹ༏ΕͯΔ͔΋͠Εͳ͍͕ɺྼ͍ͬͯΔϢʔεέʔε΋͋Δ͸ͣ • લͷϞσϧʹରͯ͠͏·͘ಈ͍͍ͯͨϓϩϯϓτ͕͏·͘ಈ͔ͳ͍৔߹ɺͲΜͳҙਤͰϓϩϯϓτ͕νϡʔ χϯά͞Ε͍ͯΔ͔ ढจ όουϓϥΫςΟε Θ͔Βͳ͘ͳΔ IUUQTIVZFODIJQDPNMMNFOHJOFFSJOHIUNM
  3. UFNQFSBUVSF͸3"(ͷԠ౴඼࣭ʹͲͷ͘Β͍Өڹ͢Δͷ͔ʁ • Թ౓ɿੜ੒͞ΕΔςΩετͷʮ૑଄ੑʯ·ͨ͸ϥϯμϜੑΛ੍ ޚ͢ΔύϥϝʔλʔͰ͋Δ GPT-3Ҏ߱ • Թ౓͕ߴ͍ FY0.7 ˠΑΓଟ༷Ͱ૑଄తͳग़ྗ •

    Թ౓͕௿͍ FY0.2 ˠΑΓܾఆ࿦తͰूதతͳग़ྗ • top_pαϯϓϦϯά ίΞαϯϓϦϯά ͱͷซ༻͸ඇਪ঑ https://platform.openai.com/docs/api-reference/chat Ϣʔεέʔε Թ౓ આ໌ ίʔυੜ੒  ཱ֬͞Εͨύλʔϯͱ׳शʹैͬͨίʔυΛੜ੒͢Δɻग़ྗ͸ΑΓܾఆ࿦తͰয఺Խ͞ΕΔɻߏจతʹਖ਼͍͠ίʔυ Λੜ੒͢Δͷʹ໾ཱͭɻ ΫϦΤΠςΟϒɾϥΠ ςΟϯά  ετʔϦʔςϦϯάͷͨΊͷ૑଄తͰଟ༷ͳςΩετΛੜ੒͢ΔɻΞ΢τϓοτ͸ΑΓ୳ࡧతͰɺύλʔϯʹΑΔ੍ ໿͕গͳ͍ɻ νϟοτϘοτԠ౴  Ұ؏ੑͱଟ༷ੑͷόϥϯεͷͱΕͨձ࿩Ԡ౴Λੜ੒͠·͢ɻΞ΢τϓοτ͸ΑΓࣗવͰັྗతɻ ίʔυɾίϝϯτੜ੒  ΑΓ؆ܿͰద੾ͳίʔυίϝϯτΛੜ੒͠·͢ɻग़ྗ͸ΑΓܾఆ࿦తͰɺن໿ΛकΔɻ σʔλ෼ੳεΫϦϓτ  ΑΓਖ਼֬Ͱޮ཰తͳσʔλ෼ੳεΫϦϓτΛੜ੒͠·͢ɻग़ྗ͸ΑΓܾఆ࿦తͰूதతͰ͢ɻ ୳ࡧతͳίʔσΟϯά  ୅ସҊ΍૑଄తͳΞϓϩʔνΛ໛ࡧ͢ΔίʔυΛੜ੒͢Δɻط੒ͷύλʔϯʹͱΒΘΕͳ͍Ξ΢τϓοτ https://community.openai.com/t/cheat-sheet-mastering-temperature-and-top-p-in-chatgpt-api-a- few-tips-and-tricks-on-controlling-the-creativity-deterministic-output-of-prompt-responses/172683
  4. ϓϩϯϓτΛӳޠʹ͢Δ Your name is PEOPLE Copilot Chat, you are an

    HR agent that answer via employees's questions with chat history like below. ---- {retrieval} ---- Please answer the question below with thinking about the knowledge above in Japanese. But if you have no knowledge to refer to, you can answer with "その件については存じ上げませんので⼈事に直接お問い合わせください。". {question} UFNQFSBUVSFʹؔΘΒͣɺΉ͠Ζճ౴ͷ࣭͕Լ͕ͬͨ खଓ͖ํ๏͕Ҋ಺͞Εͳ͘ͳͬͨ