Redis Add

Redis Add

Certified

Add an element to a Redis vector set

Runs VADD to attach an embedding to an element id inside a Redis vector set, creating the set on first use. See the Redis vector set documentation for details.

yaml
type: io.kestra.plugin.redis.vector.Add

Add an embedding vector to a Redis vector set.

yaml
id: store_embedding
namespace: company.team

inputs:
  - id: embedding
    type: ARRAY
    itemType: FLOAT

tasks:
  - id: add_vector
    type: io.kestra.plugin.redis.vector.Add
    url: "redis://:{{ secret('REDIS_PASSWORD') }}@{{ secret('REDIS_HOST') }}:6379"
    key: "doc_embeddings"
    element: "doc_42"
    vector: "{{ inputs.embedding }}"
Properties

Element id

Unique identifier of the member the vector is attached to inside the vector set.

Vector set key

Rendered before calling VADD. The vector set is created automatically the first time an element is added.

Redis connection string

SubTypenumber

Vector

The embedding to store, as a list of numbers. All elements added to a given vector set must share the same dimensionality unless reduceDim is used.

Attributes

Arbitrary JSON object attached to the element, as key-value pairs. Serialized and stored alongside the vector, it can later be referenced in a Similarity task's filter expression.

Check and set

Maps to the VADD CAS option. When true, performs the insertion as a check-and-set operation to reduce contention under concurrent writes.

Exploration factor

Maps to the VADD EF option. Controls the search effort used while inserting the new node into the underlying HNSW graph; higher values improve insertion quality at the cost of speed. When left unset, the property is omitted from the VADD call and Redis applies its own default.

Max connections per node

Maps to the VADD M option. Maximum number of connections each node of the underlying HNSW graph can have; higher values improve recall at the cost of memory. When left unset, the property is omitted from the VADD call and Redis applies its own default.

Reference (ref) of the pluginDefaults to apply to this task.

Possible Values
NO_QUANTIZATIONBINARYQ8

Quantization type

Maps to the VADD quantization option: NO_QUANTIZATION (full-precision floats), BINARY (1-bit per component), or Q8 (8-bit integers). When left unset, the property is omitted from the VADD call and Redis applies its own default (Q8).

Reduce dimensionality

Maps to the VADD REDUCE option. When set, the vector is randomly projected down to this many dimensions before being stored, trading precision for reduced memory usage. Must be less than vector's dimensionality. When left unset, the property is omitted from the VADD call and the vector is stored at its original dimensionality.

Whether the element was added

Raw VADD reply: true only when the element id did not previously exist in the vector set. False means the element already existed, whether or not its vector or attributes were changed by this call.