←back to thread

Building Effective "Agents"

(www.anthropic.com)
597 points jascha_eng | 1 comments | | HN request time: 0s | source
Show context
jascha_eng ◴[] No.42470556[source]
I put the agents in quotes because anthropic actually talks more about what they call "workflows". And imo this is where the real value of LLMs currently lies, workflow automation.

They also say that using LangChain and other frameworks is mostly unnecessary and does more harm than good. They instead argue to use some simple patterns, directly on the API level. Not dis-similar to the old-school Gang of Four software engineering patterns.

Really like this post as a guidance for how to actually build useful tools with LLMs. Keep it simple, stupid.

replies(5): >>42472766 #>>42475610 #>>42475996 #>>42478651 #>>42478930 #
rybosome ◴[] No.42475996[source]
I felt deeply vindicated by their assessment of these frameworks, in particular LangChain.

I've built and/or worked on a few different LLM-based workflows, and LangChain definitely makes things worse in my opinion.

What it boils down to is that we are still coming to understand the right patterns of development for how to develop agents and agentic workflows. LangChain made choices about how to abstract things that are not general or universal enough to be useful.

replies(1): >>42480156 #
wahnfrieden ◴[] No.42480156[source]
The article does not mention the LangChain framework. LangGraph is a different framework, have you tried it?
replies(1): >>42481099 #
rybosome ◴[] No.42481099[source]
Yes, our previous lead dev built a lot of our infra using LangGraph. I've been slowly ripping it out since assuming ownership of this part of the codebase.

I've been replacing LangGraph with simple primitives, relying on native Python constructs, etc. For example, instead of building this verbose graph of computation with LangGraph, you can just...call functions in the order you want them. Or declare them async, add them to a list, then await the resolution of all of them.

For a time I was maintaining a spreadsheet of all the refactor PRs, and I had a cumulative reduction of over 1,000 lines of code from these changes. Eventually I stopped keeping track.

^ That's a 1K LOC reduction with no functionality changes. I feel pretty strongly that LangChain/LangGraph are a net negative for our use case.

replies(1): >>42481371 #
temp_praneshp ◴[] No.42481371[source]
So all you achieved from a spreadsheet's worth of PRs was a 1k LoC reduction?
replies(1): >>42481636 #
herecomethefuzz ◴[] No.42481636[source]
If you do any software engineering all, you would know that a 1k LoC reduction to achieve the same functionality at the same/better performance is non-trivial.
replies(1): >>42482726 #
1. wahnfrieden ◴[] No.42482726{3}[source]
They’re questioning whether it was a valuable use of time, not whether a spreadsheet of PRs was time-consuming which is apparent