Large Language Models (LLMs) are powerful, but, in general, they're limited to the knowledge in their training data. What if your AI needs to search your database, create structured itineraries or call other services? This is where
Function Calling (also known as tool calling) comes in. It transforms your model into an intelligent agent that can interact with real-time data and services.
As we see in the last post, the ruby_llm gem not only makes it easier to work across multiple AI providers (OpenAI, Claude, and Gemini), but it also greatly simplifies the implementation of function calling. To see this implementation in action and explore the details, be sure to check out the repository containing the
code examples used in this article.