Semantic Kernel

先比较下 Semantic Kernel 和 LangChain。

当下,LangChain 更强。但 Semantic Kernel 可能更有未来,因为:

  1. 不要怀疑微软要做 AI 霸主的决心
  2. 不要轻视微软的架构和工程能力
  3. 以及,钞能力

但微软的非中立性,可能带来问题。

SK 的开发进展

  1. C# 版最成熟:https://github.com/microsoft/semantic-kernel
  2. Python 版也可用,但正在重构:https://github.com/microsoft/semantic-kernel
  3. Java 版实验阶段:https://github.com/microsoft/semantic-kernel/tree/experimental-java
  4. TypeScript 版……:https://github.com/microsoft/semantic-kernel/tree/experimental-typescript
  5. 文档写得特别好,但追不上代码更新速度:
    • 更多讲解:https://learn.microsoft.com/en-us/semantic-kernel/overview/
    • 更偏实操:https://github.com/microsoft/semantic-kernel/blob/main/samples/notebooks/python/00-getting-started.ipynb

这里可以了解最新进展:https://learn.microsoft.com/en-us/semantic-kernel/get-started/supported-languages

不同语言之间的概念都是相通的。本课程以 Python 版为例。

SK 的生态位

与 LangChain 完全重叠。

AI全栈大模型工程师(十九)Semantic Kernel-LMLPHP

解释:

  • Plugin extensibility: 插件扩展
  • Copilots: AI 助手(副驾驶),例如 GitHub Copilot、Office 365 Copilot、Windows Copilot
  • AI orchestration: AI 编排,SK 就在这里
  • Foundation models: 基础大模型,例如 GPT-4
  • AI infrastructure: AI 基础设施,例如 PyTorch、GPU

SK 基础架构

AI全栈大模型工程师(十九)Semantic Kernel-LMLPHP

解释:

  • Models and Memory: 和 LangChain 的概念相同,类比为大脑
  • Connectors: 用来连接各种外部服务,类似驱动程序
  • Plugins: 用来连接内部技能
  • Triggers and actions: 外部系统的触发器和动作,类比为四肢

Semantic Kernel 用 Kernel 命名,是因为它确实像个操作系统 kernel,做核心资源调配,各种资源都可以挂在它上。

后记

📢博客主页:https://manor.blog.csdn.net

📢欢迎点赞 👍 收藏 ⭐留言 📝 如有错误敬请指正!
📢本文由 Maynor 原创,首发于 CSDN博客🙉
📢不能老盯着手机屏幕,要不时地抬起头,看看老板的位置⭐
📢专栏持续更新,欢迎订阅:https://blog.csdn.net/xianyu120/category_12471942.html

11-09 11:56