Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CloudflareのAI関連の機能さわってみた
Search
circled9
August 25, 2024
Programming
0
340
CloudflareのAI関連の機能さわってみた
Cloudflare Meetup Niigata #1のLTで使用した資料です。
circled9
August 25, 2024
Tweet
Share
More Decks by circled9
See All by circled9
キースイッチ入門
circled9
0
42
0.0.0.0 day
circled9
0
66
小数の丸め誤差の話
circled9
0
91
数値の文字列をパースしよう
circled9
0
120
🔥 Hono v4 やってみた
circled9
1
140
JetBrains AI Assistant を試してみた
circled9
1
390
Fresh
circled9
0
220
React Hooks 勉強会 vol.3
circled9
2
400
JSON.stringify()
circled9
2
460
Other Decks in Programming
See All in Programming
CSC509 Lecture 12
javiergs
PRO
0
160
Click-free releases & the making of a CLI app
oheyadam
2
110
as(型アサーション)を書く前にできること
marokanatani
9
2.6k
cmp.Or に感動した
otakakot
2
130
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
AI時代におけるSRE、 あるいはエンジニアの生存戦略
pyama86
6
1.1k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
EventSourcingの理想と現実
wenas
6
2.3k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Rails Girls Zürich Keynote
gr2m
94
13k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Optimising Largest Contentful Paint
csswizardry
33
2.9k
Code Review Best Practice
trishagee
64
17k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
GraphQLとの向き合い方2022年版
quramy
43
13k
Building Adaptive Systems
keathley
38
2.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Making Projects Easy
brettharned
115
5.9k
Transcript
CloudflareͷAIؔ࿈ͷػೳ ͞ΘͬͯΈͨ Cloudflare Meetup Niigata #1 @circled9
ࣗݾհ @circled9 দҪ ਖ਼ࢤ (Matsui Masashi) גࣜձࣾϞχΫϧ ීஈGoogle CloudͰಈࣾ͘ ͚αʔϏεΛॻ͍ͯ·͢
͋Β·͠ • ࣾͷ։ൃ߹॓ͰAIΛςʔϚʹԿ͔࡞Ζ͏ͱ͍͏͜ͱʹͳͬͨ • PDFΛݩʹ࣭ͷճΛฦ͢ΞϓϦΛ࡞ͬͨ • ͍ΘΏΔRAG (Retrieval-Augmented Generation)ͱݺΕΔ ͷ
3
ͪͳΈʹ • yusukebe͞Μ͕ॻ͍ͨCloudflareελοΫͰRAGΛ࡞Δͱ͍͏λ ΠτϧͷͪΌͪ͘ΌΘ͔Γ͍͢هࣄ͕͋Γ·͢ • https://zenn.dev/yusukebe/articles/c7e2ec9f12427b • ߹॓࣌Ͱ͜ͷهࣄ͕·ͩͳ͔ͬͨͷͰɺެࣜυΩϡϝϯτΛಡΈ ͳ͕Βಉ͡Α͏ͳͷΛ࡞Γ·ͨ͠ 4
None
αʔϏεͷߏ
Client Zero Trust Access Vectorize Worker AI D1
Cloudflare AI • ੜAIͷॲཧΛΤοδͰͬͯ͘ΕΔ͍ͭ͢͝ • ςΩετੜͱ͔Իೝࣝͱ͔৭ʑͰ͖Δ • ࠓճςΩετੜͱEmbeddingΛͬͯճΛੜͨ͠ 8
Vectorize • ϕΫτϧσʔλϕʔε • ϕΫτϧσʔλͷอଘͱݕࡧΛͯ͘͠ΕΔ • ݱࡏύϒϦοΫϕʔλ൛ • Workers Paid
planͰ͑Δ 9
ϕΫτϧݕࡧ • จষΛϕΫτϧͰݕࡧ͢Δ • ୯७ͳจࣈྻݕࡧදهΏΕͳͲʹऑ͍ • ϕΫτϧԽ͢Δ͜ͱͰҙຯతʹ͍ۙͷݕࡧͰ͖Δ 10
Α͔ͬͨ͜ͱ
؆୯ • ֤ػೳwrangler.tomlʹઃఆΛՃ͢Δ͚ͩͰ͍࢝ΊΒΕΔ • ެࣜυΩϡϝϯτ͕ͳͷͰɺυΩϡϝϯτΛݟΕେମͳΜͱ͔ ͳΔ 12
͍҆ • ͼͬ͘Γ͢Δ͘Β͍͍҆ • ಛʹϕΫτϧσʔλϕʔε͕ैྔ՝ۚͳͷ͋Γ͕͍ͨ • ແྉେ͖͍ͷͰɺࢼ͠ʹ͞ΘΔఔͩͱେମແྉ 13
ࠔͬͨ͜ͱ
AIͷϞσϧͷຊޠରԠ͕͍·͍ͪ • ຊޠͰ࣭ͯ͠ӳޠͰฦͯ͘͠Δ • ϓϩϯϓτʹʮຊޠͰճͯ͠ʯͱॻ్͍ͯத͔Βຊޠ͡Ό ͳ͘ͳΔ • Embeddingӳޠ͔͠ରԠ͍ͯ͠ͳͦ͞͏ • bge-base-en-v1.5
15
ͦΕͳʔ
WorkersͰಈ͔ͳ͍ϥΠϒϥϦ͕͋ͬͨ • nodejs_compatΛ༗ޮʹ͢ΕNode.jsͷϥΠϒϥϦ͕ಈ͘ • ͔࣮͠͠ࡍʹಈ͔ͳ͍ϥΠϒϥϦ͕ͨ·ʹ͋Δ • ϥΠϒϥϦͷ࣮ʹnode:ϓϨϑΟοΫε͕ͳ͍ɺͳͲ͕େମͷݪҼ 17
ͳΜͱ͔ղܾͨ͠ • ຊޠͷCloudflare AIͰͳ͘ଞͷαʔϏεͷAPIΛݺͿ ͜ͱͰճආͨ͠ • ϥΠϒϥϦͷࣗͰϥΠϒϥϦͷίʔυʹखΛೖΕͨ 18
·ͱΊ • CloudflareΛ͏ͱαʔϏεͷ্ཱ͕ͪ͛खܰʹͰ͖Δ • Zero Trust AccessͰೝূपΓ҆৺ • CloudflareΛͲΜͲΜ͍͖͍ͬͯͨ 19