Live data from Hacker News

The Problem with LangChain

minimaxir.com

41–50 of 97 posts

Re: The Problem with LangChain

#41

I'm in the exact same spot as the author just a few days in instead of months. Frankly I could see langchain is garbage software just by looking at the code. It still helps me get shit done fast to figure out how things are supposed to work. Sort of a cookbook of AI recepies. Once I have an approach narrowed down I'll rewrite everything on top of stuff langchain is supposedly wrapping. For now it's faster than tracki…

You don't need to look at the code: I looked at the release notes and the garbage fire of unrelated nonsense getting added and got to skip even installing it. https://github.com/hwchase17/langchain/releases

At this point Langchain is almost required to accept any PR. They raised money, and now their growth metric is Github stars.

A simple wrapper around the APIs (I used llamaflow, which is now llm-api https://github.com/dzhng/llm-api) and a templating engine is most of what you need.

AI is not at a point where generalist prompts to do agent/memory/search things is a good idea for a real product. You need to integrate procedural guidance unless you want your UX to be awful.

Re: The Problem with LangChain

#42

I'm in the exact same spot as the author just a few days in instead of months. Frankly I could see langchain is garbage software just by looking at the code. It still helps me get shit done fast to figure out how things are supposed to work. Sort of a cookbook of AI recepies. Once I have an approach narrowed down I'll rewrite everything on top of stuff langchain is supposedly wrapping. For now it's faster than tracki…

[deleted]

Re: The Problem with LangChain

#43
I'm in the exact same situation. Every time I try todo something with LangChain it is a major pain and inevitably leads to me having todo something extremely sketchy to make it work. Also a lot of the functionality it provides in the first place is pretty terrible a lot of vector store/memory integrations barely work and some have been broken for weeks. The JSON parsing is also incredibly sketchy and randomly breaks.

Re: The Problem with LangChain

#44
post #22
post #4

I generally agree, but why so polemic? I mean, it starts by giving the full name of the original author… calls using his free software a waste of time… destroys the design as if tearing down someone’s work who made bad decisions at every turn when making a brand-new thing that is FOSS. Did anyone else find that a bit strange? Did I miss the light-hearted tone buried somewhere? That said, strangely… useful examples an…

https://gwern.net/holy-war Anyone who's been burned by LangChain, especially now that it has VC funding, has to be worried that LangChain will become the cross-LLM standard library™, and they'll be dealing with it and endless patches to it for the rest of their lives. (Think systemd or NPM or Python packaging.) If it's as bad as described, the time to stop LangChain is to strangle it in the cradle, before it can get…

There is MS Guidance for GPT-3.5 and 4 so I expect most devs will migrate there and LangChain will die out.

Re: The Problem with LangChain

#45
post #22
post #4

I generally agree, but why so polemic? I mean, it starts by giving the full name of the original author… calls using his free software a waste of time… destroys the design as if tearing down someone’s work who made bad decisions at every turn when making a brand-new thing that is FOSS. Did anyone else find that a bit strange? Did I miss the light-hearted tone buried somewhere? That said, strangely… useful examples an…

https://gwern.net/holy-war Anyone who's been burned by LangChain, especially now that it has VC funding, has to be worried that LangChain will become the cross-LLM standard library™, and they'll be dealing with it and endless patches to it for the rest of their lives. (Think systemd or NPM or Python packaging.) If it's as bad as described, the time to stop LangChain is to strangle it in the cradle, before it can get…

It has an insane amount of traction and Harrison Chase is totally overplaying in a self-serving way. I've seen the guy IRL an annoying amount of times now considering his claim to fame is raising VC money for a code dumping ground.

People are taking it personally because there's shared a realization that he represents the Crypto-ization of raising for AI based startups: going full hype leader over substance.

Re: The Problem with LangChain

#46
post #35

I came to the same conclusion with author, decided to make port to Go. With a plan to just adopt the concepts and strip all the unnecessary complexity and lots things mentioned by the article. Datastore, chain, tools, model are pretty much implemented. However coming to Agent, I'm now wondering if it's the right way to do things. It does work, but is it efficient? At least I know it's not simple.

mind sharing the repo?

Re: The Problem with LangChain

#47
I used Langchain before for a job interview and was not confident with how it works under the hood and how dangerous would it be if there’s some injection going on. So I used it as minimal as possible. It took me a lot of codes even though when I’m using it minimally. One of their example is to call an API by letting LLM parse a documentation and call the API from its understanding, which looks so unreliable if the LLM went offs a bit. I found it hard to give total control to Langchain.

I tried experimenting on building a library that makes it easy and transparent to use LLM https://github.com/adityapurwa/jehuty and tried the middleware approach that might be more familiar in general. Its an experiment so the API might changes a lot until we find a sweet spot. If you have an advice or suggestions it would be helpful and appreciated.

Re: The Problem with LangChain

#48
I played around with simpleaichat for a few minutes just now, and I really like it. Unlike LangChain, I can understand what it does in minutes, and it looks like its primitives are fairly powerful. It looks like it's going to replace the `openai` library for me, it seems like a nice wrapper.

I'm especially looking forward to playing with the structured data models bit: https://github.com/minimaxir/simpleaichat/blob/main/examples...

Well done, Max!

Re: The Problem with LangChain

#49
Calling LLM API is just 2 line of code. Building LLM App is just API Calling. LangChain is a framework for sequential api calling, warpping 2 lines of code with 2 thousand lines of code, also wrapping python While loop in chain object. It's like: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris...

Re: The Problem with LangChain

#50
post #30
post #22

Earlier quoted context omitted.

https://gwern.net/holy-war Anyone who's been burned by LangChain, especially now that it has VC funding, has to be worried that LangChain will become the cross-LLM standard library™, and they'll be dealing with it and endless patches to it for the rest of their lives. (Think systemd or NPM or Python packaging.) If it's as bad as described, the time to stop LangChain is to strangle it in the cradle, before it can get…

I’m a bit confused about why it’s a Python library and where its value proposition lies. If LLMs are going to be ubiquitous in app development, wouldn’t you expect Apple to release a Swift library that blows LangChain out of the water (similarly with Jetbrains/Kotlin, or Microsoft/C#).

You could chain python anything with itertools… airflow, multiprocessing, jenkins, graph redis, celery… pick your poison.

I’d probably spend 15% too many manhours making it bespoke…

But The Creator of whatever just solved a problem before I did. Of course I’m going to use that until a better solution is practical.

Post reply on HN