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
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
51
Node.jsでllama_2_.pdf
optimisuke
0
240
オンオフの切り替え
optimisuke
0
73
Other Decks in Technology
See All in Technology
『SAR衛星データ解析入門』のご紹介とその応用
syuchimu
0
120
今さら理解するウェブフォントver.2026
takanorip
3
770
分析の民主化を支えるメタデータ整備の実践
kakehashi
PRO
4
1.4k
WasmをRustにする
sansantech
PRO
0
250
Conditional PED-ANOVA: Hyperparameter Importance in Hierarchical & Dynamic Search Spaces
pfn
PRO
0
130
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
160
パスキーの自動テストはどこまでいけるのか
teamlab
PRO
0
210
スキマバイトという雇用形態は存在しないので、雇用期間1日のアルバイト契約を事業者とワーカーが結ぶ手続きを支えるのがタイミーなんです
akitoshiga
0
200
[JAWS-UG彩の国埼玉#12]そろそろ準備する?re:Invent2026をやさしく解説 / reinvent2026-sainokuni
sh_fk2
1
340
Benchmarking Disaggregated Serving on vLLM + Dynamo with a Real Coding-Agent Workload
nttcom
1
190
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
150
Getting Started with Google Antigravity
glaforge
0
300
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
67k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
270
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
950
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
How to train your dragon (web standard)
notwaldorf
96
6.9k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
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使おう! 🦜🔗