235 points · by lysecret · 3y ago · 167 comments
When I build stuff with GPT-3, especially in the earlier days, I get the strong impression that it's like we are doing machine learning without Numpy and Pandas.
with LangChain, many of the systems I have built can be done in just one or two lines, making life much easier for rest of us. I also believe that LangChain's Agent framework is underappreciated as it was pretty ahead of its time until the official ChatGPT plugins were released. (contributed to LangChain a bit too.)
Unfortunately, the documentation is lacking indeed. While I understand the need to move quickly, it is not good that some crucial concepts like Customized LLM have inadequate documentation. (Perhaps having some LLM builds on top of the repo would be more effective than documentation at this point.)
There also seems to be really poor observability in the code and performance seems to be an afterthought. I tell friends who ask about LangChain that it's great to experiment with but not something I'd put into production. Hopefully this funding helps them shore things up.
> For example, it's still a pain to distinguish between using a Chat oriented LLM vs a regular completion one.
Totally agree. After using it for a few weeks, this is one of the most visible weaknesses in the design.
Absolutely. The Langchain interface is quite easy to build atop any old LLM, and if you're just using OpenAI then OpenAI already distirbutes clients in a bunch of languages that you can just use. Even then, you're calling a few HTTP endpoints and stuffing some data in a payload. It's really basic stuff. I'd prototype in Langchain, grab the prompts and agents I ended up using, and reimplement them in $MY_PL on $MY_PLATFORM. That's what I find so fun about these LLMs, they're just trivial to use for anyone that can ship text off to an endpoint (whether networked or local) and receive a text response.
To make them more accessible I rewrote them in ~200 lines of code, so you can easily understand how it works.
They have access to a python console, Google search and hacker news search:
Excited to see what happens going forward.
No, the design from an old academic paper was used with a much newer model. And now everyone is just copying that.
It works, because new models are impressive. But the design is far from being elegant or particularly efficient. And now, because tons of data like that is going to be generated, we’ll be stuck with it.
various small, open sourced, and verticle LLMs vs one large GPT models would be quite interesting.
Look at the startup OpenAI generations 1-2 years back - they have largely sank at comparable or worse rates than any other startup from 2020/2021.
The GPT-3 first wave companies, around translations, basic quizzes, summarization tools, language learning apps, and ofcourse the notorious paraphrase tools (almost entirely obsolete since ChatGPT) can't be found in that form anymore, they've all been forced to shut down or move functionality significantly. Early on, OpenAI limited output to 300 tokens max - and less for most usecases, often 50-150. Chatbots were not allowed IIRC for over a year. If ChatGPT hadn't came along, much of what langchain enables wouldn't have either, nor so many big companies willing to now risk.
I can count none over 2 years old which have not since been made obsolete by raw ChatGPT access or are now default dead due to competition from existing unicorn (e.g. Duolingo, Quizlet Q chat) who are now crushing them.
It must be painful to have spent $xx,xxx on GPT-3 at $0.06 a token to obtain users, and now have your market ripped from you by a $B+ company paying $0.006...
So I doubt the template UI startups will sustain retention or stay about long term, unless they really find traditional startup ways to nuggle into niches and use cases/vendor lock in. This isn't an innovators dilemma for most companies, it's just an obvious sensible thing to try at this point, so startups don't have much to balance with on risk. That being the case, the market surely should seem less appealing than the open ended "blue ocean new value" of 2021 GPT tech, but - I guess not.
But this is by 'design', I have very unreasonable suspicions that indeed, the whole VC 'world of entrepreneurs' is just the way the USA government does R & D on an industrial-corporate scale. The 'brilliance' behind this way of doing R&D is that they only pick up the winners after they won, so they don't "waste" money on R&D death ends nor moonshots.
on the other hand, this is a good way to 'explode' for cheap the technological applications of already developed scientific innovations. meaning none of those VC-backed startups are doing innovative research, but in fact are devleoping commercial applications for corporate overlords who having seen who won, step in to buy them out.
even music industry is shifting to that model, they are now only signing bands/artists/influencers who already build their audience.
At least that's what's going on in Hungary, the most corrupt government in EU, I hope other parts are a bit better.
You can use custom field types either by using a `validator` with `pre=True` or a define a class with a `__get_validators__` classmethod.
But pydantic does have problems, imho it isn't strict enough & has given me the wrong types when using `Union`s a bunch of times. Defining custom encoding & decoding behavior is harder than it needs to be. The purely narrative documentation is easy to learn but difficult to reference.
I would agree that strict typing is unpythonic but in this case I think this is an outdated opinion of Python, one that it's been backpedaling on with type annotations &c. I think Python made perfectly reasonable decisions about this some 30 years ago, and they haven't aged well, which isn't even really a criticism as much as a consequence of it's enormous success. Python had outlived a lot of the ideas & attitudes about language design that went into making it, and carries them as scar tissue.
The funding will help the team make it into a polished product.
In particular, I expect LangChain will start offering prebuilt hosted services that developers can use as components for building third-party apps.
Congrats to the LangChain team!
If OpenAI goes under, or a great open-source model comes onto the scene, Langchain can still do its thing.
Disclaimer: We - Milvus (https://milvus.io) and Zilliz (https://zilliz.com) - and we have integrations as a vector store in Langchain.
Eg
- the Agent tool to retrieve webpage content just immediately fills up the context window. You can say “only use it for small pages”, but the agent picks the page!
- “as an AI language model I can’t use any fancy tools”
- I couldn’t mix and match ConversationalAgent with keeping intermediate steps and memory - gave me an error about only allowing certain chain output keys. This one could’ve been fixed by now, but to me it points to how the library’s features don’t necessarily work together just because they’re in the library together
I do find the library to be useful as a survey of prompting techniques though.
For my own chatbot that can use tools, I found I had to lean in to how ChatGPT _wants_ to respond, by getting it to reply in “code mode” (intro text, bullet list of steps, followed by code blocks and outtro). From there the trick is to get it to just write a single line of python (or another lang) where it just calls a function. Then the non-code reply is it’s “scratch pad”, followed by a code block of action invocation. So the only parsing I’m doing is just pulling out the code block and (don’t boo me, it’s just for fun) eval-ing it. But the response format is pretty consistent so I could make a little mini-parser for python func calls.
Before that, I tried and failed to do what langchain does- prompt engineer in the System Prompt in order to get chatgpt to respond in the correct format (thought, action, observation, answer)
You would think the "prompt-plugin-engineer" API would be as easy to use, if not easier.
After reading about countless other awesome open source projects get tainted by VC cash, what makes it so different this time?
It’s trivial. The upside from langchain is so minimal that I wonder what experience with software development the people who love this thing really have.
Plenty of FOSS who tried to make it in a for-profit, VC funded world eventually disappears when VCs can't extract any money back and they never become profitable, and then the creators/maintainers lose interest as there is no longer any money to be made.
Lastly, I generally don't work for for-profit companies for free. If they are non-profit, then it'd be fine. But you make money from my work? Hm, call me a socialist, but at least I should get a part of the profits then.
I agree with you by the way, but for MIT or Apache licenses, I think even if the company goes full commercial or terminates at some point, they gave us enough in the first place to warrant some trust and help. For the ‘we are open but clearly using that fact for marketing’ licenses, I indeed refuse to use that software and definitely cannot contribute to it (but no one will anyway that doesn’t work there) as you cannot make a meaningful fork anyway in case it goes bad.
Pinecone has some comparable langchain 'recipe' notebooks in their pinecone-io\examples Github repo
Not sure what’s worse. That people do it, or that it works.
We went back-and-forth in diff APIs here before coming back to langchain. The march release with async streaming, and growing plugin work, are examples of why.
Balancing VC funding with OSS will be hard. I like having a neutral player here, separate from the model and DB co's, so huge value. But until they prove a scalable revenue model, huge risk of them fighting their community, and the biggest coders are smart enough nowadays to recognize and jump ship: who wants to give free work to someone else + risk donating their entire income stream to them?
So I'd love to see a lot more clarity on business model and clear lines in the sand for this not being a big rug pull at the cost of its users & developers. The next 2-3 weeks are pretty critical here for community comms, especially given the competition.
Again, good luck to the team!
It feels at some point being too slapped together isn’t correlated with success
Wishing the LangChain team well! But there are already alternatives cropping up that are far more polished (Microsoft’s Semantic Kernel being one)
What it does offer is standardization of composing LLM prompts - something that a team within a company can spend a week max to write an SOP doc/implementation for.
The effort to develop LLM stuff is surprisingly low, put a framework upon it seems overkill
https://www.theinformation.com/articles/benchmark-expected-t...
Good for quick demos on Twitter though.
- Is there a way to view the final log?
- Why there isn't a simple way how abstractions will look in the final output?
- Can we change the output of those abstractions (tools, agents..etc)?
Unfortunately, I see no plans about documentation whatsoever.
I first heard about Langchain at the Scale hackathon when I think it was Colin who was like “half the people are using Langchain” and I was like whatchain?
Amazing trajectory!
The moment they raised VC funding the open source project is dead. All their incentives are now to 100x the investment they just raised. They would start putting core features behind an enterprise license.
Contributors of langchain please fork the project and make a better project! Stop sending free contributions to make the investors rich.
Crisp or too critical?
1. Documentation: lacking, inadequate, outdated
2. Code quality: simple, awkward, suboptimal
3. Production readiness: experimental, unreliable, limited
4. Monetization: unclear, risky, potentially detrimental to open-source
5. Community support: misinformation, poor communication, fragmented
6. Ecosystem: competing alternatives, redundancy, unclear positioning
7. Business model: potential rug-pull, VC-funded, uncertain sustainability
8. Developer experience: poor ergonomics, type erasure, confusing
9. Performance: slow, afterthought, poor observability
10. Maintenance: unpatched bugs, slow response to issues, dependency on contributors