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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Transcript
27 slides
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使おう! 🦜🔗
More Decks by Optimisuke
See All by Optimisuke
量子コンピュータ勉強会#1
optimisuke
0
55
Node.jsでllama_2_.pdf
optimisuke
0
250
オンオフの切り替え
optimisuke
0
74
Other Decks in Technology
See All in Technology
自治体AIコンタクトセンター、何をどこに任せる?~Amazon Connect Customer +Amazon Bedrockの実践知~ / 20261107 Satoshi Torano
shift_evolve
PRO
1
140
人間+AIを「チーム」としてプロセスを再設計する
littlehands
4
3k
gem install とrequire のむこうがわ
ydah
0
110
Context != Context: One window, many lifecycles (AI Native DevCon, Nov 2026)
birgitta410
0
150
AWS基盤改善を支える 私たちの理念と行動指針
kentosuzuki
0
230
OpenTelemetryで変わった 新時代のCloudWatchメトリクス監視
tsukuboshi
0
240
[NW-JAWS DAY]「うちのAWS、インターネット出られないんで」― AWS外の自社サービスをPrivateLinkでシュッと公開する方法
ykimi
2
580
Go初心者のクラウドエンジニアが、デプロイを通して旨味を知っていく話
ryudai
1
220
Agent Harnessはどう作る?事例から学ぶAI Agentの設計思想
sergicalsix
0
320
Claude Codeで新規事業を伸ばせるか? Zennの試行錯誤の記録
wadayusuke
2
200
狙われているAPIの脆弱性!今こそ手をつけるべき根本的な対策とは?
nagix
0
140
大江戸Ruby会議でデータベース クライアントの話をするのは 間違っているだろうか
yahonda
1
130
Featured
See All Featured
For a Future-Friendly Web
brad_frost
184
11k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Being A Developer After 40
akosma
PRO
92
590k
Skip the Path - Find Your Career Trail
mkilby
1
290
The SEO Collaboration Effect
kristinabergwall1
1
620
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Designing Experiences People Love
moore
143
24k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
900
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
480
Agile that works and the tools we love
rasmusluckow
331
22k
Amusing Abliteration
ianozsvald
1
390