Live data from Hacker News

Why we no longer use LangChain for building our AI agents

octomind.dev

101–110 of 307 posts

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

#101
post #8

Bigger problem might be using agents in the first place. We did some testing with agents for content generation (e.g. "authoring" agent, "researcher" agent, "editor" agent) and found that it was easier to just write it as 3 sequential prompts with an explicit control loop. It's easier to debug, monitor, and control the output flow this way. But we still use Semantic Kernel[0] because the lowest level abstractions tha…

What's the difference? I thought "agents" was just a fancier word for sequential prompts.

Some "agents" like the minecraft bot Voyager(https://github.com/MineDojo/Voyager) have a control loop, they are given a high level task and then they use LLM to decide what actions to take, then evaluate the result and iterate. In some LLM frameworks, a chain/pipeline just uses LLM to process input data(classification, named entitiy extraction, summary, etc).

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

#102

Earlier quoted context omitted.

Very much depends on the framework. I'm currently building a GitHub App with the Probot framework, which mostly just handles authentication boilerplate and some testing niceties, then just gives you an authenticated GitHub API client (no facade/abstraction). Then of course there's the many web application frameworks, because nobody in their right mind would want to implement http request parsing themselves (outside o…

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.

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

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

Chat models were not invented with ChatGPT. Conversational search and AI was a well-established field of study well before ChatGPT. It is remarkable how many people unfamiliar with the field think ChatGPT was the first chat model. It may be the first widely-popular chat model but it certainly isn’t the first

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

#106
post #100

I built my first commercial LLM agent back in October/November last year. As a newcomer to the LLM space, every tutorial and youtube video was about using LangChain. But something about the project had that "bad code" smell about it. I was fortunate in that the person I was building the project for was able to introduce me to a few other people more experienced with the entire nascent LLM agent field and both of them…

I've only ever played around with it and not built out an app like you have, but in my experience the second you want to go off script from what the tutorials suggest, it becomes an impossible nightmare of reading source code trying to get a basic thing to work. LangChain is _the_ definition of death by abstraction.

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

#107
shameless plug - i build a JS/TS framework which tries to solve the abstraction problem. we use a json variant called jsonnet (created at google. expressive enough for kubernetes).

https://github.com/arakoodev/EdgeChains/tree/ts/JS/edgechain...

examples of these jsonnet for react COT chains - https://github.com/arakoodev/EdgeChains/blob/ts/JS/edgechain...

P.S. we also build a webassembly compiler that compiles this down to wasm and deploy on hardware.

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

#108
post #67

Earlier quoted context omitted.

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

No. That'd be a good explanation, but it's theoretical. In practice: A) there was no meaningful internal LLM API pre-ChatGPT. All this AI stuff was under lock and key until Nov 2022, then it was an emergency. B) the bits we're discussing are OpenAI-specific concepts that could only have occurred after OpenAI's. The API includes chat messages organized with roles, an OpenAI concept, and "tools", an OpenAI concept, bot…

Google started including LLM features in internal products 2019 at least, I knew since I worked there then. I can't remember exactly when they started having LLM generated snippets and suggestions everywhere but it was there at least since 2019. So they have had internal APIs for this for quite some time.

> All this AI stuff was under lock and key until Nov 2022

That is all wrong... Did you work there? What do you base this on? Google has been experimenting with LLMs internally ever since the original paper, I worked in search then and I remember my senior manager said this was the biggest revolution in natural language processing since ever.

So even if Google added a few concepts from OpenAI, or renamed them, they still have had plenty of experience working with LLM APIs internally and that would make them want different things in their public API as well.

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

#109

Bigger problem might be using agents in the first place. We did some testing with agents for content generation (e.g. "authoring" agent, "researcher" agent, "editor" agent) and found that it was easier to just write it as 3 sequential prompts with an explicit control loop. It's easier to debug, monitor, and control the output flow this way. But we still use Semantic Kernel[0] because the lowest level abstractions tha…

What does semantic kernel do for you? It isn't immediately obvious from the Readme.

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

#110
post #10

My reading of the article is that because LangChain is abstracted poorly, frameworks should not be used, but that seems a bit far. my experience is that Python has a frustrating developer experience for production services. So I would prefer a framework with better abstractions and a solid production language (performance and safety), over no framework and Python (if those were options)

Disclamer: I work for Octomind.

I think the reading is more "It's hard to find a good abstraction in a field that has not settled yet on what a good abstraction is. In that case, you might want to avoid frameworks as things shift around too much."

Post reply on HN