Shamim Shams Shamim Shams

Tag

#Laravel AI

Laravel Job Queue for Async AI Processing at Scale
· 8 min read

Laravel Job Queue for Async AI Processing at Scale

The first time I shipped a feature that called an AI API synchronously from a web request, I wasn't thinking about load. I was thinking about whether the output was good enough. Three days later, a batch of users hit the feature simultaneously, and the dashboard went from responsive to a spinning wheel. Every user sat there waiting 8–12 seconds for a response the server was holding a thread for. The queue existed. I just hadn't used it.

Build a Smart FAQ System in Laravel Using Vector Search
· 8 min read

Build a Smart FAQ System in Laravel Using Vector Search

A user types "how do I get my money back" into your FAQ search box. Zero results. Your FAQ has a perfectly clear "Refund Policy" entry — the concepts are identical, the words aren't. That's a keyword search problem, and it's embarrassing in a way that's hard to explain to a product manager. The fix is semantic search: match by meaning instead of exact terms. Laravel's official AI package gives you an embeddings API and a `whereVectorSimilarTo` query builder method that handles this in about 40 lines of real code. This article shows you how to wire it together, from migration to search endpoint.

Build a Laravel AI Writing Assistant with Streaming Responses
· 8 min read

Build a Laravel AI Writing Assistant with Streaming Responses

You're demoing the writing tool you just built. You paste in a paragraph, click "Adjust Tone," and wait. The output field stays blank. Six seconds pass. Eight. The client glances at you. "Did it freeze?" Then 380 words appear at once, already formatted, already correct — but the damage is done. The wait felt like an error. Streaming fixes this. Instead of waiting for the model to finish before sending anything, you send tokens as they're generated. The user sees text appearing word by word within a fraction of a second of hitting submit. Same total latency, completely different feel.

Integrating OpenAI API into Your Laravel Application
· 8 min read

Integrating OpenAI API into Your Laravel Application

ou already know the situation. You need AI in your Laravel app, so you reach for `openai-php/client`, wire up the HTTP calls, write your own retry logic, figure out how to serialize conversation history, and by the time you've got something working you've built a custom integration layer that nobody else on the team knows how to touch. Laravel's official AI package takes a different approach. `laravel/ai` is first-party — built by the Laravel team, not a third-party wrapper — and it brings a full agent architecture to your application: class-based agents, database-backed conversation memory, structured output, tools, streaming, and queued execution. OpenAI is one supported provider. Anthropic, Gemini, Groq, Mistral, and a dozen others are in the same list.