3 ms·
Create AI Agents in Ruby: Implementing the ReAct Approach
- thedayisntgray 3y agoI've been frustrated by the fact that people still believe that python is some sort of magical default to build LLM apps. It's not. English is the new programming language. White paper for reference: https://arxiv.org/abs/2210.03629 https://arxiv.org/abs/2210.03629 Notice how the prompt used in Langchain (python) https://github.com/langchain-ai/langchain/blob/d21a494a2763900b8ad7cef5e27c739bfec356f3/libs/langchain/langchain/agents/mrkl/prompt.py#L5-L13 https://github.com/langchain-ai/langchain/blob/d21a494a27639... Is the same as it is in Langchain.rb (ruby) https://github.com/andreibondarev/langchainrb/blob/6fc2b962ce64f915fe3a060e8c7c9b750117bb1d/lib/langchain/agent/react_agent/react_agent_prompt.yaml#L3-L26 https://github.com/andreibondarev/langchainrb/blob/6fc2b962c...
- dragonwriter 3y ago> I've been frustrated by the fact that people still believe that python is some sort of magical default to build LLM apps. It's not. Maybe, but a wrapper around a remote API that contains all the AI part of the app isn’t what most people mean when talking about Python as having particular strength for AI apps, so this conpletely fails as a rebuttal, even if this is a full and complete Ruby replacement for langchain. > English is the new programming language. Then why is this written in Ruby?
- thedayisntgray 3y agoIt's written in english. The prompt that is. Langchain and Langchain.rb are both using this prompt to get the LLM to do what they want. You can build an app in anything and that is great news!
- dragonwriter 3y agoSure, its wonderful (though trivial) that you can easily wrap AI HTTP APIs in any language that you can easily wrap an HTTP API with, but that's not really related to the sense of API application in which Python is perceived as having a preferred status. Now, if it was as easy to implement something like stable-diffusion-web-ui in Ruby as Python...