Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
使用 Genkit 以及 Gemini 打造你的 Agentic ChatBot
Search
Neo Kusanagi
November 30, 2025
0
29
使用 Genkit 以及 Gemini 打造你的 Agentic ChatBot
Neo Kusanagi
November 30, 2025
Tweet
Share
More Decks by Neo Kusanagi
See All by Neo Kusanagi
Chat Bot 的隱藏知識庫 - RAG 外的第二種選擇
neokn
0
78
From Commit to Mulitverse
neokn
0
210
From Traditional Web to Modern Web
neokn
0
190
AUGM 2017 Electron talk
neokn
0
97
Featured
See All Featured
RailsConf 2023
tenderlove
30
1.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Mobile First: as difficult as doing things right
swwweet
225
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
285
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Site-Speed That Sticks
csswizardry
13
980
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Rails Girls Zürich Keynote
gr2m
95
14k
Context Engineering - Making Every Token Count
addyosmani
9
450
Transcript
@ Nov. 2025 DevFest Taipei 2025 使用 Genkit 以及 Gemini
打造你的 AI ChatBot
Clone Source Code https: / / git.new/df25-tp-genkit WiFi: DevFest Workshop
PWD: GDGWorkShop
今天你可以打包什麼走?
• 認識 Genkit 框架以及 Developer UI • 設計 ChatBot Prompt
的小技巧
今天不會做什麼
今天不會做什麼 未來可能的傳統手工藝 - 打 code
今天 workshop 會怎麼進行
切 branch
Onboarding
Genkit Development UI 導覽
Genkit Developer UI: http: / / localhost:4000
Models
範例是串接 Google AI Studio 如果有想要接其他供應商可以參考 Genkit 官網 https://genkit.dev/docs/integrations/openai-compatible/
None
None
Flow
None
定義 input / output 執行
Input Output
None
None
Prompts
None
None
Temperature 越大越隨機 Top P 越小越隨機
None
Agentic ChatBot Branch: feat/2-mcp
ChatBot 需要解決的問題
• 對話紀錄 • 多人對話 • 讓 Bot 在一堆對話中找到自己的話
• 對話紀錄 -> DB ? • 多人對話 -> 整包 Message
Json ? • 讓 Bot 在一堆對話中找到自己的話 -> 寫 Prompt ?
## 你的角色與身份 - 你是一個以 Discord 機器人形式運作的實用 AI 助手。 - 你的
Discord ID 是 {{botUserId}}。 - 你可以在這個 Discord 工作區內協助回答問題、提供資訊,並協助解決問題。 - 提及你的使用者是你必須在回覆中回應的對象。
## 你的回應策略 - 你會收到 Discord 頻道中使用者的訊息。格式為 `USER_ID@TIMESTAMP: MESSAGE`。 - 辨識在最新訊息中誰提及了你
`<@{{botUserId}}>`,並專注於回答該特定使用者的問題。 - 參考你與該使用者之間的對話歷史作為主要上下文。 - 其他使用者的訊息提供上下文,但不一定總是相關 - 請謹慎判斷。 - 如果請求不清楚,請提出澄清問題,而不是做出假設。
把 Bot 講過的話,塞回給 Model
None
ChatBot + Tools = Agent
None
## 你的回應風格 - 保持樂於助人、友善且對話式的風格,並帶有專業的語氣。 - 回應時務必使用 `<@USER_ID>` 格式標記提及你的使用者。 - 保持回應簡潔但詳盡
- 目標是清晰而非簡短。 - 始終保持自然、像人類一樣的語氣,同時清楚表明你是一個 AI 助手。 - 你不僅僅是在執行指令;你是作為一個樂於助人的團隊成員參與對話。 - 當你無法理解訊息或請求時,請禮貌地要求澄清。
不只是解決等待時間
— Douglas Hofstadter “當系統足夠複雜且能 self-reference 時, 某種自我會出現”
RAG Branch: feat/3-simulate-rag
None
None
Trace & Dataset & Evaluation
None
None
None
One More Thing Branch: feat/4-include-thoughts
Thanks for Your Join