VectorIndex
- Wrap a
Listenerso that outputs are searchable - Can optionally take a second
Listenerfor multimodal search - Applies to
Listenerinstances containingModelinstances which output vectors, arrays or tensors - Maybe leveraged in superduper queries with the
.likeoperator
Dependencies
Usage pattern
from superduper import VectorIndex
vi = VectorIndex(
'my-index',
indexing_listener=listener_1 # defined earlier calculates searchable vectors
)
# or may use multiple listeners
vi = VectorIndex(
'my-index',
indexing_listener=listener_1
compatible_listener=listener_2 # this listener can have `listener_2.active = False`
)
db.apply(vi)
See also