Hasty Briefsbeta

Bilingual

<antirez>

2 days ago
  • Vector Sets are a new Redis data type for vector similarity, similar to Sorted Sets but with vectors as scores.
  • They are implemented in the Redis core using the modules API, blending modularity and native support starting from Redis 8.
  • The underlying HNSW graph is rewritten from scratch with true deletions (no tombstones) and enforced reciprocal links to maintain connectivity.
  • Vector similarity queries are threaded to handle the slower vector operations, and VADD supports a CAS option for background insertion.
  • Default quantization is int8, which uses 25% of FP32 memory with nearly identical accuracy for AI embeddings; binary quantization and random projection are also available.
  • Vector Sets are serialized as graphs on disk, enabling fast reload without re-insertion overhead.
  • The API is simple: VADD, VREM, VSIM, and supports filtering using JSON attributes via VGETATTR/VSETATTR with a simple expression language.
  • Multiple Vector Sets can be split across keys for parallel writes and merged results from different keys.