Listen to this story
|
Just because something is complicated does not mean that it is good and more intricate. LangChain is possibly the best example of this. At its base, the main offering of LangChain is an abstraction wrapper that makes it easier for programmers to integrate LLMs into their programs. While it provides a relatively simple interface for LLMs, many developers swear against using LangChain in a production environment due to its anachronisms.
Given the complexity of the software, developers are judging the intentions behind the existence of LangChain. A user of LangChain on a Reddit discussion, said that, “the thing with LangChain is that it solves the easy stuff you could do easily yourself, and didn’t put much thought around design and architecture in order to help you with the hard stuff.” It is over engineered
In a recent blog, Max Woolf also discussed the problems surrounding LangChain in depth. He argues that LangChain, instead of making things simpler, it makes simple things relatively more complex. “…with that unnecessary complexity [LangChain] creates a tribalism which hurts the up-and-coming AI ecosystem as a whole. If you’re a newbie who wants to just learn how to interface with ChatGPT, definitely don’t start with LangChain,” advised Woolf.
Similar thoughts are being expressed on HackerNews, where people are saying, “LangChain is garbage software”. LangChain as a project is a valuable resource in expediting people’s work, aiding them in understanding the inner workings of various processes. “It served as a kind of AI cookbook, offering recipes for different tasks.”
But later, the user said that once they identified a suitable approach, they planned to re-implement everything using the underlying components that LangChain was purportedly abstracting. At present, using LangChain was faster and more efficient than searching for and learning individual libraries and their APIs. They intended to continue using it primarily within notebooks for their ongoing projects, and not direct implementation, as they feel like black-boxes.
Woolf said that criticising open source software is not the intent, but arguing that it is good for beginners to dive into is not true. With an example of translating English to French, he elaborates how LangChain uses about the same amount of code as just using the official OpenAI library, except it incorporates more object classes for not much obvious code benefit. This makes the task of learning machine learning even more difficult as it brings in another step of learning LangChain before building AI tools.
The feeling of frustration is being felt among all developers. People on HackerNews, Twitter, and Reddit alike narrated their stories about how they were very excited to use LangChain on their projects but later realised that it’s a complete mess and stupidly complex. Eventually leading them to strip it out of their project completely.
It’s not that bad
Developers have stated that what NumPy and Pandas did for machine learning, LangChain has done for LLMs, greatly increasing their usability and functionality. By using LangChain, developers can empower their applications by connecting them to an LLM, or leverage a large dataset by connecting an LLM to it.
LangChain went very early into agents and has assembled a truly impressive variety of features there by now. Moreover, OpenAI released the feature of function calling into its base offering, something that is learned from LangChain. Though people argue that it has made LangChain as a separate tool redundant, the feat is still impressive.
When it comes to frameworks such as LangChain, it is similar to a natural evolution observed in many frameworks that strive to accommodate emerging technologies. Nevertheless, developers believe that in this particular instance of LangChain, the project’s ability to enhance itself beyond its original design limitations seemed improbable without a comprehensive rewrite or the risk of becoming obsolete compared to alternative frameworks.
Overall, LangChain seems to embody a complex and intricate approach, despite its relatively young age. Adapting it to meet specific requirements would result in substantial technical debt, which cannot be easily resolved as is often the case with AI startups relying on venture capital to manage such issues.
Ideally, API wrappers should simplify code complexity and cognitive burden when dealing with intricate ecosystems, given the mental efforts already required to work with AI. However, LangChain stands out as one of the few software pieces that introduce additional overhead in its prevalent use cases.