The Facts Chatter
A Reddit thread from last month (titled “Langchain is pointless”) led to a HackerNews post over the weekend, leading to a lot of Twitter discourse — all asking the question: Is LangChain Good?
I’ve spent a lot of time thinking about this topic and chatting with developers who build with language models — these conversations have been going on for a while! Most of the best LLM developers I’ve worked with have scratched their heads at the popularity of LangChain; they don’t really get what value it’s providing.
I have a hunch as to why: LangChain isn’t a particularly powerful set of abstractions; it is a very useful set of templates.
LangChain as a set of Templates
Language models are the most singularly exciting developer technology in the world right now, but they weren’t even in the vocabulary of most developers even ~9 months ago. The incredibly rapid rise of LLMs led to one primary demand from the developer community: tools to get started with LLM development. LangChain’s use is predominantly from developers who are figuring out how to work with language models.
The template is one of the most powerful “getting started” tools that developers have — a piece of code that works that you can adapt and play around with to shape into a simple prototype. LangChain has implemented templates at an incredible velocity — as the LLM world has evolved over the last 9 months, it’s not uncommon for LangChain to release new capabilities on the same day as a new research finding or product release.
My first instinct when using LangChain was exactly this — I’d try out some new piece of LLM tech by using the LangChain implementation, then I’d go straight to the LangChain source code to figure out how they implemented it. That was really useful for me! Definitely worth my GitHub star!
LangChain as a set of Abstractions
Most of the negative discourse has been centered around LangChain as a set of abstractions. Abstractions share some commonality with templates! (why re-write code when you can use someone else's clean implementation?)
Abstractions are much more challenging to build than templates — abstractions are typically built on relatively static building blocks that represent best practices learned over a decent chunk of time.
LangChain (and anyone trying to build these abstractions!) faces two main problems:
The building blocks are the opposite of static! AI changes every week in 2023; new methods, models, and techniques are everywhere. The underlying API fundamentally shifted from completions to chat! It’s impossible to elegantly abstract something this dynamic.
As fast as the AI space is moving, people still take time to learn. It takes developers significant time to process new technologies and figure out best practices. These time scales are longer than the nine months we’ve fully focused on language models.
So where do we go next?
I think we need more time with these magical text completion models before we can build the fundamental abstractions that developers are clamoring for. That doesn’t mean that folks like LangChain shouldn’t be trying!
That said, it’s worth noting what LangChain is today — a valiant (and impressive!) attempt at abstractions that ended up being a more powerful collection of templates.