formulahendry / semantic-kernel-vs-langchain

Compare Semantic Kernel and LangChain
99 stars 9 forks source link

Question about semantic kernel #1

Closed tonyqus closed 10 months ago

tonyqus commented 10 months ago

I have a few questions about SK while I'm evaluating this tech. By google search, I found your post.

It's nice to see that you are doing neutral comparison even if you are a MSFT. It's much useful than some Microsoft zombie MVPs in China are doing. They just praise and promote SK without their brain.

The biggest quesiton in my mind is that

Is SK strong-binding to Azure? I understand this open source project is from bing and o365 team. But I see that all the LLM model it supports are usually cloud based (such as OpenAI, Azure OpenAI). In other words, can I run SK on AWS?

tonyqus commented 10 months ago

The second question is Does SK support any on-promise LLM model doesn't need cloud? OpenAI, Azure OpenAI and Hugging Face are all cloud based models. For China, we are on-promise lover country. If SK doesn't support on-promise deployment or the LLM model doesn't support this way, SK is meaningless for China.

UlyssesWu commented 10 months ago

can I run SK on AWS?

Yes.

Does SK support any on-promise LLM model doesn't need cloud?

Yes, but you must implement your "connector" (service) to connect SK and your LLM.

If you ever tried the samples of SK you'd have realized the framework is mostly independant from models just like langchain. SK has built-in support for OpenAI and Azure OpenAI, but you can implement your ITextCompletion IEmbeddingGeneration etc. to use it. For your implementation there is no restriction about cloud/Azure etc.

SK / Langchain is meant to provide a "type-safe", chained and ReAct way to utilize LLMs, not a "LLM binding".

For me, the weakness of SK comparing to Langchain, is that it develops too slow. One of the most commonly used feature - MRKL agent exists in Langchain since the first day, but SK was missing this until this June or July, and it still lacks some features compared to langchain till now. There are other missing features you can check out from this repo. Neither do they fix my issue although it may only requires one line change. AI/LLM is evolving rapidly while SK has been falling behind more and more on this road compared to Langchain.

When I mention this weakness, I'm not going to join the meaningless battle of comparing Langchain and SK (on Wechat public articles or some chatting rooms). I was using both langchain and SK and I do hope I can use SK when possible because other parts of my program was written in C#. However SK must evolve faster.

So... why not try by yourself before asking? @tonyqus

tonyqus commented 10 months ago

@UlyssesWu Thank you for answering my question. I'm bit surprised that you replied me instead of Hendry.

Yes, but you must implement your "connector" (service) to connect SK and your LLM.

The but part means 'No, it's not available now. ' Please correct me if my understanding is wrong. Frankly speaking, I don't wanna be the guy to implement these connector/service. Instead, I just wanna be a normal user of SK.

So... why not try by yourself before asking?

Sorry, I'm not a big fans of Microsoft latest open source for a long time. I'd like to evaluate it first before starting coding with it. Most of the Microsoft open source is kind of toy instead of product (compared with Apache Incubating projects). Since a few Microsoft MVP in China are promoting SK, I'm a bit curious about why they are doing this and is it really a good open source project?

And I used to be a major promoter of Silverlight in China and I'm the translator of the book called <Silverlight Unleashed 1.0>. And several years later, Microsoft closed this project and ask developer to migrate to other choices, which is very ridiculious.

And I'm not so optimisic on SK to get popular as you do. The major reason is because machine learning is not the area C# is good at. ML.NET has almost failed the battle with python machine learning toolbox. Almost no data scienctist is using ML.NET.

However SK must evolve faster.

I'm not sure. Let's see

tonyqus commented 10 months ago

舍弃掉这身Java臭皮囊,加入光荣的.NET进化吧!

@UlyssesWu 卧槽,你尽然是Java叛逃人员,牛逼啊。欢迎加入.NET大家庭,哈哈哈

UlyssesWu commented 10 months ago

The but part means 'No, it's not available now. '

