Building an AI agent inside a 7-year-old Rails monolith
catalinionescu.dev
Building an AI agent inside a 7-year-old Rails monolith
1–10 of 59 posts
Re: Building an AI agent inside a 7-year-old Rails monolith
#2Re: Building an AI agent inside a 7-year-old Rails monolith
#3Re: Building an AI agent inside a 7-year-old Rails monolith
#4Re: Building an AI agent inside a 7-year-old Rails monolith
#5Re: Building an AI agent inside a 7-year-old Rails monolith
#6[flagged]
- Made a RAG in ~50 lines of ruby (practical and efficient)
- Perform authorization on chunks in 2 lines of code (!!)
- Offload retrieval to Algolia. Since a RAG is essentially LLM + retriever, the retriever typically ends up being most of the work. So using an existing search tool (rather than setting up a dedicated vector db) could save a lot of time/hassle when building a RAG.
Re: Building an AI agent inside a 7-year-old Rails monolith
#7Surely a fuzzy search by name or some other field is a much better UI for this.
Re: Building an AI agent inside a 7-year-old Rails monolith
#8[flagged]
Of course tool calling and MCP are not new. But the smart thing is that by defining the tools in the context of an authenticated request, one can easily enforce the security policy of the monolith.
In my case (we will maybe write a blog post one day), it's even neater as the agent is coded in Python so the php app talks with Python through local HTTP (we are thinking about building a central micro service) and the tool calls are encoded as JSON RPC, and yet it works.
Re: Building an AI agent inside a 7-year-old Rails monolith
#9Re: Building an AI agent inside a 7-year-old Rails monolith
#10[flagged]
I found it interesting because they: - Made a RAG in ~50 lines of ruby (practical and efficient) - Perform authorization on chunks in 2 lines of code (!!) - Offload retrieval to Algolia. Since a RAG is essentially LLM + retriever, the retriever typically ends up being most of the work. So using an existing search tool (rather than setting up a dedicated vector db) could save a lot of time/hassle when building a RAG.