UHG
Search
Close this search box.

Why Langchain is Bad? Limitation & Criticism

LangChain uses the same amount of code as the official OpenAI library and makes it even more complicated.

Share

LangChain is Garbage

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.

📣 Want to advertise in AIM? Book here

Picture of Mohit Pandey

Mohit Pandey

Mohit dives deep into the AI world to bring out information in simple, explainable, and sometimes funny words.
Related Posts
19th - 23rd Aug 2024
Generative AI Crash Course for Non-Techies
Upcoming Large format Conference
Sep 25-27, 2024 | 📍 Bangalore, India
Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

Flagship Events

Rising 2024 | DE&I in Tech Summit
April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore
Data Engineering Summit 2024
May 30 and 31, 2024 | 📍 Bangalore, India
MachineCon USA 2024
26 July 2024 | 583 Park Avenue, New York
MachineCon GCC Summit 2024
June 28 2024 | 📍Bangalore, India
Cypher USA 2024
Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA
Cypher India 2024
September 25-27, 2024 | 📍Bangalore, India
discord-icon
AI Forum for India
Our Discord Community for AI Ecosystem, In collaboration with NVIDIA.