Yes but it's easy to just implement a ITextCompletion with other C# LLM bindings. And there is 3rd party support for llama and there will be an official one later: https://github.com/microsoft/semantic-kernel/issues/1215

I just wanna be a normal user of SK.

I have to write many codes to actually utilize langchain, and sometimes I have to modify its code, too. What is "a normal user"? Be a coder first. At least, don't be a keyboard warrior.

I'd like to evaluate it first before starting coding with it.

The first step of evaluation is to try it. Otherwise you won't have the right to complain about it like me.

你尽然是Java叛逃人员

I seldomly use Java in my project in fact. It's just a joke to mix .NET Core with The Hex Core, if you didn't realized. btw, SK need to be upgraded.

tonyqus commented 10 months ago

The first step of evaluation is to try it. Otherwise you won't have the right to complain about it like me.

Not really. This is Github not Gitee. Anyone can complain. I see you have moved to US. Please change your mind. Otherwise, there is no difference where you live. And you should learn to be kind to people even someone are tough.

In my opinion, SK should has a honest overview on its capability instead of promoting like a cheater. This will definitely waste the .NET community time. .NET community should unite to compete on something it's good at.

Btw, you are younger than me. Don't teach me like an expert. I'm much senior on .NET than you are.

I seldomly use Java in my project in fact.

That's a problem I believe. Any .NETer should learn Java/Python to understand the ecosystem of other programming language. Instead of staying in Microsoft well as a frog (微软的井底之蛙). I'm saying this not because I'm blaming you but you are a mirror of the old me.

I used to believe C# is the most powerful language in the world as you do. However, after one year as a big data architect, I totally changed my mind. It's totally impossible mission to replace Python with .NET as the big data language.

You see what happened to ML.NET. Almost no data scenstist or machine learning guy is using it. The nuget stats shows Microsoft.ML package only has 5M download, which is very little. And this is a library mainly promoted Microsoft itself. It should reach a number like 50M or more.

UlyssesWu commented 10 months ago

And you should learn to be kind to people even someone are tough.

😅 You should learn to be kind to people even someone are tough then, instead of throwing "Don't teach me like an expert" / "微软的井底之蛙" to anyone else.

you are younger than me. Don't teach me like an expert. I'm much senior on .NET than you are.

If you think I'm teaching you, you're not going to find an answer when posting this issue, instead, you just want some "evidences" for the "meaningless battle" I've mentioned. You are not neutral at the beginning.

Besides, a "senior" just won't try by yourself before asking and "just wanna be a normal user"? Good for you. I'm not going to teach a "senior on .NET", but I'm still able to teach a "normal user of SK" 😄

instead of promoting like a cheater

Yes I don't like over-promotion either. But:

  1. That's from "some CN groups" which cannot represent every .NET devs or MS.
  2. To debate against them you still have to be neutral at first, instead of just asking for some ideal evidences and throw towards them even before verifying by yourself.

That's a problem I believe. Any .NETer should learn Java/Python to understand the ecosystem of other programming language.

"Not really." <- If you said this to refuse trying SK and langchain before get conclusion, I will return this words to you. Besides, how can you assume I'm not familar with python while I didn't mention it before?

As I've said, I'm not going to join this meaningless battle. So, a normal user of SK (and perhaps the same normal user of langchain), good luck and bye 🤗

tonyqus commented 10 months ago

你一开始回答我的问题是挺好的,干嘛后来冒充来一句So... why not try by yourself before asking? 就感觉很莫名其妙,这也是我跟你说对别人稍微kind一点的原因。你这不是找茬嘛!一个技术玩具我为什么要花时间去试?有这时间我不能去搭langchain的demo环境?

另外我觉得你的回答有点回避问题,langchain本来就是主流LLM框架,你说不需要比较(你不想参加这种meaningless的战争),你就是觉得SK好,给我的感觉就是你不理性,也不专业。我本来是想听到 我觉得SK好在1,2,3等等等,但并没有发生。

哎,技术比较,可以有一说一,而不是回避。你有你的理由,你就说呗,回避什么。你不参与,SK和langchain之间的比较(战争)就不存在了吗?