Menu

1 / 7

Laravel Pgvector Eloquent: Vector Similarity Search & HNSW Indexing in Laravel

DEV Community: laravel·Tarek Mohamed·about 6 hours ago
#G2NXK8iH
#devtolaravel#devto#dev#pgvector#eloquent
Reading 0:00
15s threshold

Building AI-powered features, semantic search, and recommendation engines in Laravel usually meant relying on external vector databases like Pinecone or Weaviate. With PostgreSQL pgvector , you can store vector embeddings directly alongside your relational business data.

laravel-pgvector-eloquent is a clean, idiomatic Laravel package that provides first-class pgvector support for Eloquent models.

Laravel pgvector Eloquent 🐘⚡

Native PostgreSQL pgvector integration for Laravel 11 Eloquent models with custom vector casting, cosine distance scopes, and nearest-neighbor vector search.

Developed by Tarek Mohamed ( @seotarek )

🚀 Installation

composer require seotarek/laravel-pgvector-eloquent

Enter fullscreen mode

Exit fullscreen mode

💻 Usage

1.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.