LangChain has been so frequently discussed that I thought it must be this amazing piece of software. I was recently reading about vector databases and how they can be used to provide context to LLMs. I came across a LangChain class called RetrievalQA, which takes in a vector database and a question and produces and answer based on documents stored in the vector db. My curiosity was piqued! How did it work? Well... it…
Re-implementing LangChain in 100 lines of code
21–30 of 85 posts
Re: Re-implementing LangChain in 100 lines of code
#22Earlier quoted context omitted.
Won’t ChatGPT eventually eat your lunch? Once ChatGPT allows uploading documents (embeddings), what good will your app be? The tools you’re talking about like math, wiki, or search are already built as plugins on ChatGPT. I see so many AI apps being built, but I think ChatGPT will be general enough to cover 85-90% of use-cases using the chat UI.
It's more or less an advanced personal project to stay on top of the LLM learning curve, rather than just being exposed to news and press releases. I also have an appetite for further wrapping my mind around all of this. I already work in the AI space as web-developer on the B2B & enterprise side of things. My opinion here is that there are going to be loads of use-cases and necessary plugins, which for privacy, lega…
But most of the AI apps I see are just like a “skin” on ChatGPT API.
I do think there is value in a universal chat UI that can connect to GPT-3 and other models.
Re: Re-implementing LangChain in 100 lines of code
#23Earlier quoted context omitted.
It's more or less an advanced personal project to stay on top of the LLM learning curve, rather than just being exposed to news and press releases. I also have an appetite for further wrapping my mind around all of this. I already work in the AI space as web-developer on the B2B & enterprise side of things. My opinion here is that there are going to be loads of use-cases and necessary plugins, which for privacy, lega…
I completely agree with you on AI being extensively integrated into existing apps and being leveraged that way. But most of the AI apps I see are just like a “skin” on ChatGPT API. I do think there is value in a universal chat UI that can connect to GPT-3 and other models.
Re: Re-implementing LangChain in 100 lines of code
#24I work with Langchain on a daily basis now, and so often I find myself asking; do I really need a whole LLM framework for this? At this point, the assistant I am writing, will likely be more stable rewritten in pure Python. The deeper and more complex the application becomes, the more of a risk Langchain seems to become to keeping it maintainable. But even at less complex levels, if I want to do this: 1. Have a huge…
There is plenty room for code reuse in prompting.
Re: Re-implementing LangChain in 100 lines of code
#25Earlier quoted context omitted.
It got a lot of traction on non-coders thinking it’s doing some magic, but if you read the source it boils down to some brittle prompts and lots of Python class boilerplate. There’s some useful parts though
Just out of curiosity, what are the useful parts?
Re: Re-implementing LangChain in 100 lines of code
#26I've been working with langchain and llamaindex and did notice that it's a pretty hefty abstraction on top of pretty simple concepts and I also eventually ended up dropping both and simply write the underlying code without the framework on top.
Re: Re-implementing LangChain in 100 lines of code
#27Given that the company has $200 million valuation, that is $2 million per line of code! just kidding. Still, I would like to understand $200 million valuation of langchain.ai.
It's a great momentum to dominate eco system. Heard about Docker (that was more than http fetch wrapper) ?
Re: Re-implementing LangChain in 100 lines of code
#28Not affiliated, just a happy defector from LangChain.
Re: Re-implementing LangChain in 100 lines of code
#29LangChain has been so frequently discussed that I thought it must be this amazing piece of software. I was recently reading about vector databases and how they can be used to provide context to LLMs. I came across a LangChain class called RetrievalQA, which takes in a vector database and a question and produces and answer based on documents stored in the vector db. My curiosity was piqued! How did it work? Well... it…
Re: Re-implementing LangChain in 100 lines of code
#30And as soon as you want to slightly modify something to better accomodate your use-case, you are trapped in layers & layers of Python boiler plate code and unnecessary abstractions.
Maybe our llm applications haven’t been complex enough to warrent the use of langchain, but if that’s the case, then I wonder how many of such complex applications actually exist today.
-> Anyways, I came away feeling quite let down by the hype.
For my own personal workflow, a more “hackable” architecture would be much more valuable. Totally fine if that means it’s less “general”. As a comparison, I remember the early days of HugginfaceTransformers where they did not try to create a 100% high-level general abstraction on top of every conceivable Neural Network architecture. Instead, each model architecture was somewhat separate from one another, making it much easier to “hack” it.