承接 lemukarram/vector-search 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lemukarram/vector-search

Composer 安装命令:

composer require lemukarram/vector-search

包简介

The Ultimate Laravel AI RAG Package. Seamlessly integrate Vector Search with GPT-5.5, Gemini 2.5, and Claude 4.6. Advanced semantic search for Eloquent models.

README 文档

README

Latest Version on Packagist Total Downloads License

Laravel AI RAG is the ultimate developer toolkit for building production-ready Retrieval-Augmented Generation (RAG) applications. It seamlessly bridges your Eloquent models with cutting-edge Vector Databases and Frontier LLMs like GPT-5.5, Gemini 2.5, and Claude 4.6.

🛠️ Detailed Installation Guide

1. Requirements

  • PHP 8.2 or higher
  • Laravel 10.x, 11.x, or 12.x
  • A vector store account (Upstash, Pinecone, or a local Chroma instance)

2. Install via Composer

composer require lemukarram/laravel-ai-rag

3. Publish Configuration

Publish the vector-search.php config file to your application:

php artisan vendor:publish --provider="LeMukarram\VectorSearch\VectorSearchServiceProvider"

⚙️ Exhaustive Configuration Reference

Open config/vector-search.php to manage your environment.

📂 Vector Store Settings

Driver Env Variable Description
Global VECTOR_STORE Default store to use (upstash, pinecone, chroma)
Upstash UPSTASH_VECTOR_URL Your Upstash Vector REST URL
Upstash UPSTASH_VECTOR_TOKEN Your Upstash REST Token
Pinecone PINECONE_API_KEY Your Pinecone API Key
Pinecone PINECONE_HOST The index host (e.g., https://index-xyz.svc.pinecone.io)
Chroma CHROMA_HOST Hostname (Default: 127.0.0.1)
Chroma CHROMA_PORT Port (Default: 8000)
Chroma CHROMA_COLLECTION Collection name (Default: laravel-rag)

🧠 AI Model Settings

Provider Env Variable Description
OpenAI OPENAI_API_KEY Your OpenAI Secret Key
Gemini GEMINI_API_KEY Your Google AI (Gemini) API Key
Anthropic ANTHROPIC_API_KEY Your Anthropic API Key
DeepSeek DEEPSEEK_API_KEY Your DeepSeek API Key

⚡ RAG Logic & Chunking

Configure these in the rag array of your config file:

  • chunk_size: Maximum characters per vector (Default: 1000)
  • chunk_overlap: Character overlap between chunks (Default: 200)
  • system_prompt: The core instruction for the LLM. Supports {{context}} and {{query}} placeholders.

🚀 Pro Use Cases & Examples

Use Case 1: Intelligent Documentation Search

Index your technical docs and allow users to ask questions.

// In your Model
public function getVectorColumns(): array {
    return ['title', 'body', 'version_tag'];
}

// In your Controller
$answer = VectorSearch::whereMetadata('version_tag', 'v3.0')
    ->chat('How do I configure the new hybrid search?');

Use Case 2: AI-Powered E-commerce Product Recommendations

Find products not just by name, but by "vibe" or semantic description.

// Search for "summer vibe outdoor clothes"
$products = VectorSearch::withStore('pinecone') // Use high-performance index
    ->similar('Lightweight breathable clothing for hiking', topK: 10);

Use Case 3: Legal/Medical Document Analysis

Use Claude 4.6 for high-precision reasoning over complex text.

$analysis = VectorSearch::withModel('anthropic')
    ->chat('Summarize the liability clauses in the retrieved contracts.');

Use Case 4: Global Support Bot (Multi-Query Expansion)

When users ask vague questions, use multiQuery to find better answers.

// Automatically generates 3 variations of the user's query
$results = VectorSearch::multiQuery('Payment failed'); 

🧪 Testing

use LeMukarram\VectorSearch\Facades\VectorSearch;

public function test_it_works()
{
    $fake = VectorSearch::fake();
    $fake->pushChatResponse('Laravel AI RAG is awesome!');

    $response = VectorSearch::chat('What is this package?');
    
    $this->assertEquals('Laravel AI RAG is awesome!', $response->content());
}

📈 Search Performance & SEO Tips

Keywords: Laravel AI, Vector Search Laravel, RAG Laravel, GPT-5 Laravel, Gemini AI Laravel, PHP AI Package, Semantic Search PHP, Pinecone Laravel, Upstash Vector Laravel, AI Embedding Laravel.

🤝 Support & License

If you find this package useful, please star the repository on GitHub! Licensed under the MIT License.

lemukarram/vector-search 适用场景与选型建议

lemukarram/vector-search 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 11 月 16 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 lemukarram/vector-search 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 lemukarram/vector-search 我们能提供哪些服务?
定制开发 / 二次开发

基于 lemukarram/vector-search 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-16