Live data from Hacker News

Langchain Is Pointless

old.reddit.com

61–70 of 192 posts

Re: Langchain Is Pointless

#61

I have looked for the value and never really found it. It seems to mostly be (bad) abstractions around things you could easily do without langchain. Take one of the most important llm things: prompt templates. What does langchain add over a simple function and an f string? Maybe I'm missing the point, but I can't find anything. Anyway, it seems people like it so who am I to judge, but I don't like making our codebase…

Honestly, it's hard to even tell if people really like it or if the LangChain team have just done a really good job of evangelizing for it. I saw that they did some kind of interview with Andrew Ng the other day. I feel like that sort of thing doesn't just happen by accident, but because someone actively reached out to him, especially considering that LangChain has only been on the scene for a couple of months.

Re: Langchain Is Pointless

#62
post #39

Remember, this is the project that raised ~$30m from Benchmark and Sequoia. There was a controversial "quality doesn't matter for software products" post and discussion[0] here on HN a few days ago and this is a beautiful example. Product may matter eventually, but you can sure surf the hype for a long time before the reckoning comes (and if you're lucky, you may even be able to get someone else to hold the bag then)…

Any ideas what valuation range that might imply?

The rumored valuation was around $200M, and the product is pre-revenue right now. So that seems pretty ridiculous.

Re: Langchain Is Pointless

#63

I have looked for the value and never really found it. It seems to mostly be (bad) abstractions around things you could easily do without langchain. Take one of the most important llm things: prompt templates. What does langchain add over a simple function and an f string? Maybe I'm missing the point, but I can't find anything. Anyway, it seems people like it so who am I to judge, but I don't like making our codebase…

I actually found a lot of value when I left the LangChain ecosystem and started using jinja templates. The syntax from home assistant moved over and I can just pass dictionaries to render a prompt now.

Re: Langchain Is Pointless

#64

I have looked for the value and never really found it. It seems to mostly be (bad) abstractions around things you could easily do without langchain. Take one of the most important llm things: prompt templates. What does langchain add over a simple function and an f string? Maybe I'm missing the point, but I can't find anything. Anyway, it seems people like it so who am I to judge, but I don't like making our codebase…

I agree, and that's why I've been working on AIPL[0]. Our first v0.1 release should be in the next few days. https://github.com/saulpw/aipl

It's basically just a simple scripting language with array semantics and inline prompt construction, and you can drop into Python any time you like.

Re: Langchain Is Pointless

#66
I have a full-on "The Problem With LangChain" blog post in the pipeline, and the reason I made a simple alternative (https://news.ycombinator.com/item?id=36393782) because I spent a month working with LangChain and coming to the conclusion that it's just easier to make my own Python package than it is to hack LangChain to fit my needs.

A few bullet points:

- LangChain encourages tool lock-in for little developer benefit, as noted in the OP. There is no inherent advantage into using them, and some have suboptimal implementations.

- The current implementations of the ReAct workflow and prompt engineering are based on InstructGPT (text-davinci-003), and are extremely out of date compared to what you can do with ChatGPT/GPT-4.

- Debugging a LangChain error is near impossible, even with verbose=True.

- If you need anything outside the workflows in the documentation, it's extremely difficult to hack, even with Custom Agents.

- The documentation is missing a lot of relevant detail (e.g. the difference between Agent types) that you have to go diving into the codebase for.

- The extreme popularity of LangChain is warping the entire AI ecosystem around the workflows to the point of harming it. Recent releases by Hugging Face and OpenAI recontextualize themselves around LangChain's "it's just magic AI" to the point of hurting development and code clarity.

Part of the reason I'm hesitant to release said blog post is because I don't want to be that asshole who criticizes open source software that's operating in good faith.

Re: Langchain Is Pointless

#68

I have looked for the value and never really found it. It seems to mostly be (bad) abstractions around things you could easily do without langchain. Take one of the most important llm things: prompt templates. What does langchain add over a simple function and an f string? Maybe I'm missing the point, but I can't find anything. Anyway, it seems people like it so who am I to judge, but I don't like making our codebase…

Honestly, it's hard to even tell if people really like it or if the LangChain team have just done a really good job of evangelizing for it. I saw that they did some kind of interview with Andrew Ng the other day. I feel like that sort of thing doesn't just happen by accident, but because someone actively reached out to him, especially considering that LangChain has only been on the scene for a couple of months.

LangChain has been active since last year (after the ReAct paper was released), but gained most of its popularity after the ChatGPT hype.

Re: Langchain Is Pointless

#69

I have looked for the value and never really found it. It seems to mostly be (bad) abstractions around things you could easily do without langchain. Take one of the most important llm things: prompt templates. What does langchain add over a simple function and an f string? Maybe I'm missing the point, but I can't find anything. Anyway, it seems people like it so who am I to judge, but I don't like making our codebase…

Honestly, it's hard to even tell if people really like it or if the LangChain team have just done a really good job of evangelizing for it. I saw that they did some kind of interview with Andrew Ng the other day. I feel like that sort of thing doesn't just happen by accident, but because someone actively reached out to him, especially considering that LangChain has only been on the scene for a couple of months.

True, you gotta respect the marketing, they definitely got that covered and actually created some real value there, a $10M seed round to be precise.

I think they got the timing right and the idea is kinda alluring as well: have everything standardized, pluggable and swappable sounds neat. Just doesn't really work.

They are also doing a great job at maintaining the mirage of adding value. Templates for example will work totally fine, as they are just f strings. It seems there are plenty of people who don't really think twice about it, and they have captured that audience very well.

There is also a low barrier to contribute as everything is kinda basic, that must help a lot as well.

Re: Langchain Is Pointless

#70
I believe the abstractions in Langchain are inherently flawed. The core problem resides in the composability of chains. While it offers a handy way to create prototypes, it becomes restricting when you desire to modify a specific element within the chain. The hierarchical design of chains in Langchain conceals the component you wish to alter and obscures the parts developers might want to adjust, making the process of experimenting and refining the pipeline difficult.

The optimal abstraction for LLM apps, in my view, should resemble a DAG or a state machine. This alternative exposes the distinct stages in the pipeline rather than masking them in a hierarchy. Yes, adopting this new abstraction might lead to more code but it offers superior control. It's hardly surprising that many users start prototyping with Langchain, but then, when ready, they clone the prompts and construct their own systems.

Fixing this fundamental issue would be very difficult. It would necessitate reworking the library from the ground up.

Post reply on HN