Something that you’ll need to often is casting the collection back to a regular array. Like me, you might be tempted to use toArray() for this. But that might be the wrong method to call.
PHP
Chat with your documents: a practical guide to RAG using the Laravel AI SDK
A thorough walkthrough of building a RAG system in Laravel using the new AI SDK, Postgres for vector storage, and Livewire 4 for a streaming chat UI. Covers everything from what RAG is and how Read more…