Skip to content

[Feature Request] Binary vectors with hamming distance #5915

Open
@markharwood

Description

@markharwood

Fast and compact vector format

Would it be possible to add a bit representation for vectors which uses hamming distance for similarity scoring?
It is 32x smaller than full float-based vectors, very fast to compare (XOR + popcnt) and doesn’t sacrifice too much in quality. Other engines like elasticsearch and Vespa support it for this reason.

Given the Redis focus on speed and in-memory data I’d have thought this would be an ideal feature.
Users could pass bytes as hex or base64 strings. Queries could have a min similarity (aka max distance) to control match quality.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions