Live data from Hacker News

Langchain Is Pointless

old.reddit.com

81–90 of 192 posts

Re: Langchain Is Pointless

#81
LangChain is a perfect example of unnecessary abstraction. You could build a much simpler and more composable library for working with LLMs simply using functions and function composition. This isn't rocket science.

Re: Langchain Is Pointless

#82

Proper term is that it's a "false abstraction"... It abstracts some work only to introduce introduce it's own API (which is ultimately more complicated, less documented, introduces limits and constraints, and comes with its own bugs and dev politics)... But nobody asked me, keep using it

To coin a portmanteau: that's the Fauxcade pattern ;)

(though it does exist already) https://www.urbandictionary.com/define.php?term=fauxcade

Re: Langchain Is Pointless

#83
post #70

I believe the abstractions in Langchain are inherently flawed. The core problem resides in the composability of chains. While it offers a handy way to create prototypes, it becomes restricting when you desire to modify a specific element within the chain. The hierarchical design of chains in Langchain conceals the component you wish to alter and obscures the parts developers might want to adjust, making the process o…

Take a look at https://promptfile.org/ for an alternative approach to the prototyping -> app flow.

Re: Langchain Is Pointless

#84

I have looked for the value and never really found it. It seems to mostly be (bad) abstractions around things you could easily do without langchain. Take one of the most important llm things: prompt templates. What does langchain add over a simple function and an f string? Maybe I'm missing the point, but I can't find anything. Anyway, it seems people like it so who am I to judge, but I don't like making our codebase…

I found it helpful for prototyping and learning some basics, but I quickly found the abstractions were not useful and had to implement my own.

Re: Langchain Is Pointless

#85
The reason why Langchain is pointless is that it's trying to solve problems on top of technical foundations that just cannot support it.

The #1 learning is that there is no reusability with the current generation of LLMs. We're using GPT-4 and 3.5T exclusively.

Over the last several months, my team has been building several features using highly sophisticated LLM chains that do all manner of reasoning. The ultimate outputs are very human-like to the point where there is some private excitement that we've built an AGI.

Each feature requires very custom handwritten prompts. Each step in the chain requires handwritten prompts. The input data has to be formatted a very specific way to generate good outputs for that feature/chain step. The part around setting up a DAG orchestration to run these chains is like 5% of the work. 95% is really just in the prompt tuning and data serialization formats.

None of this stuff is reusable. Langchain is attempting to set up abstractions to reuse everything. But what we end up with a mediocre DAG framework where all the instructions/data passing through is just garbage. The longer the chain, the more garbage you find at the output.

We briefly made our own internal Langchain. We tore it down now. Again not that our library or Langchain was bad engineering. It's just not feasible on top of the foundation models we have right now.

Re: Langchain Is Pointless

#87
post #80
post #77

I've been using the JS version of langchain for a few months now, and despite there being a lot of valid criticism, (especially around the abstractions it provides) I'm still glad to be using it. We get the benefits of a well used library, which means making certain changes is easy. For example, swapping our vector database was a one line change, as was swapping our cache provider. When OpenAI released GPT-4, we were…

> When OpenAI released GPT-4, we were able to change one parameter, and everything still just worked. Wouldn't that be the same if you used the OAI js library directly? Basically swapping the model parameter?

It's not. The API is different, since GPT-4 is a chat based model, and davinci isn't. It's not a huge difference, but these little sort of things add up.

Re: Langchain Is Pointless

#88

I don't trust them, because they never talk about their "tradeoffs". Every software has its tradeoff.

I've rarely ever seen software talk about its tradeoffs. They want you to use the software. K8s and react are wildly popular, huge tradeoffs, but mention none of them.

DuckDB does on their page. https://duckdb.org/

Re: Langchain Is Pointless

#89
I think that Generative AI applications is a config management problem. Think Prompts X Chains X LLMs. Your prompts wont work across everything and everything will break on model change. Coding this into ur classes is what everyone does.

I think the better answer is to declaratively pull out the prompts X chains as jsonnet code. Call it trauma & learnings from the K8s/Borg world. We have formats that have evolved as a result of millions of lines of code wrangling clusters/terraform/etc - so we decided to build a SDK over it.

that is what we did here - https://github.com/arakoodev/EdgeChains/releases/tag/0.2.0

EdgeChains is basically Generative AI prompt engineering modeled as config management.

Re: Langchain Is Pointless

#90
post #39

Remember, this is the project that raised ~$30m from Benchmark and Sequoia. There was a controversial "quality doesn't matter for software products" post and discussion[0] here on HN a few days ago and this is a beautiful example. Product may matter eventually, but you can sure surf the hype for a long time before the reckoning comes (and if you're lucky, you may even be able to get someone else to hold the bag then)…

We’ve seen the top dog fall from grace in the VC world before (KPCB missing social and mobile after a truly epic run in the 90s)

Is that what we are starting to see for Sequoia?

Like KP, I doubt they’ll fold, but it would be interesting to live in a world where sequoia is just top half instead of top 1.

Post reply on HN