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

宇宙最速!? でAmazon Bedrockを本格導入したプロダクト開発してみた件

宇宙最速!? でAmazon Bedrockを本格導入したプロダクト開発してみた件

生成系AIでデジタル時代の未来を探ろう
https://btc.connpass.com/event/295773/

みのるん

October 17, 2023
Tweet

More Decks by みのるん

Other Decks in Technology

Transcript

  1. Ӊ஦࠷଎ Ͱ
    "NB[PO#FESPDLΛ
    ຊ֨ಋೖͨ͠ϓϩμΫτ
    ։ൃͯ͠Έͨ݅
    ΈͷΔΜ !NJOPSVO 𝕏

    View full-size slide

  2. XIPBNJ
    御⽥ 稔 !NJOPSVO
    ςοΫΤόϯδΣϦετ
    ,%%*ΞδϟΠϧ։ൃηϯλʔגࣜձࣾʢ,"(ʣ,%%*݉຿
    Ϋϥ΢υΛத৺ʹ಺੡։ൃΛߦ͍ͳ͕Βɺഓٕͬͨज़φϨοδ΍
    ࣗࣾͷΤϯδχΞͨͪΛࣾ֎΁ൃ৴͢Δ׆ಈΛ͍ͯ͠·͢ɻ
    +"846(43&ࢧ෦ +"846(౦ژ +"84%":4ӡӦ
    • "84$PNNVOJUZ#VJMEFS
    • ,%%*$MPVE4".63"*
    • ,%%*$MPVE"NCBTTBEPST

    View full-size slide

  3. "NB[PO#FESPDLɺ
    Α͏΍͘("͞Ε·ͨ͠Ͷ🎉

    View full-size slide

  4. ࢥ͑͹݄͔Β൒೥ۙ͘଴ͪ·ͨ͠🦒

    View full-size slide

  5. ʢͦͷؒʹ΋--.Ҋ݅͸ࢮ͵΄Ͳ߱ͬͯ͘ΔͷͰɺ
    ਤΒͣ"[VSFσϏϡʔ΋ग़དྷͪΌ͍·ͨ͠ʣ

    View full-size slide

  6. Ͱ΋ɺ#FESPDL͞Μ
    ౦ژϦʔδϣϯ΁ͷ
    ల։ͷૣ͞͸ྲྀੴͰͨ͠👏

    View full-size slide

  7. ౦ژϦʔδϣϯ୯ಠͷ
    χϡʔεϦϦʔεͬͯ
    ͔ͳΓ௝͍͠Ͱ͢ΑͶɻ
    "84͕೔ຊࢢ৔Λ
    ॏࢹ͍ͯ͠Δ͜ͱ͕
    Ӑ͑·͢

    View full-size slide

  8. ʹ੺ࡔͰ#FESPDL͓൸࿐໨Πϕϯτ͕͋Γ
    άϩʔόϧ͔Βੜ੒ܥ"*୲౰ͷ
    7JDF1SFTJEFOU΋དྷ೔͞Ε͍ͯ·ͨ͠

    View full-size slide

  9. ͪͳΈʹ࠙਌ձͰԿؾͳ͘࿩͔͚ͨ͠ํ͕
    SF*OGPSDFͷ#FESPDLηογϣϯͰొஃ͞Ε͍ͯͨ
    άϩʔόϧͷ4"ɺΞϯυϦϡʔ͞ΜͰͨ͠😍
    2JJUBͰॻ͍͍ͯͨϨϙΛݟͤΔͱ
    ͜ΕԶͩΑʂͱരস͠੝Γ্͕Δ

    View full-size slide

  10. ͜ͷ೔ɺ"84ͷهऀձݟ͕͋ͬͨͷͰ͕͢
    ,%%*͔Β΋໾һ͕ಉ੮͠ࣄྫΛൃද͍ͯ͠·ͨ͠

    View full-size slide

  11. Ӊ஦࠷଎ ͷ#FESPDL࣮૷ΞϓϦʮϏδͭ͘ʂʯ

    View full-size slide

  12. %9ࣄۀاըΛମݧͰ͖ΔΞϓϦɻ
    ʮσβΠϯࢥߟʯʹଇͬͨαʔϏεσβΠϯख๏Λֶ΂Δ

    View full-size slide

  13. ࠷ॳʹاըςʔϚΛ
    ೖྗ͢Δ͚ͩͰɺ
    νʔϜϝϯόʔ͕
    ՝୊΍ιϦϡʔγϣϯΛ
    બ୒ࣜͰఏࣔͯ͘͠ΕΔ

    View full-size slide

  14. ෼΋͋Ε͹ΤϨϕʔλʔϐον͕׬੒ɻ
    ͦͷ··্௕ʹݟͤΕ͹اըҊͷϓϨθϯ͕Մೳ

    View full-size slide

  15. ͜Εɺ͞΋#FESPDLͷ("͔Β
    Ӧۀ೔͙Β͍Ͱ࡞͔ͬͨͷΑ͏ʹฉ͑͜·͕͢ʜ
    ݄ Ր ਫ ໦ ۚ ౔ ೔


    ˒ ("
    ˒ Ϗδͭ͘ʂ

    View full-size slide

  16. ࣮͸ϓϨϏϡʔظؒதʹ
    ͔ͬ͠Γϲ݄͔͚ͯ
    ։ൃͯ͠·ͨ͠˒

    View full-size slide

  17. ݄ʹΞΧ΢ϯτݶఆͰϓϨϏϡʔղ์ɻ
    ͜͜Ͱ͙͢ʹར༻։࢝͸Ͱ͖ͣɺ
    وॏͳΞΧ΢ϯτΛࣾ಺Ͱڞ༻Ͱ͖ΔΑ͏
    • ηΩϡϦςΟಛྫঝೝͷऔಘ
    • ෦໳άϧʔϓձࣾؒͷඅ༻഑෼ͷௐ੔
    Ͱ#FESPDL৮Εͳ͍··ϲ݄Λফඅ😇
    ʢ͜ΕͰ΋௨ৗͷഒ͙Β͍ͷ໠εϐʔυʣ

    View full-size slide

  18. ݄ʹ#FESPDLͰԿ͔
    ࡞Ζ͏ͥʂνʔϜΛ
    ্ཱͪ͛ɻ
    αʔϏεσβΠϯ͔Β
    ࣮૷·ͰΛϲ݄Ͱ
    ࣮ݱ͠·ͨ͠
    ݄ Ր ਫ ໦ ۚ ౔ ೔




    αʔϏεσβΠϯˍϢʔβʔΠϯλϏϡʔ
    ϑϩϯτΤϯυ6*࣮૷
    ϩδοΫ࣮૷ˍϑΟʔυόοΫ൓ө
    'JHNBσβΠϯϞοΫ׬੒

    View full-size slide

  19. ,%%*%*(*5"-("5&ͱ
    ,%%*ΞδϟΠϧ։ൃηϯλʔʢ,"(ʣͷίϥϘͰ։ൃ
    ྆૊৫ͱ΋%9৽نࣄۀͷΞΠσΟΞΛ
    ୹ظؒͰαΫοͱ1P$࣮ݱ͢Δͷ͕ಘҙͰ͢
    ϝϯόʔ͸Ұ౓΋إΛ߹Θͤͣ
    ϑϧϦϞʔτɺຖ೔%JTDPSEͰ
    Ϟϒ։ൃ͠ϦϦʔε׬਱ʂ

    View full-size slide

  20. ٕज़໘ͷ঺հ

    View full-size slide

  21. Ϗδͭ͘ʂͷΞʔΩςΫνϟ
    "84ΞΧ΢ϯτ
    "NB[PO$MPVE'SPOU
    "NB[PO4JNQMF4UPSBHF
    4FSWJDF "NB[PO4

    "84"QQ4ZOD
    "NB[PO%ZOBNP%#
    "84-BNCEB "NB[PO#FESPDL
    ϒϥ΢β
    ར༻ऀ

    View full-size slide

  22. Πϯϑϥ͸΄΅"NQMJGZͰσϓϩΠˍϗετ
    "84ΞΧ΢ϯτ
    "NB[PO$MPVE'SPOU
    "NB[PO4JNQMF4UPSBHF
    4FSWJDF "NB[PO4

    "84"QQ4ZOD
    "NB[PO%ZOBNP%#
    "84-BNCEB "NB[PO#FESPDL
    ϒϥ΢β
    ར༻ऀ
    "84"NQMJGZ

    View full-size slide

  23. ٕज़ελοΫ
    "84ΞΧ΢ϯτ
    "NB[PO$MPVE'SPOU
    "NB[PO4JNQMF4UPSBHF
    4FSWJDF "NB[PO4

    "84"QQ4ZOD
    "NB[PO%ZOBNP%#
    "84-BNCEB "NB[PO#FESPDL
    ϒϥ΢β
    ར༻ऀ
    ϑϩϯτɿ/FYUKT
    6*ɿ$IBLSB6*
    "1*ɿ(SBQI2-
    όοΫΤϯυɿ1ZUIPO
    --.ϥΠϒϥϦɿ-BOH$IBJO
    ج൫Ϟσϧɿ$MBVEF
    ʢ๺ถϦʔδϣϯʣ
    0(1؅ཧ༻ʢະ࢖༻ʣ

    View full-size slide

  24. ۤ࿑ͨ͠఺
    ϓϨϏϡʔ࣌͸#FESPDLઐ༻ͷ
    CPUP௥ՃϞδϡʔϧ͕ඞཁͩͬͨͨΊ
    -BNCEBϨΠϠʔΛݕ౼͢Δ΋
    "NQMJGZϞοΫػೳͷϩʔΧϧςετʹ
    ະରԠͷͨΊར༻அ೦

    View full-size slide

  25. ۤ࿑ͨ͠఺
    4/4γΣΞػೳͷ0(1࣮૷ʹ
    443͕ඞཁͳ͜ͱ͔Β/FYUKTΛબఆɻ
    Ҏલͷόʔδϣϯ͔ΒϧʔςΟϯάɺ
    ϨϯμϦϯάपΓͷ࢓૊Έ͕Ұ৽͞Ε͓ͯΓ
    ৘ใ΋·ͩগͳ͔ͬͨͨΊ࣮૷ʹҰۤ࿑
    ϓϨϏϡʔ࣌͸#FESPDLઐ༻ͷ
    CPUP௥ՃϞδϡʔϧ͕ඞཁͩͬͨͨΊ
    -BNCEBϨΠϠʔΛݕ౼͢Δ΋
    "NQMJGZϞοΫػೳͷϩʔΧϧςετʹ
    ະରԠͷͨΊར༻அ೦

    View full-size slide

  26. ۤ࿑ͨ͠఺
    4/4γΣΞػೳͷ0(1࣮૷ʹ
    443͕ඞཁͳ͜ͱ͔Β/FYUKTΛબఆɻ
    Ҏલͷόʔδϣϯ͔ΒϧʔςΟϯάɺ
    ϨϯμϦϯάपΓͷ࢓૊Έ͕Ұ৽͞Ε͓ͯΓ
    ৘ใ΋·ͩগͳ͔ͬͨͨΊ࣮૷ʹҰۤ࿑
    -BNCEBؔ਺Ͱ-BOH$IBJOΛར༻͢ΔͨΊʹ
    ಛఆόʔδϣϯͷ1ZUIPO͕ඞཁ͕ͩͬͨ
    "NQMJGZͷ$*$%ػೳ͕ผόʔδϣϯͷ
    1ZUIPOΛΠϯετʔϧͯ͠͠·͏ͨΊ
    Ϗϧυఆٛͷॻ͖׵͕͑ඞཁʹ
    ϓϨϏϡʔ࣌͸#FESPDLઐ༻ͷ
    CPUP௥ՃϞδϡʔϧ͕ඞཁͩͬͨͨΊ
    -BNCEBϨΠϠʔΛݕ౼͢Δ΋
    "NQMJGZϞοΫػೳͷϩʔΧϧςετʹ
    ະରԠͷͨΊར༻அ೦

    View full-size slide

  27. ۤ࿑ͨ͠఺
    4/4γΣΞػೳͷ0(1࣮૷ʹ
    443͕ඞཁͳ͜ͱ͔Β/FYUKTΛબఆɻ
    Ҏલͷόʔδϣϯ͔ΒϧʔςΟϯάɺ
    ϨϯμϦϯάपΓͷ࢓૊Έ͕Ұ৽͞Ε͓ͯΓ
    ৘ใ΋·ͩগͳ͔ͬͨͨΊ࣮૷ʹҰۤ࿑
    -BNCEBؔ਺Ͱ-BOH$IBJOΛར༻͢ΔͨΊʹ
    ಛఆόʔδϣϯͷ1ZUIPO͕ඞཁ͕ͩͬͨ
    "NQMJGZͷ$*$%ػೳ͕ผόʔδϣϯͷ
    1ZUIPOΛΠϯετʔϧͯ͠͠·͏ͨΊ
    Ϗϧυఆٛͷॻ͖׵͕͑ඞཁʹ
    ϓϨϏϡʔ࣌͸#FESPDLઐ༻ͷ
    CPUP௥ՃϞδϡʔϧ͕ඞཁͩͬͨͨΊ
    -BNCEBϨΠϠʔΛݕ౼͢Δ΋
    "NQMJGZϞοΫػೳͷϩʔΧϧςετʹ
    ະରԠͷͨΊར༻அ೦
    ͋ͱ1ZUIPO͸؀ڥىҼͰ
    ʮͳΜ͔ಈ͔ͳ͍ʯʮԿނ͔ಈ͍ͨʯ
    ͕සൃ͠τϥγϡʔʹΊͪΌͪ͘Ό
    ͔͔࣌ؒΓ·ͨ͠😅

    View full-size slide

  28. ۤ࿑ͨ͠఺
    4/4γΣΞػೳͷ0(1࣮૷ʹ
    443͕ඞཁͳ͜ͱ͔Β/FYUKTΛબఆɻ
    Ҏલͷόʔδϣϯ͔ΒϧʔςΟϯάɺ
    ϨϯμϦϯάपΓͷ࢓૊Έ͕Ұ৽͞Ε͓ͯΓ
    ৘ใ΋·ͩগͳ͔ͬͨͨΊ࣮૷ʹҰۤ࿑
    -BNCEBؔ਺Ͱ-BOH$IBJOΛར༻͢ΔͨΊʹ
    ಛఆόʔδϣϯͷ1ZUIPO͕ඞཁ͕ͩͬͨ
    "NQMJGZͷ$*$%ػೳ͕ผόʔδϣϯͷ
    1ZUIPOΛΠϯετʔϧͯ͠͠·͏ͨΊ
    Ϗϧυఆٛͷॻ͖׵͕͑ඞཁʹ
    ϓϨϏϡʔ࣌͸#FESPDLઐ༻ͷ
    CPUP௥ՃϞδϡʔϧ͕ඞཁͩͬͨͨΊ
    -BNCEBϨΠϠʔΛݕ౼͢Δ΋
    "NQMJGZϞοΫػೳͷϩʔΧϧςετʹ
    ະରԠͷͨΊར༻அ೦
    ͋ͱ1ZUIPO͸؀ڥىҼͰ
    ʮͳΜ͔ಈ͔ͳ͍ʯʮԿނ͔ಈ͍ͨʯ
    ͕සൃ͠τϥγϡʔʹΊͪΌͪ͘Ό
    ͔͔࣌ؒΓ·ͨ͠😅
    ほぼBedrock関係なくて草
    (Bedrock周りの実装は
    サクサク進みました)

    View full-size slide

  29. ࣮ࡍʹ࢖ͬͯ෼͔ͬͨ
    #FESPDLͷϝϦσϝ

    View full-size slide

  30. "NB[PO#FESPDLͷྑ͍ͱ͜Ζ
    • ଟ͘ͷΤϯδχΞ͕࢖͍׳Εͨ"84Λϑϧ׆༻Ͱ͖Δɻ
    ίϛϡχςΟˍΞ΢τϓοτ΋௒׆ൃͰ৘ใʹࠔΒͳ͍

    View full-size slide

  31. "NB[PO#FESPDLͷྑ͍ͱ͜Ζ
    • ଟ͘ͷΤϯδχΞ͕࢖͍׳Εͨ"84Λϑϧ׆༻Ͱ͖Δɻ
    ίϛϡχςΟˍΞ΢τϓοτ΋௒׆ൃͰ৘ใʹࠔΒͳ͍
    • ओྗͷݴޠϞσϧʮ$MBVEFʯ͸ߴੑೳ͔ͭίεύྑ͠ɻ
    ϢʔεέʔεʹΑͬͯ͸(15ʹഭΔ೔ຊޠೳྗ΋ʁ
    ·ͨτʔΫϯ্ݶ͕ສͱɺ(15ͷ໿ഒͷΩϟύ

    View full-size slide

  32. "NB[PO#FESPDLͷྑ͍ͱ͜Ζ
    • ଟ͘ͷΤϯδχΞ͕࢖͍׳Εͨ"84Λϑϧ׆༻Ͱ͖Δɻ
    ίϛϡχςΟˍΞ΢τϓοτ΋௒׆ൃͰ৘ใʹࠔΒͳ͍
    • ओྗͷݴޠϞσϧʮ$MBVEFʯ͸ߴੑೳ͔ͭίεύྑ͠ɻ
    ϢʔεέʔεʹΑͬͯ͸(15ʹഭΔ೔ຊޠೳྗ΋ʁ
    ·ͨτʔΫϯ্ݶ͕ສͱɺ(15ͷ໿ഒͷΩϟύ
    • -BOH$IBJOͳͲطଘͷ--.ΤίγεςϜΛ׆༻͢Ε͹
    ଞϞσϧͰ࣮૷ࡁΈͷΞϓϦ΋؆୯ʹ#FESPDLҠ২Մೳ

    View full-size slide

  33. #FESPDLʹ͜Ε͔Βظ଴͍ͨ͠఺
    • "84͸·ͩ·ͩᗐ྽ͳੜ੒"*ڝ૪ͰΑ͏΍͘
    ελʔτϥΠϯʹཱͯͨঢ়ଶɻ౦ژϦʔδϣϯ΁ͷ
    $MBVEF։์΍"HFOUGPS#FESPDLͷϦϦʔεͳͲ
    εϐʔσΟͳࢢ৔ల։ʹظ଴ɻ

    View full-size slide

  34. #FESPDLʹ͜Ε͔Βظ଴͍ͨ͠఺
    • "84͸·ͩ·ͩᗐ྽ͳੜ੒"*ڝ૪ͰΑ͏΍͘
    ελʔτϥΠϯʹཱͯͨঢ়ଶɻ౦ژϦʔδϣϯ΁ͷ
    $MBVEF։์΍"HFOUGPS#FESPDLͷϦϦʔεͳͲ
    εϐʔσΟͳࢢ৔ల։ʹظ଴ɻ
    • ઌߦଞࣾͷ༏Εͨ఺͸#FESPDL΋ͥͻݟश͏΂͖ɻ
    +40/ύʔεʹ΋ศརͳ0QFO"*ͷ'VODUJPODBMMJOH΍
    "[VSFͷ1SPNQUGMPXͷΑ͏ͳϚωʔδυศརػೳͳͲ

    View full-size slide

  35. ࠷ޙʹએ఻

    View full-size slide

  36. ன "84ϑϦʔςʔϚͷϥϯν-5ձʂ
    ༵ۚ·Ͱ-5ืूதʂ ࠤʑ໦୓࿠͞Μͷεϖγϟϧηογϣϯ΋

    View full-size slide

  37. +"846("*.-ࢧ෦
    -5·ۭ͖ͩ͋Γʂ ΦϯϥΠϯͰ#FESPDLͷ࿩͕ฉ͚ͦ͏Ͱ͢

    View full-size slide

  38. 4UBSUVQ$50PGUIFZFBS
    ʮΞ΢τϓοτઓུʯΛޠΔτʔΫηογϣϯʹग़ԋɻϝϯπ߽՚͗͢·͢😍

    View full-size slide