Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
LangChain vs. LlamaIndex (myscale.com)
11 points by sqlvectordb on Aug 7, 2024 | hide | past | favorite | 9 comments


I was hopeful this would be useful, as it’s a relevant decision for me right now. Sadly, like most LLM articles I’ve even able to find, it reads like it was written by an AI.


My 2 cents - don’t rely on these frameworks and just do it yourself (or pick libraries like Instructor over these frameworks)

I think both have the wrong abstractions for people to build more complex workflows and use cases beyond demos.


seconded sibling comment's advice. just do it yourself. the overhead of learning these frameworks is not worth it because they aren't doing anything groundbreaking.

having tried them both, they are nearly the same with different semantics. langchain (python) had more libs and prebuilt integrations though.


Do not do it. They will teach you how to use their pointless abstractions which will mean when things don’t work right, you will have to traverse many libraries to figure out what is going wrong.

They will make a lot of things seem very easy, such as embeddings, but you will end up with a one size fits all solution that you don’t understand.

Semantic Kernel is one of the worst. They are always just one version away from the panacea of multi agent workflows, but unfortunately you’re going to have to blow up what you just built to implement the new version because reasons… Oh and can you load that into promptflow for me?. Know how those agents are really slow? You should buy provisioned AzureOpenAI throughput from us. For 24 low payments of 99999999999/mo..

Brilliant people working on this stuff with good intentions (the usual suspects), but everyone is trying to be on the bleeding edge and the bleeding edge changes quite a lot, leaving technical debt to be stumbled over.

Try some of your own libraries. When you find yourself doing something where you say “surely this has been done a million times” go out and take a look around and draw inspiration or bring the tools into your workflow, but don’t start that way if you can avoid it.


I was just wondering the other day about the llm frameworks out there. Ones I've heard things about:

Griptape

Dspy

Autogen

Guidance

Semantic kernel

Marvin from prefect

Haystack

And of course langchain and Llamaindex.

Which ones am I missing? Are any of them particularly good? Things like a simple way to interact with it (Marvin stands out), clean and organized code base, good support... If I had to pick one today I'd probably pick semantic kernel but not because I have used it, just because the ones I've used have either fallen short or been too much unnecessary complexity.


Take a look at BAML (boundaryml.com)

Its a different take that leverages a DSL to make prompting cleaner and fixes a few other ergonomic issues along the way.

you can try it online at promptfiddle.com


Instructor - great

Litellm - just a wrapper around llm libs (OpenAI/claude/etc)

Lmql - might not be necessary anymore with all the json modes out there.

Just off the top of my head.


Shameless plug: This is a podcast interview I did with Yi Ding of Llama index where we discussed some of the differences between LangChain and LlamaIndex (among other things). Give it a listen as a supplement to the article:

https://podcast.genaimeetup.com/e/typescript-ai-crafting-the...


reads like an AI article.

regardless, having used both in side projects I will say they are roughly the same with different semantics. So, either use langchain b/c it has more pre-built solutions or use neither because your project probably won't benefit from the abstractions they provide.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: