ML

moneo/laravel-rag

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

40 stars 3 forks 质量 56 趋势 4MIT

moneo/laravel-rag 是一个从 https://github.com/moneo/laravel-rag. 导入的 MCP 服务器候选服务器。

概览

moneo/laravel-rag 是一个从 https://github.com/moneo/laravel-rag. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

一个完整的基于驱动程序的RAG(检索增强生成)流水线,适用于Laravel。基于Prism PHP构建,支持与提供者无关的LLM和嵌入支持。

特色

  • 基于驱动程序的向量存储 — pgvector(生产)和 sqlite-vec(本地开发),可通过 .env 进行交换。
  • 蓝图宏 — $table->vector()、$table->vectorIndex()]感觉像是Laravel原生的
  • 模型特征 — HasVectorSearch 和 AutoEmbeds 用于零样板积分
  • 嵌入缓存 — SHA-256 去重可降低 60-80% 的 API 成本
  • 分块策略 — 字符、句子、标记和语义块
  • 流流RAG流水线 — Rag::from(Document::class)->ask('question')
  • 流式SSE — 通过服务器发送事件实现的实时响应流
  • 能动RAG——带充分性评估的迭代检索
  • 混合搜索 — 互易秩融合(RRF),结合语义+全文
  • LLM 重新排序 — 按相关性评分和重新排序区块
  • 对话记忆 — 带有自动上下文摘要的线程对话
  • RAG 评估 — 首个 Laravel 原生评估框架(忠实度、相关性、上下文回忆)

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Laravel RAG

A complete, driver-based RAG (Retrieval-Augmented Generation) pipeline for Laravel. Built on Prism PHP 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 traits — HasVectorSearch 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 pipeline — Rag::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 RAG as MCP tools for Claude Desktop, Cursor, etc.
  • Artisan commands — rag:index, rag:test, rag:estimate, rag:eval, rag:mcp-serve
  • DevTools — Debugbar collector and Telescope watcher
  • Livewire component — Drop-in `` with streaming and sources
  • Filament plugin — Admin panel for documents, embeddings, and interactive testing

Requirements

Vector store (choose one):

Note: sqlite-vec requires PHP compiled with SQLite extension loading support. macOS PHP (Herd, Homebrew) does not support this. Use Docker, Laravel Sail, or switch to pgvector on macOS.

Installation

composer require moneo/laravel-rag
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →