Let me tell you how this idea actually started. A few months back, our team was doing PR reviews and I kept writing the same comment over and over, something like "this will cause an N+1 issue, please use eager loading." Different developer, different PR, same problem. Third time in two weeks I typed that comment, I thought there has to be a smarter way to handle this first pass.
Most RAG tutorials start with "first, sign up for Pinecone." I'm going to skip that entirely. For the majority of Laravel applications, a dedicated vector database is overkill. You already have MySQL. You already have Laravel's queue system. That's enough to build a fully functional retrieval augmented generation pipeline that works well into the tens of thousands of documents.
One of the strongest functions in any web application is search, however, the conventional search is restricted. It will only get an exact match of the key words and this fails to get the exact results when the user enters the query in different wordings.
Artificial intelligence is changing the way we deal with user generated content. Sentiment analysis, or the automatic recognition of whether a comment or review or article is positive, negative, or neutral can be considered one of the most powerful applications.
In this tutorial, we are going to develop a basic Joomla content plug-in that is linked to the Open AI API. Each time an article or comment is saved the text will be processed by our plugin and the sentiment will be shown in Joomla where it belongs in the admin.
This can be considered an excellent representation of a merge between AI and the classic PHP CMS systems, such as Joomla.