Live data from Hacker News

Why we no longer use LangChain for building our AI agents

octomind.dev

61–70 of 307 posts

Re: Why we no longer use LangChain for building our AI agents

#62
post #41

Earlier quoted context omitted.

Yeah I thought the consensus against LangChain was formed a year ago, surprised to still be seeing these articles.

Just chit chatting, not a strong claim, more a hot take I turn over in my mind: my guess is 40% of software engineers did a AI pivot the last 18 months, so there's a massive market for frameworks, and there's an inclination to go beyond REST requests, find something that just does it for you / can do all the cool patterns you'll find in research papers. Incredible amount of bad info out there, whether its the 10th pr…

This is true. Devs are looking for frameworks. See CrewAI who refuses to allow users to disable some pretty aggressive telemetry, yet they have a huge number of GH stars.

The abstractions are handy if you have no idea what you are doing but it's not groundbreaking tech.

https://github.com/joaomdmoura/crewAI/pull/402

Re: Why we no longer use LangChain for building our AI agents

#63
post #41

Earlier quoted context omitted.

Yeah I thought the consensus against LangChain was formed a year ago, surprised to still be seeing these articles.

Just chit chatting, not a strong claim, more a hot take I turn over in my mind: my guess is 40% of software engineers did a AI pivot the last 18 months, so there's a massive market for frameworks, and there's an inclination to go beyond REST requests, find something that just does it for you / can do all the cool patterns you'll find in research papers. Incredible amount of bad info out there, whether its the 10th pr…

[deleted]

Re: Why we no longer use LangChain for building our AI agents

#64
post #33

LangChain itself blows my mind as one of the most useless libraries to exist. I hope this does not come off the wrong way but so many people told me they were using it so it was easy to move been models. I just did not understand it, these are simple API calls that felt like Web Dev 101 when starting a new product. Maybe its that so many new people were coming into the field using LLM but it surprised me as even what…

never understood the "chain" in langchain.

Re: Why we no longer use LangChain for building our AI agents

#65
post #47

Earlier quoted context omitted.

Every time I approached LangChain, contrary to the attitude of my colleagues, I could never figure out what the point of it was other than to fetishize certain design patterns. Interacting with an LLM in a useful way requires literally none of what LangChain has to offer, yet for a time it was on its way to being the de facto way to do anything with LLMs. It reminds me a lot of the false promise of ORMs, which is tha…

ORMs are useful though for a different reason. They let you creat typed objects then generate the schema from them and automatically create a lot of boilerplate SQL for you. Admittedly for anything more than 1-2 joins you are better off hand crafting the SQL. But that is the exception not the rule. Refactoring DB changes becomes easier, you have a history of migrations for free, DDL generation for free. In the early…

Admittedly for anything more than 1-2 joins you are better off hand crafting the SQL. But that is the exception not the rule.

String disagree: if that’s true you likely don’t even need a proper RDBMS in the first place.

An ORM is not a replacement for knowing how SQL works, and it never will be.

Re: Why we no longer use LangChain for building our AI agents

#66

Earlier quoted context omitted.

It was the first pass at solving the common problems when building with LLMs. People jumped on it because it was trendy and popular. But it quickly became obvious that LangChain would be better named LangSpaghetti. That’s nothing against the authors. What are the chances the first attempt at solving a problem is successful? They should be commended for shipping quickly and raising money on top of it to keep iterating…

Langchain feels very much like shovelware that was created for the sole purpose of parting VCs of their money. At one point the codebase had a "prompt template" class that literally just called Python's f-string.

[dead]

Re: Why we no longer use LangChain for building our AI agents

#67
post #25

Earlier quoted context omitted.

The point is that you don’t need a framework for that; the APIs are already similar enough that it should be obvious how to abstract over them using whatever approach is natural in your programming language of choice.

I have a consumer app that swaps between the 5 bigs and wholeheartedly agree, except, God help you if you're doing Gemini. I somewhat regret hacking it into the same concepts as everyone else. I should have built stronger separation boundaries with more general abstractions. It works fine, I haven't had any critical bugs / mistakes, but it's really nasty once you get to the actual JSON you'll send. Google's was 100%…

> Google's was 100% designed by a committee of people who had never seen anyone else's API

Google made their API before the others had one, since they were the first with making these kind of language models. Its just that it has been an internal API before.

Re: Why we no longer use LangChain for building our AI agents

#68
Langchain was released in October 2022. ChatGPT was released in November 2022.

Langchain was before chat models were invented. It let us turn these one-shot APIs into Markov chains. ChatGPT came in and made us realize we didn't want Markov chains; a conversational structure worked just as well.

After ChatGPT and GPT 3.5, there were no more non-chat models in the LLM world. Chat models worked great for everything, including what we used instruct & completion models for. Langchain doing chat models is just completely redundant with its original purpose.

Re: Why we no longer use LangChain for building our AI agents

#69
post #68

Langchain was released in October 2022. ChatGPT was released in November 2022. Langchain was before chat models were invented. It let us turn these one-shot APIs into Markov chains. ChatGPT came in and made us realize we didn't want Markov chains; a conversational structure worked just as well. After ChatGPT and GPT 3.5, there were no more non-chat models in the LLM world. Chat models worked great for everything, inc…

We use instruct models extensively as we find smaller models fine tuned to our prompts perform better when general chat models that are much larger. This lets us run inference that can be 1000x cheaper than 3.5, meaning both money saving and much better latencies.

Re: Why we no longer use LangChain for building our AI agents

#70
post #68

Langchain was released in October 2022. ChatGPT was released in November 2022. Langchain was before chat models were invented. It let us turn these one-shot APIs into Markov chains. ChatGPT came in and made us realize we didn't want Markov chains; a conversational structure worked just as well. After ChatGPT and GPT 3.5, there were no more non-chat models in the LLM world. Chat models worked great for everything, inc…

We use instruct models extensively as we find smaller models fine tuned to our prompts perform better when general chat models that are much larger. This lets us run inference that can be 1000x cheaper than 3.5, meaning both money saving and much better latencies.

This feels like a valid use for langchain then. Thanks for sharing.

Which models do you use and for what use cases? 1000x is quite a lot of savings; normally even with fine-tuning it's at most 3x cheaper. Any cheaper we'd need to get like $100k of hardware.

Post reply on HN