Skip to content
Programing

Laravel 13's Game-Changer: The Production-Ready AI SDK and Eloquent Vector Search

Published: Duration: 2:38
0:00 0:00

Transcript

Host: Alex Chan Hey everyone, welcome back to Allur, your home for all things PHP, Laravel, Go, and the ever-evolving world of mobile development. I’m your host, Alex Chan. Host: Alex Chan I am so excited to welcome Marco Silva to the show. Marco is a Lead Developer at Nexus Labs and a long-time contributor to the Laravel ecosystem. He’s been one of the early adopters building real-world applications using the new AI features before they even hit this stable release. Marco, thanks so much for joining me on Allur! Guest: Marco Silva Thanks for having me, Alex! It’s great to be here. I’ve been listening to Allur for a while, so it’s a bit of a "pinch-me" moment to actually be on the other side of the mic. Host: Alex Chan Oh, stop it, you’re too kind! [Laughs] But seriously, let’s jump right in. Laravel 13 is out, and the "beta" tag is finally gone from the AI SDK. From a developer's perspective—someone who has to answer to stakeholders—how big of a deal is that "production-ready" label? Guest: Marco Silva Oh, it’s massive. I mean, we all love playing with the "shiny new thing," but when you’re building an enterprise app or something that people’s livelihoods depend on, "beta" is a scary word. Before Laravel 13, if you wanted to integrate an LLM, you were either writing your own wrappers for the OpenAI API or using a community package that might—or might not—be maintained in six months. Now, it’s officially part of the framework's core DNA. It gives businesses the confidence to say, "Okay, we can actually build our core search or our recommendation engine on this." It’s stable, it’s supported, and it’s… well, it’s Laravel. Host: Alex Chan Exactly. And one thing that really caught my eye in the documentation was this "provider-agnostic" approach. Can you explain why that matters? I mean, if I’m already using OpenAI, why should I care if it’s agnostic? Guest: Marco Silva It’s funny you ask, because I actually had a "moment" with this last month. We had a project where we were heavily invested in one specific provider. Then, for various reasons—cost, rate limits, you name it—we needed to test out Google’s Gemini. In the old days, that would have meant a complete rewrite of our service classes. But with the Laravel AI SDK, it’s literally just a line in your `config/ai.php` file. Host: Alex Chan That’s such a "Laravel" way of solving the problem. It’s elegant. But let’s get to the part that I think is the real "show-stopper"—the Eloquent Vector Search. I’ll be honest, when I first heard "vector search," my brain kind of glazed over a bit. It sounds very... math-heavy. For someone who isn’t a data scientist, what is it actually doing inside our database? Guest: Marco Silva Host: Alex Chan That is… honestly, it's wild. So, wait—I saw this in the docs: `Article::vectorSearch($queryVector)->get()`. It looks just like a regular Eloquent query. Was it actually that simple to implement when you were testing it? Guest: Marco Silva It’s surprisingly simple, but I will say, the "struggle" isn't the query itself—it's the architecture shift. You have to realize that you need to generate and store those vectors whenever a model is created or updated. Host: Alex Chan "Cosine similarity"—see, there's that math again! [Laughs]. But I love that. It’s lowering the barrier to entry. I’m thinking about the practical use cases. You mentioned a blog, but what about e-commerce? Guest: Marco Silva Oh, e-commerce is where this is going to be a game-changer. Imagine a user types in "summer outfit." Usually, you’d have to manually tag a bunch of products with the word "summer." But with semantic search, the AI understands that "shorts," "linen shirts," and "flip-flops" are all related to "summer." You get these incredibly smart results without a human having to sit there and tag ten thousand items. Host: Alex Chan That’s a massive time-saver for content teams. But Marco, what about the performance? Is querying these "lists of numbers" slow? Did you run into any bottlenecks when you were building your projects? Guest: Marco Silva That’s a great question. In the beginning, I was worried. If you have millions of rows, you definitely need to think about indexing—using things like HNSW indexes. But for most of the apps we build—tens of thousands or even hundreds of thousands of rows—it’s incredibly fast. Host: Alex Chan Interesting! So, it’s not just "plug and play" and forget about it; you still have to be a good developer and think about the lifecycle of that request. Guest: Marco Silva Exactly. It’s still software engineering! [Laughs] But Laravel 13 makes the "hard parts" of that engineering—the integration, the abstraction, the storage—so much more accessible. It feels like AI is finally becoming a first-class citizen in the PHP world. Host: Alex Chan I love that. "A first-class citizen." It feels like we’re moving away from AI being a gimmick to it being a core tool, like queues or mailers. Before we wrap up, what’s one piece of advice you’d give to a developer who’s about to run `composer update` and dive into Laravel 13’s AI features today? Guest: Marco Silva I’d say: start small. Don’t try to build a full-blown autonomous agent on day one. Just take one part of your app—maybe your FAQ search or your "related posts" section—and try replacing the old keyword-based logic with a simple vector search. Seeing those "conceptually related" results pop up for the first time… it’s a real "lightbulb" moment. You’ll never want to go back to `WHERE title LIKE %keyword%` again. Host: Alex Chan Guest: Marco Silva It was my pleasure, Alex. Thanks for having me! Host: Alex Chan Well, there you have it, folks. Laravel 13 is officially here, and it’s clear that the framework is leaning hard into the AI future. Whether it’s the provider-agnostic SDK or the power of semantic search in Eloquent, the barrier to building "smart" apps has never been lower.

Tags

llms vector search open-source backend php laravel artificial intelligence