- What is symfony/ai-click-house-store used for?
- It is a Symfony AI Store bridge that provides ClickHouse vector store integration. You can persist embeddings in ClickHouse and query them with distance functions and ANN indexes. It is aimed at teams that want vector search without a separate proprietary vector database.
- Can I use symfony/ai-click-house-store with Laravel?
- Yes, it can be used in Laravel through Symfony AI's StoreInterface and Symfony components. You typically bind the store in Laravel's service container or configure it in your AI store config. The package is not Laravel-specific, so you manage the binding and ClickHouse connection yourself.
- How do I install and configure symfony/ai-click-house-store?
- Install it with Composer using symfony/ai-click-house-store. You also need PHP 8.1+, a ClickHouse server with vector/ANN support, and a configured DSN, table, and embedding column. The context lists symfony/ai ^0.8.0 as a dependency, so pin versions carefully.
- What ClickHouse version is required for vector and ANN indexes?
- ClickHouse v22.8 or newer is required for vector and ANN index support. Verify the server version with SELECT version() and check table/index support before migrating. Older ClickHouse versions may not support the ANN indexes this bridge relies on.
- How do I create a ClickHouse table for Symfony AI embeddings?
- Create a MergeTree table with an Array(Float32) embedding column whose length matches your model dimension. Add metadata columns for SQL filtering and define an ANN index on the embedding column. Validate the schema with DESCRIBE TABLE and a small test dataset before loading production vectors.
- What embedding dimensions can I store in ClickHouse?
- The store supports high-dimensional embeddings such as 768D LLM vectors and 384D sentence-transformer vectors. The Array(Float32) column and ANN index must be created with the same dimensionality as your embeddings. Mismatched dimensions will cause inserts or similarity queries to fail.
- How does similarity search work with this ClickHouse vector store?
- Queries use ClickHouse distance functions such as L2, cosine, and dot product. ANN indexes like HNSW, SCANN, and QuantizedFlat provide fast approximate similarity search. You can combine vector similarity with SQL filters on metadata for hybrid search.
- Is this package suitable for production and high query throughput?
- It fits analytics-heavy and write-heavy workloads, especially if you already run ClickHouse and want to avoid per-query vector database fees. The Symfony AI store interface is synchronous, so ClickHouse async query features are not exposed for high-QPS use cases. Avoid it for OLTP-style ACID requirements or frequent small updates, and benchmark ANN settings first.
- How can I test the ClickHouse vector store locally?
- Run ClickHouse locally, point the store DSN at it, and create a test table with the same embedding dimension and ANN index you plan to use. Insert a small vector set and run similarity queries to validate recall and latency. Use DESCRIBE TABLE and benchmark before testing against staging data.
- What are alternatives to symfony/ai-click-house-store, and how is it maintained?
- Alternatives include other Symfony AI Store backends and managed vector databases such as Pinecone or Weaviate. This bridge is compelling if you already operate ClickHouse and want vector search alongside analytics data. It is maintained in the Symfony AI project, so report issues and pull requests in the main symfony/ai repository and review releases before upgrading.