Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
LangChainやるならPythonよりTypeScriptの方がいんじゃね?
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Optimisuke
November 22, 2023
Technology
1.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
LangChainやるならPythonよりTypeScriptの方がいんじゃね?
LangChain.jsの紹介です。
Optimisuke
November 22, 2023
More Decks by Optimisuke
See All by Optimisuke
量子コンピュータ勉強会#1
optimisuke
0
49
Node.jsでllama_2_.pdf
optimisuke
0
240
オンオフの切り替え
optimisuke
0
73
Other Decks in Technology
See All in Technology
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
33
31k
aws-iot-platform-architecture-use-cases.pdf
ma2shita
0
560
C#コードの結合を可視化する Roslyn解析による設計改善と リファクタリング判断
dora56
0
500
Railsのように考える: See through the Master
snoozer05
PRO
5
1.3k
え、こんなに早く改修できるの?──新人エンジニアとスクラムマスターの2人が語る、AI×アジャイル開発の現場
ysasago
2
690
「どのログを見ればいい?」 から始めた サーバーレス障害解析
y_waka1
1
130
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
480
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
550
2026_devsumi_ozono.pdf
o3
3
580
バイブコーディング時代のWebアプリ開発入門~Cloud Runで学ぶセキュアなビルドとデプロイ
waiwai2111
1
140
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
130
AIによるクリエイティブ生成を行う上での試行錯誤
plaidtech
PRO
0
180
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.2k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Building AI with AI
inesmontani
PRO
1
1.2k
Paper Plane
katiecoart
PRO
4
53k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Site-Speed That Sticks
csswizardry
13
1.5k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
250
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
600
Transcript
LangChain.js使ってみた 🦜🔗
改め
LangChainやるならPythonより TypeScriptの方がいんじゃね? 🦜🔗 >> ※個人の感想です。効果には個人差があります。
LangChain 🦜🔗?
https://www.langchain.com/
LangChain 🦜🔗? https://gihyo.jp/book/2023/978-4-297-13839-4
LangChain.js 🦜🔗? https://github.com/langchain-ai/langchainjs https://js.langchain.com/docs/get_started/introduction
LangChain.js 🦜🔗? https://github.com/langchain-ai/langchainjs https://github.com/langchain-ai/langchain
仮説 🦜🔗 - 使うのってData ScientistsじゃなくてSoftware Engineersじゃね? - なら、PythonよりTypeScriptの方がよくね?
🦜🔗 LangChain + Next.js Starter Template! https://github.com/langchain-ai/langchain-nextjs-template https://langchain-nextjs-template.vercel.app/
🦜🔗 LangChain + Next.js Starter Template! Chat ChatGPT的な動き 🧱
Structured Output jsonで返してくれるように設定(この後、各種APIと連携するため) 🦜 Agents LLMがAPIを呼んでくれる!? 🐶 Retrieval LLMがデータベースの検索もしてくれる!? 🤖 Retrieval Agents LLMがデータベースを検索しつつAPIも呼んでくれる!?
🦜🔗 LangChain + Next.js Starter Template! Chat ChatGPT的な動き 🐶
Retrieval LLMがデータベースの検索もしてくれる!?
Chat
None
🐶 Retrieval プロンプトに検索結果を入れることで、 LLMが学習していない情報を加味して回答を生成できる
🐶 Retrieval プロンプトに検索結果を入れることで、 LLMが学習していない情報を加味して回答を生成できる
None
retrieval Chain answer Chain conversational RetrievalQA Chain chat_history question standalone
Question Chain 🐶 Retrieval 会話履歴から 質問生成 検索 回答生成 アウトプット
Vercel AI SDK https://sdk.vercel.ai/docs
フロントエンド バックエンド
LangChain.jsの中身を少し
Model いい感じに抽象化されていて、モデルを変更しやすい
参考:Ollama🦙 https://ollama.ai/
Runnable https://js.langchain.com/docs/expression_language/interface あれもこれもRunnableもしくはRunnableLike
LangChain.jsの中身おわり
LangChainやるならPythonよりTypeScriptの方がよくね? WebアプリするならTypeScriptでよくね? Data Scientistsじゃなくてよくね→TypeScriptでよくね? Pythonで型ヒント書くなら、TypeScriptでよくね? (ただ、Pythonでサクッと書いてJupyter Notebookで試行錯誤のログを残すのは良いと思う) ※個人の感想です。効果には個人差があります。
LangChain.js使おう! 🦜🔗