LangChain Announces 10M Seed Round
blog.langchain.dev
blog.langchain.dev
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.)
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.
[0]: https://ai.googleblog.com/2022/11/react-synergizing-reasonin...
So essentially you have an approach, designed to work on these models that are not really instruction following models and that truly are stochastic parrots.
The models had changed substantially since. But the approach of chaining them in this particular way stuck. And is getting copied everywhere, without much thought.
I don’t want to see further expansion of this. I’m not offering higher level design, because I’m not sure about safety of all of this.
But having a poor and potentially unstable design like LangChain also doesn’t contribute to it :-/
Similarly, I expect creative hackers to pursue new approaches in the space of LLM frameworks and for some of those to catch on, and that they don't need to uproot langchain to do so.
An analogy of a file format is a close one. Imagine someone invents something nasty and bulky, like a twisted form of XML or something. And, simply because it is early, it catches on. It could be buggy and unstable and ugly, but it still wins, because it is early.
The call here is to try to examine LangChain design a bit closer. And maybe consider that a start from scratch is a good idea.
various small, open sourced, and verticle LLMs vs one large GPT models would be quite interesting.
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.
But you're right that their moat will probably be razor then. A few senior devs can get together and probably hackathon a library that's just like Langchain but much more robust. Thanks for an idea on what I'm gonna do this weekend lol.
Did you do it? I'm doing something similar but in Rust, for my product. It'll be open source soon enough.
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.
I thought the whole Python 3 thing was a huge problem. Lately I've been doing JS/Typescript dev and breaking changes like this happen continually and no one blinks.
Wasn't that hard for quite a while to find situations where dependency A was Py3 compatible and B was not (and the incompatibility went both ways, especially in early 3.x releases, you could NOT have one codebase that worked with both).
Sometimes A dropped Py2 support before B gained Py3.
Pain pain pain.
Then add the increasing level of insanity as the answer to "python packaging sucks" was repeatedly to add yet another layer.
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.
(Additionally, newer LLMs like Perplexity.AI's correctly cite content sources, so that is even more similar to search engines)
It talks at length about this specific problem and migration techniques for it:
Existing foundation models are trained on copyrighted material. Deploying these models can pose both legal and ethical risks when data creators fail to receive appropriate attribution or compensation. In the United States and several other countries, copyrighted content may be used to build foundation models without incurring liability due to the fair use doctrine. However, there is a caveat: If the model produces output that is similar to copyrighted data, particularly in scenarios that affect the market of that data, fair use may no longer apply to the output of the model. In this work, we emphasize that fair use is not guaranteed, and additional work may be necessary to keep model development and deployment squarely in the realm of fair use. First, we survey the potential risks of developing and deploying foundation models based on copyrighted content. We review relevant U.S. case law, drawing parallels to existing and potential applications for generating text, source code, and visual art. Experiments confirm that popular foundation models can generate content considerably similar to copyrighted material. Second, we discuss technical mitigations that can help foundation models stay in line with fair use. We argue that more research is needed to align mitigation strategies with the current state of the law.
Further, new laws get made in reaction to new things whenever they push an existing doctrine beyond the original ruling, and these are certainly in that territory.
Of course. As I said originally "This is clearly not a given". It's very unclear how this will be decided, but anyone who thinks that just because models contain copyrighted data they don't have a leg to stand on is very wrong. There are multiple good arguments and precedents to show that they do, depending on the circumstances.
I think they contain massive amounts of copyrighted data, and reproduce them exactly, and that’s why they don’t have a leg to stand on. It’s a personal opinion, and I think backed by your citation. But thanks for the reference there, and glad to chat.
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.
“State Machine games” is incredibly hard to Google!
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