Live data from Hacker News

Hacking LangChain for fun and profit

blog.kevinhu.me

11–20 of 27 posts

Re: Hacking LangChain for fun and profit

#11

still not sure of the value of the langchain abstraction. does anyone use it in prod?

> use it in prod?

I think that’s the wrong goal.

Langchain, with its kitchen-sink approach is great for newbies playing around with language models, to get a feel for the different things possible. The uniform interfaces make it very easy to snap together pieces and try things out (iff you don’t care to understand what’s happening under the hood).

Once you know exactly what you need (which might be 10% of Langchain’s capabilities), it might make sense to avoid all the cruft and build your own simple wrappers suited to the task at hand — especially if you need a robust and transparent/debuggable system. Langchain has a little too much indirection, and clumsy abstractions, to be fit for this purpose.

Re: Hacking LangChain for fun and profit

#12
post #7

I’ll save yall some time. If you are familiar with concatenating strings in python, langchain is a library which does just that, only a little less cleanly. Hope this helps!

That's a bit cynical. It does many other thing as well. For example, it exposes simple re-usable modules, also known as "functions" in Python. Sometimes it also uses Python "lists" by wrapping them into... classes.

> Sometimes it also uses Python "lists" by wrapping them into... classes.

Class incomprehension is the defining feature of LangChain!

Re: Hacking LangChain for fun and profit

#13
post #7

I’ll save yall some time. If you are familiar with concatenating strings in python, langchain is a library which does just that, only a little less cleanly. Hope this helps!

I noticed there is a lot of negativity against langchain on HN. Is it because it's very popular? For example deeplearning.ai has courses on LangChain. You think someone like Andrew Ng will stand behind an overhyped tech?

Re: Hacking LangChain for fun and profit

#14
post #7

I’ll save yall some time. If you are familiar with concatenating strings in python, langchain is a library which does just that, only a little less cleanly. Hope this helps!

I noticed there is a lot of negativity against langchain on HN. Is it because it's very popular? For example deeplearning.ai has courses on LangChain. You think someone like Andrew Ng will stand behind an overhyped tech?

[flagged]

Re: Hacking LangChain for fun and profit

#15
post #7

I’ll save yall some time. If you are familiar with concatenating strings in python, langchain is a library which does just that, only a little less cleanly. Hope this helps!

I noticed there is a lot of negativity against langchain on HN. Is it because it's very popular? For example deeplearning.ai has courses on LangChain. You think someone like Andrew Ng will stand behind an overhyped tech?

Absolutely Andrew NG would make questionable decisions imo. I was shocked to see him teach his classes with Matlab year over year when everyone and their mother was proficient in python.

Re: Hacking LangChain for fun and profit

#17

still not sure of the value of the langchain abstraction. does anyone use it in prod?

Yes, the map-reduce chains for summarisation, to work around context size limits of LLM. It works while there is a lot more debugging to do why is it much slower than expected (but it is fortunately fast enough for the task).

Langchain has a lot of surface area and it is still on 0.0.x, so also much advised to pin the versions hard.

Re: Hacking LangChain for fun and profit

#18
post #7

I’ll save yall some time. If you are familiar with concatenating strings in python, langchain is a library which does just that, only a little less cleanly. Hope this helps!

I noticed there is a lot of negativity against langchain on HN. Is it because it's very popular? For example deeplearning.ai has courses on LangChain. You think someone like Andrew Ng will stand behind an overhyped tech?

It inflates its promises and then grossly under delivers.

Re: Hacking LangChain for fun and profit

#19
Although LangChain might not be great as a library/framework, it still could be a great starting point to learn about programming pattern for prompt/actor programming.

They used to have a "concepts" page that links to relevant papers but it seems that the page is gone from the doc for some reason :-(

Post reply on HN