Live data from Hacker News

Hacking LangChain for fun and profit

blog.kevinhu.me

21–27 of 27 posts

Re: Hacking LangChain for fun and profit

#21
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!

"Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

"Don't be snarky."

https://news.ycombinator.com/newsguidelines.html

Re: Hacking LangChain for fun and profit

#22
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’s only value is abstractions and it gets these wrong. That said I’m not against it and I hope it improves.

Re: Hacking LangChain for fun and profit

#23
post #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…

Any examples? How can I see the exact interactions behind the scenes that it's performing in order to DIY? Setting verbose to true doesn't seem to show everything

Re: Hacking LangChain for fun and profit

#24

Earlier quoted context omitted.

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’s only value is abstractions and it gets these wrong. That said I’m not against it and I hope it improves.

Do you have any thoughts on what the right abstractions are? Asking for a friend.

Re: Hacking LangChain for fun and profit

#25
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's worth cribbing ideas from. But most of what it does is simple enough and wrapped in enough abstraction that it's often easier to just take those ideas and apply them to your own code vs. using LangChain itself.

Re: Hacking LangChain for fun and profit

#26
post #11

Earlier quoted context omitted.

> 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…

Any examples? How can I see the exact interactions behind the scenes that it's performing in order to DIY? Setting verbose to true doesn't seem to show everything

It’s open source mate. Just dig around in the source code for long enough. It’s not pretty, but you can usually figure out how they’re abstracting.

Re: Hacking LangChain for fun and profit

#27

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

Sort of. I’ve found it’s value , currently, is not in its intended purpose to build “chains” of tools. The moment you have to do something non-standard you have to build from scratch which is more difficult with all of the abstraction involved.

Where I do find it useful is the many tools it saves me from having to build from scratch. For example I use a page scraper and an embedding service with retries are two things I use it for with the bot I built for my companies slack and discord. In theory I could see using it more in my project eventually. https://github.com/ShelbyJenkins/shelby-as-a-service

Post reply on HN