Live data from Hacker News

Langchain Is Pointless

old.reddit.com

121–130 of 192 posts

Re: Langchain Is Pointless

#121
post #98

Using an LLM framework at this moment doesn’t make sense and can be damaging, in my humble opinion. Ways to extract value from LLMs are in early exploration stage. Look at research in prompting: chain of thought, react, reflection, tree of thoughts, zero vs few hot etc. Then completion vs conversational interfacing. Then memory management via vector databases and prompt expansion vs compression vs progressive summari…

[flagged]

It's kind of strange to lump both of those (far simpler) "frameworks" (more like template standards) with LangChain. Indeed, they do seem to provide far more value than LangChain does.

Also:

> Gosh you are so fking wrong it's sad.

Isn't very civilized or proportional response.

Re: Langchain Is Pointless

#122
post #32

Since last year, before I heard about langchain, I've been building my own stack of tooling for my own LLM projects that probably now covers about 10-20% of Langchain's functionality. I heard about Langchain earlier this year and groaned, thinking that I did a lot of work for nothing.. ..Then I actually used langchain. I was shocked at how poorly performant the code is. Some operations took 10x longer than how I did…

Yeah I've got a few thousand lines of langchain code now for a data cleaning pipeline... I've been fighting it every step of the way. Trying to replace sections of the pipeline to use a local LLM instead of OpenAI has had me have to replace the templates entirely, the chat based templates won't allow me to assign the proper user/assistant names, so the performance for the local LLM is terrible (stupid). They have zero actual composibility when you look at it slightly differently than they expect.

It's a useless abstraction for every single purpose I've actually tried it for.

Will be extricating it from my code base as soon as I find something else that works any better.

Re: Langchain Is Pointless

#123
post #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 o…

> where there is some private excitement that we've built an AGI

This is a great litmus test for if you need to get a reality check.

Re: Langchain Is Pointless

#124

Langchain was useful to me personally for two reasons: using their prompt templates as a starting point for my own, and seeing how their “tools” were built to learn about good Python libraries to build my own tools with. Viewed through this lens, LangChain was more a “sample codebase” than a library for me, and it was reasonably good for that.

When you actually get down to it, they're pointless and counterproductive. Templates are pretty useless and have inconsistently implemented features which make them non-compatible with different LLM backends without changing all your code. Honestly, cannot recommend avoiding the library all together high enough.

Re: Langchain Is Pointless

#125
post #99

Earlier quoted context omitted.

How do you deal with the prompt iteration phase and how coupled is that to the DAG phase? I've only worked on a few proofs of concept in this phase, but a thing I struggled with was a strong desire to allow non technical colleagues to mess with the prompts. It wasn't clear to me how much the prompts need to evolve in tandem with the the DAG and how much they can exist separately

There are a few increasingly harder things when it comes to prompt customization: 1. Prompts ask LLM to generate input for the next step 2. Prompts ask LLM to generate instructions for the next step 3. Prompts ask LLM to generate the next step Doing #3 across multiple steps is the promise of Langchain, AutoGPT et al. Pretty much impossible to do with useful quality. Attempting to do #3 very often either ends up compl…

What if you built a scoring system for re-usable action sequences that are stored in a database, and then have the LLM generate alternate solutions and grade them according to their performance?

An action sequence of steps could be graded according to whether it was successful, it’s speed, efficiency, cleverness, cost, etc.

You could even introduce human feedback into the process, and pay people for proposing successful and efficient action sequences.

All action sequences would be indexed and the AI agent would be able to query the database to find effective action sequences to chain together.

The more money you throw at generating, iterating, and evolving various action sequences stored in your database, the smarter and more effective your AI agent becomes.

Re: Langchain Is Pointless

#126
Langchain is an obvious VC / investor hustle by a handful of smart developers who are betting on the low sophistication of entrants to ML and Data science.

It doesn’t do much but it wraps some obvious functionality with method names and paper thing abstractions that speaks the language of people who don’t know Python beyond Jupiter Notebooks.

All power to them, they saw a gap and pounced.

Re: Langchain Is Pointless

#129
I agree that LangChain is pointless for experienced ML developers building products. For the rest, I disagree as just getting to the point where same observation can be made is worthwhile.

Re: Langchain Is Pointless

#130

Earlier quoted context omitted.

You'll still need to re-tune your prompt and the hyperparameters when switching models. So the actual effort of switching models is not improved much if at all.

This. I'll still use langchain for token/cost counting and some nice abstractions on top of the LLM, and the document loader system is semi-useful, but all of the retriever/chain stuff abstracts away the most important part - the prompt.

I've tried to switch out prompts between LLM's and I've had to change every bit of code provided by laying chain with a different implementation between them. It is an entirely useless abstraction. The prompt template is not at all transferrable.
Post reply on HN