Upgrade to Pro — share decks privately, control downloads, hide ads and more …

在現有軟體服務中整合 Copilot 功能:Context 與 UI 的新挑戰

Kewang
December 27, 2024

在現有軟體服務中整合 Copilot 功能:Context 與 UI 的新挑戰

Kewang

December 27, 2024
Tweet

More Decks by Kewang

Other Decks in Programming

Transcript

  1. Kewang • 王慕羣 Kewang • JavaScript / Java • PostgreSQL

    / MongoDB / Elasticsearch / HBase • Git / DevOps • 熱愛開源 Linkedin Linkedin kewangtw kewangtw SlideShare SlideShare kewang kewang Gmail Gmail cpckewang cpckewang Facebook Facebook Kewang 的資訊進化論 Kewang 的資訊進化論 devopsday taipei devopsday taipei '17 '17 hadoopcon hadoopcon '14 '15 '14 '15 jcconf jcconf '16 '17 '18 '16 '17 '18 GitHub GitHub kewang kewang Funliday Funliday kewang kewang modernweb modernweb '18 '19 '20 '21 '18 '19 '20 '21 coscup coscup '20 '21 '20 '21 webconf webconf '23 '23 mopcon mopcon '14 '20 '22 '24 '14 '20 '22 '24
  2. 39

  3. 51

  4. 53

  5. 63 要注意喔 • LLM – Function call – Shift system

    prompt – 自定義 context – 刪除動作必須 double check
  6. 64 要注意喔 • LLM – Function call – Shift system

    prompt – 自定義 context – 刪除動作必須 double check • Socket.IO
  7. 65 要注意喔 • LLM – Function call – Shift system

    prompt – 自定義 context – 刪除動作必須 double check • Socket.IO – client 要能分辨 copilot
  8. 66 要注意喔 • LLM – Function call – Shift system

    prompt – 自定義 context – 刪除動作必須 double check • Socket.IO – client 要能分辨 copilot – emit 要分開發送
  9. 67 要注意喔 • LLM – Function call – Shift system

    prompt – 自定義 context – 刪除動作必須 double check • Socket.IO – client 要能分辨 copilot – emit 要分開發送 • 支援多動作
  10. 68 要注意喔 • LLM – Function call – Shift system

    prompt – 自定義 context – 刪除動作必須 double check • Socket.IO – client 要能分辨 copilot – emit 要分開發送 • 支援多動作
  11. 73 Shift system prompt no. role prompt 1 system (base)

    你是行程規劃 copilot, blahblah 2 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰豐 "}, {"id":456,"name":" 晴空塔 "}]}} 3 user 幫我把鼎泰豐標示為午餐 4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 角色扮演
  12. 74 Shift system prompt no. role prompt 1 system (base)

    你是行程規劃 copilot, blahblah 2 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰豐 "}, {"id":456,"name":" 晴空塔 "}]}} 3 user 幫我把鼎泰豐標示為午餐 4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 把目前畫面的所有資訊加上去
  13. 75 Shift system prompt no. role prompt 1 system (base)

    你是行程規劃 copilot, blahblah 2 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰豐 "}, {"id":456,"name":" 晴空塔 "}]}} 3 user 幫我把鼎泰豐標示為午餐 4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 使用者輸入要執行的指令
  14. 76 Shift system prompt no. role prompt 1 system (base)

    你是行程規劃 copilot, blahblah 2 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰豐 "}, {"id":456,"name":" 晴空塔 "}]}} 3 user 幫我把鼎泰豐標示為午餐 4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 LLM 用指令與 context 取出結構化資料
  15. 77 Shift system prompt no. role prompt 1 system (base)

    你是行程規劃 copilot, blahblah 2 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰豐 "}, {"id":456,"name":" 晴空塔 "}]}} 3 user 幫我把鼎泰豐標示為午餐 4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 將結構化資料執行之後,回傳結果給 LLM
  16. 78 Shift system prompt no. role prompt 1 system (base)

    你是行程規劃 copilot, blahblah 2 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰豐 "}, {"id":456,"name":" 晴空塔 "}]}} 3 user 幫我把鼎泰豐標示為午餐 4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 LLM 將執行結果轉換為文字回傳
  17. 79 Shift system prompt no. role prompt 3 user 幫我把鼎泰豐標示為午餐

    4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 7 system (base) 你是行程規劃 copilot, blahblah 8 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰 豐 ","alias":" 午餐 "},{"id":456,"name":" 晴空塔 "}]}} 9 user 幫我把晴空塔刪掉 接續的指令將角色扮演移到 prompt 最下方 強調最新資訊
  18. 80 Shift system prompt no. role prompt 3 user 幫我把鼎泰豐標示為午餐

    4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 7 system (base) 你是行程規劃 copilot, blahblah 8 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰 豐 ","alias":" 午餐 "},{"id":456,"name":" 晴空塔 "}]}} 9 user 幫我把晴空塔刪掉 加上目前的最新畫面,包括稍早的鼎泰豐午餐
  19. 81 Shift system prompt no. role prompt 3 user 幫我把鼎泰豐標示為午餐

    4 assistant {"id":"call_id_test","arguments": {"id":123,"name":" 鼎泰豐 ","alias":" 午餐 "}} 5 tool*n {"id":"call_id_test","content":"{\"success\":true}"} 6 assistant 已成功為您把鼎泰豐標示為午餐 7 system (base) 你是行程規劃 copilot, blahblah 8 system (context) {"context":{"pois":[{"id":123,"name":" 鼎泰 豐 ","alias":" 午餐 "},{"id":456,"name":" 晴空塔 "}]}} 9 user 幫我把晴空塔刪掉 下一次使用者要輸入的指令
  20. 89 Context useless • 2024/10/22 : claude 公佈 computer use

    • 不久的將來連自行定義 context 都不用了
  21. 93 支援多動作 • 使用 Function call 可一次萃取多個任務 • 後端同時回傳多個任務給前端 •

    後端難度:同時支援新舊版的前端,同時回傳一 個或多個任務
  22. 94 支援多動作 • 使用 Function call 可一次萃取多個任務 • 後端同時回傳多個任務給前端 •

    後端難度:同時支援新舊版的前端,同時回傳一 個或多個任務 • 前端難度:從原本 1 個任務,變成 n 個任 務, UIUX 的挑戰變高
  23. 100