Ranting about LangChain, a python library for building stuff on top of llm calls.
LangChain is a horrible pile of abstractions. There are many ways of doing the same thing. Every single function has a lot of gotchas (that doesn’t even get mentioned in documentations). Common usage patterns are hidden behind unintuitive, hard to find locations (callbacks has to be implemented as an instance of a certain class in a config TypedDict). Community support is non-existent despite large number of users. Exceptions are often incredibly unhelpful with unreadable stack trace. Lots of stuff are impossible to type check because langchain allows for too much flexibility, they take in prompt templates as format strings (i.e. “strings with {variables}”) and then allows you to fill in the template at runtime with a dict, so now nothing can be statically type checked :)
Ranting about LangChain, a python library for building stuff on top of llm calls.
LangChain is a horrible pile of abstractions. There are many ways of doing the same thing. Every single function has a lot of gotchas (that doesn’t even get mentioned in documentations). Common usage patterns are hidden behind unintuitive, hard to find locations (callbacks has to be implemented as an instance of a certain class in a config TypedDict). Community support is non-existent despite large number of users. Exceptions are often incredibly unhelpful with unreadable stack trace. Lots of stuff are impossible to type check because langchain allows for too much flexibility, they take in prompt templates as format strings (i.e. “strings with {variables}”) and then allows you to fill in the template at runtime with a dict, so now nothing can be statically type checked :)