
Redis Similarity
CertifiedRun a similarity search on a Redis vector set
Redis Similarity
Run a similarity search on a Redis vector set
Runs VSIM to find the elements of a Redis vector set closest to a query vector or to an existing element, ranked by similarity score. See the Redis VSIM documentation for details.
type: io.kestra.plugin.redis.vector.SimilarityExamples
Find the 5 embeddings most similar to a query vector.
id: similarity_search
namespace: company.team
inputs:
- id: queryVector
type: ARRAY
itemType: FLOAT
tasks:
- id: search
type: io.kestra.plugin.redis.vector.Similarity
url: "redis://:{{ secret('REDIS_PASSWORD') }}@{{ secret('REDIS_HOST') }}:6379"
key: "doc_embeddings"
vector: "{{ inputs.queryVector }}"
count: 5
- id: log_matches
type: io.kestra.plugin.core.log.Log
message: "Top matches: {{ outputs.search.matches }}"
Properties
key *Requiredstring
Vector set key
Rendered before calling VSIM.
url *Requiredstring
Redis connection string
count integerstring
Result count
Maps to the VSIM COUNT option; the maximum number of matches to return, between 1 and 10000. When left unset, the property is omitted from the VSIM call and Redis applies its own default (10).
element string
Query element
The id of an existing element to search similar elements for. Set exactly one of vector or element. If the id does not exist in the vector set, VSIM returns an empty result rather than an error.
epsilon numberstring
Epsilon
Maps to the VSIM EPSILON option; a distance threshold controlling the range of the graph exploration. Must be a non-negative number. When left unset, the property is omitted from the VSIM call and Redis applies its own default.
explorationFactor integerstring
Exploration factor
Maps to the VSIM EF option; controls the search effort in the underlying HNSW graph, higher values improve recall at the cost of speed. When left unset, the property is omitted from the VSIM call and Redis applies its own default.
filter string
Filter expression
Maps to the VSIM FILTER option; restricts matches to elements whose attributes satisfy this expression, see attribute filtering. When left unset, the property is omitted from the VSIM call and no filtering is applied.
filterEfficiency integerstring
Filter efficiency
Maps to the VSIM FILTER-EF option; caps the effort spent scanning candidates to satisfy filter before giving up. Only meaningful together with filter. When left unset, the property is omitted from the VSIM call and Redis applies its own default.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
vector array
Query vector
The vector to search similar elements for, as a list of numbers. Set exactly one of vector or element.
Outputs
matches array
Matching element ids
Element ids returned by VSIM, ranked from most to least similar.
scores object
Similarity scores
Similarity score for each element id in matches, in the same order.