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
670
CloudflareのAI関連の機能さわってみた
Cloudflare Meetup Niigata #1のLTで使用した資料です。
circled9
August 25, 2024
Tweet
Share
More Decks by circled9
See All by circled9
キースイッチ入門
circled9
0
80
0.0.0.0 day
circled9
0
110
小数の丸め誤差の話
circled9
0
150
数値の文字列をパースしよう
circled9
0
240
🔥 Hono v4 やってみた
circled9
1
200
JetBrains AI Assistant を試してみた
circled9
1
540
Fresh
circled9
0
250
React Hooks 勉強会 vol.3
circled9
2
440
JSON.stringify()
circled9
2
500
Other Decks in Programming
See All in Programming
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
130
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
270
TDD 実践ミニトーク
contour_gara
1
290
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
20
10k
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
220
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.4k
Design Foundational Data Engineering Observability
sucitw
3
180
Claude Codeで挑むOSSコントリビュート
eycjur
0
200
AWS発のAIエディタKiroを使ってみた
iriikeita
1
170
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
960
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
270
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
230
Featured
See All Featured
A better future with KSS
kneath
239
17k
RailsConf 2023
tenderlove
30
1.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How to train your dragon (web standard)
notwaldorf
96
6.2k
Practical Orchestrator
shlominoach
190
11k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
KATA
mclloyd
32
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
6k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
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