RAG Pipelines Shouldn't Require a Python Sidecar
If you work in Python, you have LangChain, LlamaIndex, Haystack, and a dozen other frameworks for building RAG pipelines. If you work in Laravel, you were on your own. The options were a Python microservice alongside your app, raw pgvector queries by hand, or a hosted solution that sends your proprietary data to yet another third-party service.
None of these felt right for the Laravel ecosystem. Laravel developers are used to a certain level of craft: migrations that read like English, Eloquent models that abstract complexity without hiding it, and facades that let you do powerful things in a single expressive call. We needed a RAG pipeline that respected all of that.
The Solution
This package provides a complete RAG pipeline that lives inside your Laravel application: embed documents as vectors, retrieve the most relevant chunks using semantic or hybrid search, and generate grounded answers with any LLM. Everything speaks Eloquent, uses Laravel's queue system, and feels native to the framework.
The fluent API makes it as simple as Rag::from(Document::class)->ask('...'). Under the hood, the package handles chunking (character, sentence, markdown, or semantic strategies), embedding via Prism PHP with automatic caching, vector storage with pgvector or SQLite vec, hybrid search with Reciprocal Rank Fusion, LLM reranking, and agentic retrieval loops for complex questions.