symfony/ai-mongo-db-store
Integrates MongoDB Atlas Vector Search ($vectorSearch) as a vector store for Symfony AI Store, enabling storage and similarity search over embeddings using Atlas. Designed for use with MongoDB Atlas and the Symfony AI ecosystem.
StoreInterface, making it a seamless fit for applications leveraging Symfony’s AI components (e.g., embeddings, LLM pipelines). It abstracts MongoDB Atlas’s vector search into a PHP-native interface, reducing cognitive load for developers already familiar with Symfony.$vectorSearch complexity, enabling teams to focus on application logic.insert, findNearest, remove) with minimal extensibility for edge cases (e.g., malformed vectors, concurrent writes).StoreInterface is stable, but future Symfony AI releases could introduce breaking changes.mongodb/mongodb (v2.0+) and PHP 8.1+, ensuring compatibility with modern Laravel applications.db.embeddings.createIndex({
"vector": "vectorSearch",
"dimensions": 768,
"similarity": "cosine",
"name": "vector_index"
});
.env files or Symfony’s ParameterBag).use Symfony\AI\Store\MongoDbStore;
use Symfony\AI\Store\VectorSearchOptions;
$store = new MongoDbStore(
new \MongoDB\Client(env('MONGODB_ATLAS_URI')),
env('MONGODB_DATABASE'),
env('MONGODB_COLLECTION'),
new VectorSearchOptions(768, 'cosine')
);
$this->app->bind(\Symfony\AI\Store\StoreInterface::class, function ($app) {
return new MongoDbStore(
new \MongoDB\Client(env('MONGODB_ATLAS_URI')),
env('MONGODB_DATABASE'),
env('MONGODB_COLLECTION'),
new VectorSearchOptions(768, 'cosine')
);
});
pgvector or Milvus)?faiss, Weaviate) for their specific workload?weaviate, milvus, pgvector) been evaluated for feature parity, cost, and ease of integration?symfony/ai, symfony/amphp). The package’s StoreInterface compatibility ensures minimal changes to existing AI workflows.symfony/ai + php-ai/llm) for document retrieval.Phase 1: Proof of Concept (PoC)
insert, findNearest, remove).Phase 2: Pilot Integration
How can I help you explore Laravel packages today?