AzureのPrompt Flowを使ったRAG精度評価とつらみ
by
id32h6kz
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
AzureͷPrompt FlowΛͬͨ RAGਫ਼ධՁͱͭΒΈ KDDI ΞδϟΠϧ։ൃηϯλʔ גࣜձࣾ 2024.07.11 Findy Lunch LT
Slide 2
Slide 2 text
ࣗݾհ • ͍ͰΈͭ • KDDI ΞδϟΠϧ։ൃηϯλʔ גࣜձࣾ • ۀɿੜAIΛར༻ͨ͠ΞϓϦέʔγϣϯ։ൃ • ͖ͳAzureαʔϏεɿDocument Intelligence
Slide 3
Slide 3 text
͓͠ͳ͕͖ • ͡Ίʹ • ΞʔΩςΫνϟհ • ࠓ͍͑ͨ͜ͱ • Prompt FlowͱRAGASͷհ • ·ͱΊ
Slide 4
Slide 4 text
͡Ίʹ • ༷ʑͳυΩϡϝϯτΛRAGͱͯ͠ੜAIʹճͤ͞ΔαʔϏε • ·ͩ։ൃதͷͨΊɺϦϦʔε͍ͯ͠·ͤΜ • ਫ਼্ͦͷͷ·ͩ·ͩࡧத
Slide 5
Slide 5 text
ࠓճLTͷϕʔεͱͳΔγεςϜͷ ؆୯ͳΞʔΩςΫνϟհ ར༻ऀ υΩϡϝϯτ Azure App Service Document Intelligence AI Search gpt-4o ᶃ ᶄ ᶅ ᶆ
Slide 6
Slide 6 text
ຊ͍͑ͨ͜ͱ
Slide 7
Slide 7 text
RAGͷਫ਼্ͬͯେมʂ
Slide 8
Slide 8 text
Ҋ͕݅ελʔτͨ͠λΠϛϯάͰPOͷํʹ ͜͏ݴΘΕ·ͨ͠
Slide 9
Slide 9 text
ࠓ·ͩճਫ਼͕͍
Slide 10
Slide 10 text
ճਫ਼80%Λࢦ͔͢Β
Slide 11
Slide 11 text
ࣗ༝ʹೖྗ͢Δ͜ͱͷͰ͖Δɺνϟοτ ϘοτͰճਫ਼80%ͬͯͲ͏͍͏͜ͱʁ
Slide 12
Slide 12 text
ͦͦճਫ਼͕ߴ͍/͍ͱײ͡Δͷ ײ֮ͳͷͰɺ࣮ࡍͲΕ͘Β͍ͳͷ͔ΛՄࢹ Խ͍ͨ͠
Slide 13
Slide 13 text
ͦ͜Ͱ·ͣਫ਼ධՁʹ͍ͭͯͲ͏͢Δ͖ ͔ݕ౼͠·ͨ͠
Slide 14
Slide 14 text
ਫ਼ධՁͷඞཁੑ • ճਫ਼ͷՄࢹԽ • ࠓޙͷվળͷࢦ • վળͷޮՌݕূ
Slide 15
Slide 15 text
ਫ਼ධՁͷओͳख๏ • खಈධՁ(ਓ͕ؒߦ͏ධՁ) • γεςϜʹରͯ͠QΛ͛ɺAͷྑ͠ѱ͠Λਓ͕ؒஅ͢Δ • ࣗಈධՁ(LLMͳͲ͕ߦ͏ධՁ) • γεςϜʹରͯ͠QΛ͛ɺAͷྑ͠ѱ͠ΛLLM͕அ͢Δ
Slide 16
Slide 16 text
ਫ਼ධՁͷओͳख๏ • खಈධՁ(ਓ͕ؒߦ͏ධՁ) • γεςϜʹରͯ͠QΛ͛ɺAͷྑ͠ѱ͠Λਓ͕ؒஅ͢Δ • ࣗಈධՁ(LLMͳͲ͕ߦ͏ධՁ) • γεςϜʹରͯ͠QΛ͛ɺAͷྑ͠ѱ͠ΛLLM͕அ͢Δ
Slide 17
Slide 17 text
ਫ਼ධՁʹ͑ͦ͏ͳαʔϏε • Prompt Flow • 🦜⚒LangSmith • LangFuse
Slide 18
Slide 18 text
ਫ਼ධՁʹ͑ͦ͏ͳαʔϏε • Prompt Flow • 🦜⚒LangSmith • LangFuse
Slide 19
Slide 19 text
Prompt Flowͷ֓ཁ • LLMΛ׆༻ͨ͠ΞϓϦέʔγϣϯͷ։ൃޮԽΛਤΔͨΊͷαʔ Ϗε • ࣭͔Βճ·ͰͷҰ࿈ͷFlowΛઃఆ࣮͠ߦ͢Δ͜ͱ͕Ͱ͖Δ • ֤FlowLLMΛͬͨςΩετੜϓϩϯϓτ࡞ɺPython ͷ࣮ߦ͕Մೳͱͳ͓ͬͯΓɺ͜ΕΒΛΈ߹Θͤͯશମͷϑϩʔ Λ࡞͢Δ
Slide 20
Slide 20 text
Prompt FlowΛબΜͩཧ༝ • AzureΛར༻͍ͯͨͨ͠Ίɺಋೖϋʔυϧ͕͍ • RAGͷධՁ͚ͩͰͳ͘։ൃͷࣄલݕূʹར༻͢Δ͜ͱ͕Ͱ͖ Δ(promptΛमਖ਼͓ͯ͠ࢼ͠)
Slide 21
Slide 21 text
RAGASͱ • PythonͰ࡞ΒΕͨRAGධՁ༻ϑϨʔϜϫʔΫɺPrompt FlowʹΈࠐΉ͜ͱ͕Մೳ • 9ͭͷϝτϦΫεͰճΛධՁ͢Δ͜ͱ͕Մೳ • https://docs.ragas.io/en/stable/concepts/metrics/index.html
Slide 22
Slide 22 text
࣮ࡍʹPrompt FlowͱRAGASΛͬͯධ ՁΛͲͷΑ͏ʹߦ͏͔
Slide 23
Slide 23 text
Prompt FlowͱRAGASͷհ ඪ४ϑϩʔ(ΞϓϦέʔγϣϯΛ࠶ݱͨ͠ϑϩʔ)
Slide 24
Slide 24 text
Prompt FlowͱRAGASͷհ ධՁϑϩʔ(RAGASݺͿϑϩʔ)
Slide 25
Slide 25 text
Prompt FlowͱRAGASͷհ RAGASͷධՁ݁Ռ
Slide 26
Slide 26 text
Prompt FlowͱRAGASͷհ RAGASͷධՁ݁Ռ ճͷਖ਼֬͞ ίϯςΩετʹର͢Δճͷ࣮ ਖ਼ͱίϯςΩετͷؔ࿈ ࣭ٴͼਖ਼ʹର͢ΔίϯςΩετͷਫ਼
Slide 27
Slide 27 text
Prompt FlowͱRAGASΛ ͬͯྑ͔ͬͨ͜ͱ • ϒϥβ͔Β৮ΕΔͨΊɺΤϯδχΞ͚ͩͰͳ͘PO৮ΕΔ • ճਫ਼্ͷͨΊͷࢪࡦ͕ຊʹޮՌ͕͋ͬͨͷ͔Λ֬ೝ͢ Δ͜ͱ͕Ͱ͖Δ
Slide 28
Slide 28 text
Prompt Flow࠷ߴʂ
Slide 29
Slide 29 text
PO৮ͬͯ͘Εͯɺධ͍͍ʂ
Slide 30
Slide 30 text
Ͱʂ
Slide 31
Slide 31 text
Prompt Flowͷ͕ͭ͜͜Β͍ʂ • Prompt Flowͷιʔεߋ৽͕େม • ࣮ࡍͷΞϓϦέʔγϣϯͱPrompt Flowͷίʔυผ • ैྔ՝ۚͳͷͰɺىಈ͍͕ͨ͠VMͷىಈʹඇৗʹ͕࣌ؒ ͔͔Δ(5Ҏ্)
Slide 32
Slide 32 text
ͦΜͳதɺଟ͘ͷ՝
Slide 33
Slide 33 text
Visual Studio Codeͷ֦ுػೳPrompt Flow CLI toolΛ͏ͱղফͰ͖Δ
Slide 34
Slide 34 text
No content
Slide 35
Slide 35 text
ͦͷଞͷ՝ • RAGASͰධՁ͢ΔͨΊͷQAσʔλͷ࡞͕͍͠ • ݱঢ়QAͷࣗಈੜ͋·Γਫ਼͕ग़ͳ͔ͬͨͨΊਓͷखͰ࡞ ͍ͯ͠Δɻ • େྔʹ࡞Δʹ͕͔͔࣌ؒΔͨΊɺܧଓతʹՃ͢Δӡ༻͕ ྑͦ͞͏
Slide 36
Slide 36 text
কདྷతʹࢦ͍ͨ͜͠ͱ • Prompt FlowͱGithub Actionsͷ࿈ܞ • LangFuseΛར༻ͨ͠feedbackऔಘ • ධՁ༻ͷQAσʔλΛ࡞͢Δͷݮ
Slide 37
Slide 37 text
·ͱΊ • RAGͷਫ਼্ʹධՁ͕ෆՄܽ • खಈͰͷධՁݱ࣮తͰͳ͘ɺͱͯେม • RAGճਫ਼ΛධՁ͢Δ͜ͱͰɺରࡦΛߟ͑Δ͜ͱ͕Ͱ͖Δ • ఆظతʹධՁΛ͢Δ͜ͱͰɺߦͳ͍ͬͯΔࢪࡦͷޮՌΛଌఆ͢Δ͜ͱ͕Ͱ͖ Δ • QAϦετͷ࡞ʹ͕͔͔࣌ؒΔͷͰɺલͬͯ࣌ؒΛઃ͚࡞͢Δͷ͕ྑ͍
Slide 38
Slide 38 text
͋Γ͕ͱ͏͍͟͝·ͨ͠