Laravel Rag banner
moneo moneo

Laravel Rag

Data community

Description

A complete, driver based RAG pipeline for Laravel with pgvector & sqlite-vec, streaming, agentic retrieval, hybrid search, evals, MCP server, Filament admin.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Laravel RAG

[![CI](https://github.com/moneo/laravel-rag/actions/workflows/ci.yml/badge.svg)](https://github.com/moneo/laravel-rag/actions/workflows/ci.yml) [![codecov](https://codecov.io/gh/moneo/laravel-rag/branch/main/graph/badge.svg)](https://codecov.io/gh/moneo/laravel-rag) [![PHPStan Level 9](https://img.shields.io/badge/PHPStan-level%209-brightgreen.svg)](https://phpstan.org/) [![Infection MSI](https://img.shields.io/badge/Infection%20MSI-%E2%89%A585%25-brightgreen.svg)](https://infection.github.io/) [![PHP 8.2+](https://img.shields.io/badge/PHP-8.2%2B-blue.svg)](https://www.php.net/) [![Laravel 11+](https://img.shields.io/badge/Laravel-11%2B-red.svg)](https://laravel.com/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

A complete, driver-based RAG (Retrieval-Augmented Generation) pipeline for Laravel. Built on [Prism PHP](https://github.com/prism-php/prism) for provider-agnostic LLM and embedding support.

Features

  • Driver-based vector stores — pgvector (production) and sqlite-vec (local dev), swappable via .env
  • Blueprint macros$table->vector(), $table->vectorIndex() feel native to Laravel
  • Model traitsHasVectorSearch and AutoEmbeds for zero-boilerplate integration
  • Embedding cache — SHA-256 deduplication reduces API costs by 60-80%
  • Chunking strategies — Character, Sentence, Markdown, and Semantic chunkers
  • Fluent RAG pipelineRag::from(Document::class)->ask('question')
  • Streaming SSE — Real-time response streaming via Server-Sent Events
  • Agentic RAG — Iterative retrieval with sufficiency evaluation
  • Hybrid search — Reciprocal Rank Fusion (RRF) combining semantic + full-text
  • LLM re-ranking — Score and re-order chunks by relevance
  • Conversation memory — Threaded conversations with automatic context summarization
  • RAG Evals — First Laravel-native evaluation framework (Faithfulness, Relevancy, Context Recall)
  • MCP Server — Expose your