Closed andreibondarev closed 6 months ago
Today I found building the app challenging if I only read the documents. I had to follow the example code and read the source code sometimes. I feel part of the reason is I'm new to the LLM world. Another one is that I learned Python's version of Langchain first. Many method names and params are different from Langchain.rb. So there could be learning curves for those Ruby developers who have already used the Python version and want to use Langchain.rb after finding it. That's my thought, don't know how other newcomers feel. Hope this feedback helps 😄
I wanted to second the point above; the abstractions seem different than Langchain as I don't see chains
and memory
implemented. From my best guess the LLM is doing double duty as the LLM and the chain?
I wanted to second the point above; the abstractions seem different than Langchain as I don't see
chains
andmemory
implemented. From my best guess the LLM is doing double duty as the LLM and the chain?
Yeah... we don't really have the abstractions fully fleshed out. I was hoping that better abstractions will eventually yield themselves and become more obvious.
Do you feel like it's detrimental to the project that we don't have the concepts of chains
?
When thinking of this project I was assuming it being 1 to 1 port of the Python version to the point where I could just read the Python documentation and intuit how the Ruby version could work. Depending on how the Ruby version drifts from the Python version, is it still Langchain?
On Thu, Jun 1, 2023, 11:10 PM Andrei Bondarev @.***> wrote:
I wanted to second the point above; the abstractions seem different than Langchain as I don't see chains and memory implemented. From my best guess the LLM is doing double duty as the LLM and the chain?
Yeah... we don't really have the abstractions fully fleshed out. I was hoping that better abstractions will eventually yield themselves and become more obvious.
Do you feel like it's detrimental to the project that we don't have the concepts of chains?
— Reply to this email directly, view it on GitHub https://github.com/andreibondarev/langchainrb/issues/57#issuecomment-1573075022, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6UK32AGZENA7AY3S4SOTXJFKT7ANCNFSM6AAAAAAYOF2D3M . You are receiving this because you commented.Message ID: @.***>
@rolentle There's no affiliation with the official version.
That feels weird then. Are the JS and Go versions affiliated? This gets into an awkward branding issue that if they are called the same thing I as a user would expect similar behavior and is being discussed in the Langchain discord. I remember Rails having a similar issue which is why DHH trademarked the term Rails. On Thu, Jun 1, 2023, 11:20 PM Andrei Bondarev @.***> wrote:
@rolentle https://github.com/rolentle There's no affiliation with the official version.
— Reply to this email directly, view it on GitHub https://github.com/andreibondarev/langchainrb/issues/57#issuecomment-1573081890, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ6UK54WXU2662NVF25FJ3XJFLXLANCNFSM6AAAAAAYOF2D3M . You are receiving this because you were mentioned.Message ID: @.***>
@rolentle AFAIK JS and Python are the official ones, and the Go version is a community one.
@andreibondarev just chiming in (hope it's helpful). I think if it's called Langchain.rb then people should expect parity (or at least similarity) to the py/js versions. If the abstractions are all going to be different, then it feels like a different library and maybe should have a different name?
I think LC nailed a few things, but also grew very fast and threw in a bunch of stuff that overlapped or got confusing. In my mind the main abstractions should be:
For indexing I'm more drawn to Llama's approach:
Re: Chains - I don't really find it that helpful, since I think of a Chain as just a subclass of an Agent (an agent that runs its tools in a predefined order as opposed to using the LLM to decide which to use next)
LC also has ToolKits, which are like preset Agents designed for a specific thing. I don't like the naming. They're just Agents that are prebuilt for you.
@bborn Thank you for your detailed insights here!
So I think we ought to look at Langchain, LlamaHub, Guidance, and whatever other libraries + latest research and build the Ruby-flavored library (or "framework" if it grows into it) for building LLM-powered applications. It will most likely end up being a different (from the original Langchain) library because the language, the community, the conventions, the patterns, the MINASWAN 😊, and the needs are going to be different.
I think we've all read or heard anecdotal feedback from Langchain users claiming that it's clunky or an overkill, etc. I think it's a worthy pursuit to try and improve upon the original Langchain. We don't have all of the patterns figured out yet but I'm hoping that, rooted in real use-cases and continuous feedback and collaboration, the patterns will eventually yield themselves and become much more apparent.
@bborn I really like your Models, Tools, Memory and Agents breakdown, and I agree, I'm not too big of a fan of the concept of Chains. We already have Loaders (Processors) and Chunkers (WIP) and indexing & querying functionality. However -- we can still slice and dice (vertically or horizontally) existing classes into additional ones as the code base grows.
But yes, we may also need to eventually rebrand away from "langchain". (Having to have said this I think Langchain is an incredible product and they've done an amazing job with it).
@andreibondarev have you looked at https://github.com/PrefectHQ/marvin?
Some very cool ideas there too.
We would like to collect any and all feedback people might have regarding Langchain.rb: GOOD and BAD! Have you already tried Langchain.rb in your project? Do you have specific requirements or use-cases that you don't think Langchain.rb could help you with? Please provide us with your feedback!
We'd like to ensure that this project is rooted in real needs and use-cases, and solves actual pain-points when developing LLM-driven applications.
Optional questions to think through and answer:
Thank you! ❤️