Live data from Hacker News

Why we no longer use LangChain for building our AI agents

octomind.dev

191–200 of 307 posts

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

#191
post #186

Damn I built a RAG agent during the past 3 months and a half for my internship. And literally everyone in my company was asking me why I wasn't using llangchain or llamaindex like I was a lunatic. Everyone else that built a rag in my company used llangchain, one even went into prod. I kept telling them that it works well if you have a standard usage case but the second you need to something a little original you have…

you are heading the right direction. It's amazing to see seasoned engineers go through the mental gymnastic of justifying installing all those dependencies and arguing about vector db choices when the data fit in ram and the swiss knife is right there: np.array

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

#192

LLM frameworks like LangChain are causing a java-fication or Python . Do you want a banana? You should first create the universe and the jungle and use dependency injection to provide every tree one at a time, then create the monkey that will grab and eat the banana.

I’ll use this to explain why typescript is bad

Bad TypeScript is a PEBCAK.

Idiomatic and maintainable TypeScipt is no worse than vanilla JavaScript.

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

#194

Earlier quoted context omitted.

Reread the thread and the comment. It's about the LLM frameworks and acknowledges that most non LLM frameworks historically are helpful and correct in abstracting away details.

Ah the bit in parentheses was worded such that I misunderstood your point.

That bit is poorly worded. I should have had a comma before the last word. My bad.

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

#195
post #189

Earlier quoted context omitted.

OOP is Java, and Java is OOP, right? My point is to follow a dogmatic OOP approach (think all the nouns like Agent, Prompt, etc.) to model something rather sequential.

No, you can do OOP without having to use Java, but you cannot really do Java without at least some OOP concepts. I'm guessing only Smalltalk rivals Java in OOP-ness, as in Smalltalk literally everything is an object, while in Java only most things are objects.

The OOP concept described by Smalltalk is message passing. The closest OOP-ness rivals are Ruby and Objective-C (and arguably Erlang). Java has no such facilities. Java is much more like C++.

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

#197
I made the same choice for our stack last year.

We initially had problems diagnosing issues inside LangChain and were hitting weird issues with some elements of function calling, so we experimented with a manual reconstruction of exactly what we needed and it was faster, more resilient and easier to maintain.

I can see how switching models might be easier using LangChain as an abstraction layer, but that doesn't justify making everything else harder.

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

#198
I used LangChain early on in it's life. People crap on their documentation but at least at that point in time I had no problem with it. I like reading source code so I'd find myself reading the code for further comprehension anyway. In my case - I'm a seasoned engineer who was discovering LLMs and thought LangChain suited that way of learning pretty well.

When it came to building anything real beyond toy examples, I quickly outgrew it and haven't looked back. We don't use any LC in production. So while LC does get a lot of hate from time to time (as you see in a lot of peers posts here) I do owe them some credit for helping bridge my learning of this domain.

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

#199
post #186

Damn I built a RAG agent during the past 3 months and a half for my internship. And literally everyone in my company was asking me why I wasn't using llangchain or llamaindex like I was a lunatic. Everyone else that built a rag in my company used llangchain, one even went into prod. I kept telling them that it works well if you have a standard usage case but the second you need to something a little original you have…

Could someone point me towards a good resource for learning how to build a RAG app without llangchain or llamaindex? It's hard to find good information.

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

#200
post #186

Damn I built a RAG agent during the past 3 months and a half for my internship. And literally everyone in my company was asking me why I wasn't using llangchain or llamaindex like I was a lunatic. Everyone else that built a rag in my company used llangchain, one even went into prod. I kept telling them that it works well if you have a standard usage case but the second you need to something a little original you have…

I had a similar experience when LangChain first came out. I spent a good amount of time trying to use it - including making some contributions to add functionality I needed - but ultimately dropped it. It made my head hurt.

Most LLM applications require nothing more than string handling, API calls, loops, and maybe a vector DB if you're doing RAG. You don't need several layers of abstraction and a bucketload of dependencies to manage basic string interpolation, HTTP requests, and for/while loops, especially in Python.

On the prompting side of things, aside from some basic tricks that are trivial to implement (CoT, in-context learning, whatever) prompting is very case-by-case and iterative, and being effective at it primarily relies on understanding how these models work, not cargo-culting the same prompts everyone else is using. LLM applications are not conceptually difficult applications to implement, but they are finicky and tough to corral, and something like LangChain only gets in the way IMO.

Post reply on HN