symfony/ai-store
Experimental Symfony AI Store component: a low-level abstraction to store and retrieve documents in vector stores. Use bridge packages to connect to providers like pgvector, Pinecone, Redis, Elasticsearch, Qdrant, ChromaDB, and more.
StoreInterface implementations (e.g., PostgresStore).PreQueryEvent/PostQueryEvent can be extended via Laravel’s listeners for logging, caching, or analytics.IndexerInterface) can leverage Laravel Queues for async processing.config('features.ai_store')) or version pinning in composer.json to mitigate risk.HybridQuery (keyword + vector) complements Laravel’s Eloquent query builder, enabling unified search UIs.composer require symfony/ai-store symfony/ai-postgres-store).AppServiceProvider:
$this->app->bind(StoreInterface::class, PostgresStore::class);
pgvector (requires extension).RESEMBLANCE for cosine similarity).sqlite-vec support (zero-config for local dev).pgvector extension in PostgreSQL).^0.8.0) and feature flags to isolate changes.TextSplitTransformer requires tuning chunk_size/delay for optimal vectorization.Indexer::index(), but memory limits may require chunked processing.VectorDocument.ai-redis-store)?StoreInterface implementations via bindings (e.g., PostgresStore for production, InMemoryStore for testing).PreQueryEvent/PostQueryEvent with Laravel listeners for analytics or caching.Indexer::index()) to Laravel Queues for async processing.pgvector extension; create a custom PostgresStore config:
'ai_store' => [
'postgres' => [
'connection' => 'pgsql',
'table' => 'vector_documents',
'vector_column' => 'embedding',
],
],
ai-redis-store with Redis modules (e.g., RESEMBLANCE for cosine distance).ai-sqlite-store).symfony/ai-platform for vectorization (e.g., OpenAIVectorizer):
$vectorizer = new OpenAIVectorizer($client, 'text-embedding-ada-002');
$indexer = new Indexer($vectorizer, new PostgresStore($connection));
InMemoryStore for local testing.PostgresStore/RedisStore for validation.StoreInterface calls in Laravel’s feature() helper.pgvector extension (PostgreSQL) or Redis modules via Docker.PreQueryEvent to log query performance.ai-store alongside existing vector logic (e.g., direct Pinecone SDK).config('features.ai_search')).| Laravel Component | Integration Notes | Workarounds |
|---|---|---|
| Eloquent | No direct binding; manual VectorDocument mapping |
Use Laravel Accessors/Mutators |
| Scout | No native integration | Build custom ScoutEngine adapter |
| Cache | PSR-6 bridge exists (ai-cache-store) |
Wrap in Laravel Cache facade |
| Queues | Supports async Indexer::index() |
Use Laravel Queues for batch processing |
| Events | Extend PreQueryEvent/PostQueryEvent |
Register listeners in EventServiceProvider |
StoreInterface to a bridge (e.g., PostgresStore).Indexer for document ingestion.HybridQuery support for keyword + vector search.ai-redis-store.TextSplitTransformer) for performance.PreQueryEvent/PostQueryEvent via Laravel’s Log facade.symfony/ai-store to patch versions (0.8.x) due to experimental status.pgvector schema updates).StoreInterface bindings in AppServiceProvider.config/caching for store configurations.TextDocument input (e.g., empty text, malformed metadata).HybridQuery syntax and backend-specific filters (e.g., Elasticsearch DSL).Indexer::index() batch size and chunking parameters.#ai channel for real-time support.ai-redis-store with Redis Cluster for distributed vectorHow can I help you explore Laravel packages today?