Langchain frustration
I was building an agent with langchain today, and was very frustrated with the developer experience. It felt hard to use, hard to get things right, and overall I was confused a lot while developing (for no good reason).
Why is it so hard to use? Here are some of my observations.
- Verbose. If I have done something once on ChatGPT, I should be able to turn that into an app by just copying in a list of prompts. (Idea: maybe an agent chain from this?)
- Bad abstractions. The distinction between an Agent and a Tool is not actually a clear one (an Agent can call another Agent as a "tool", and a Tool often actually involves a call to an LLM itself). There are two different interfaces to remember as well. I've had this feeling before too -- Harrison Chase (the founder of langchain) ships extremely fast, but it feels like this is a good time to pause and redesign the developer interface.
- Lack of tool ecosystem. Sure, there are a few built-in, but there could be an immense Open-source ecosystem of shared tools. Kind of like Obsidian plugins. There probably are many, but they are hard to discover -- Obsidian's plugin directory solves that quite well.
- Hard to debug. It's good that you see chain & agent output in the terminal, but boy does that get out of hand quickly! An agent/tool can output pages of text per invocation, and scrolling terminal becomes tedious very quickly.
Of course, it is very early software. It will get better. And frustration is actually a sign of a valuable product -- it shows that I (and probably other users) really care.
Perhaps this is actually a property of developing with LLMs? I do think a new programming paradigm is arising, enabled by cheap and fast LLM APIs. I imagine early Android developers must have felt the same, struggling with the not-quite-right abstractions and difficulties debugging, etc. So assuming these are the early days, there is reason for optimism.