Vector sets

A data type of its own for vectors: add elements with their embeddings and attributes, and find the most similar ones (V*).

13 commands in KiviDB 1.2.2. Every command.

  • VADD: Adds an element with its vector to the vector set at key, or replaces an element's vector.
  • VCARD: Returns the number of elements in the vector set at key.
  • VDIM: Returns the number of dimensions of the vectors in the vector set at key.
  • VEMB: Returns the vector of element in the vector set at key, as one number per dimension.
  • VGETATTR: Returns the attributes of element in the vector set at key: the string set with VADD ... SETATTR or VSETATTR, as it was given.
  • VINFO: Returns the vector set's dimensions, its number of elements, its quantization, its index type and its graph's levels.
  • VISMEMBER: Tells whether element is in the vector set at key: 1 if it is, 0 if not.
  • VLINKS: Returns an element's nearest neighbours, up to 16, as one level; WITHSCORES gives their similarity, scored as VSIM scores it.
  • VRANDMEMBER: Returns elements of the vector set at key, picked at random.
  • VRANGE: Returns the elements of the vector set at key between two names in lexicographical order, with bounds as ZRANGEBYLEX takes them, and at most count.
  • VREM: Removes elements, with their vectors and attributes, from the vector set at key, and returns how many it removed.
  • VSETATTR: Sets the attributes of an element of the vector set at key, replacing any it had.
  • VSIM: Returns the elements of the vector set at key most similar to a vector, most similar first.