🎓 Learn how it works with the Amazon S3 Vectors with Spice (opens in a new tab) engineering blog post.
Data sourced by Data Connectors, or views built atop them with vector embedding columns can be indexed and efficiently searched using a vector engine.
A vector engine will store all vector embeddings associated with columns in a dataset/view, provide efficient vector search operations and avoid unnecessary recomputation of embeddings.
A vector engine is configured by setting the vectors configuration. E.g.
For the complete reference specification see datasets (opens in a new tab).
Supported Vector engines:
| Name | Description |
|---|---|
s3_vectors (opens in a new tab) | AWS S3 vectors |
elasticsearch (opens in a new tab) | Elasticsearch (Spice.ai Enterprise) |
duckdb (opens in a new tab) | DuckDB VSS (HNSW) extension (deprecated) |
The engines differ in where the index lives:
metadata.vectors: filterable into the index query. Elasticsearch (opens in a new tab) keeps the kNN index in the cluster (and can combine it with full-text in that cluster).vector_search without a vectors block. The index lives in the DuckDB file. A full refresh rebuilds it. Plan memory for the graph and a cold start that reopens or rebuilds it.Add vector search only when semantic retrieval is required. Hybrid retrieval (rrf (opens in a new tab) over vector_search and text_search) is for queries that need both semantic and literal matches. Otherwise stay on SQL, regex, or full-text search (opens in a new tab). See Where indexes are built (opens in a new tab).
:::warning[Limitations]
A dataset or view must be accelerated (i.e. datasets[].acceleration.enabled: true, see docs (opens in a new tab)) for a vector engine to be provided the appropriate data to ingest.
:::
import DocCardList from '@theme/DocCardList';