News for hackers. Stuff that matters.
Re:Re-implementing LangChain in 100 lines of code by zyang on Friday May 05, 2023 @01:01AM (#35825383)
I'm glad I wasn't the only one that felt Langchain had a ton of redundant abstractions engineered to gain clout for vc money. Here is an example:

AnalyzeDocumentChain[1] just wraps RecursiveCharacterTextSplitter[2]. It serves no real purpose except padding the api doc.

[1] https://js.langchain.com/docs/modules/chains/other_chains/an... [2] https://js.langchain.com/docs/modules/chains/other_chains/su...

Re:Re-implementing LangChain in 100 lines of code by crazyedgar on Friday May 05, 2023 @01:25AM (#35825507)
It's worse than that. The documentation is a confusing mess that completely omits the explanation of key default parameters and details. And the abstractions are horrendously brittle. And difficult to fix, because there are too many layers.

The best use of LangChain is probably just looking at the included prompts in the source code for inspiration.