Hacker News new | ask | show | jobs
by etse 725 days ago
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)

3 comments

For most of what people are doing with AI you don't need Python because you don't need the ML ecosystem. You're either going to be talking to some provider's API (in which case there are wrappers aplenty and even if there weren't their APIs are simple and trivial to wrap yourself) or you're going to self-host a model somewhere, in which case you can use something like ollama to give yourself an easy API to code against.

All of the logic of stringing prompts and outputs together can easily happen in basically any programming language with maybe a tiny bespoke framework customized to your needs.

Calling these things "AI agents" makes them sound both cooler and more complicated than they actually are or need to be. It's all just taking the output from one black box and sticking it into the input of another, the same kind of work frontline programmers have been doing for decades.

They become agents when the LLM output is function calls.
So the output of Black Box A is an instruction to give Black Box B a piece of data X and then give the resulting output back to BBA. We're still just wiring up black boxes to each other the same as we've always done, and we still don't need an abstraction for that.
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."

prompt engineering requires the ability to see what is happening at various steps and langchain makes that harder if not impossible.

honestly I don't need that much abstraction.

I think this is another crucial part. Right now, writing prompts is kinda like writing hand-crafted assembly back in the day where that was routine because there was simply no other way to get good results out of hardware in many cases - but also because the tasks that are actually doable do not require much code, so it's perfectly feasible to write it in assembly by hand.

LangChain is kinda like taking that state of hardware and bolting on a modern C++ compiler with templates and STL on it.