Skip to content

Add vector fingerprint visualization to point cards#412

Open
generall wants to merge 1 commit into
masterfrom
vector-fingerprint
Open

Add vector fingerprint visualization to point cards#412
generall wants to merge 1 commit into
masterfrom
vector-fingerprint

Conversation

@generall

@generall generall commented Jul 7, 2026

Copy link
Copy Markdown
Member

What

Points in the collection view now show a compact "fingerprint" strip next to each vector's Length chip — a 32-bar waveform where similar vectors produce visually similar silhouettes. Covers dense vectors, multivectors and sparse vectors, in both the Points tab and the graph-view point preview (shared PointVectors component).

How

  • src/lib/vector-fingerprint.js — each bar is a SimHash-style projection of the whole vector onto a deterministic random ±1 direction (one murmur-finalizer hash per dimension; its 32 bits are the projection signs, so it stays a single O(dim) pass even for 3000+-dim vectors). Values are normalized by the vector's L2 norm, making the fingerprint magnitude-invariant.
  • Sign stability guarantee from SimHash: for cosine similarity s, a fraction 1 − acos(s)/π of bars keep the same sign — ~86% at cosine 0.9, ~50% for unrelated vectors.
  • Multivector rows get row-specific sign patterns (no cross-row cancellation); sparse indices are hashed into the same scheme.
  • src/components/Points/VectorFingerprint.jsx — renders a mirrored waveform on a small DPR-aware canvas: bars up in Qdrant red for positive projections, down in blue for negative, around a faint center line. Theme-aware (lighter shades in dark mode). Unsupported shapes (e.g. {text: ...} inference objects) render nothing.

Testing

  • 8 unit tests: determinism, scale invariance, values in [-1, 1], closer-vectors-give-closer-fingerprints, >80% sign agreement under small perturbation, sparse/multivector/small-dim shapes, unsupported-shape guards.
  • eslint, prettier and npm run build all pass.

🤖 Generated with Claude Code

Render a compact SimHash-style fingerprint strip next to each vector in
the collection points list. Each of the 32 bars is a projection of the
whole vector onto a deterministic random +/-1 direction, normalized by
L2 norm, so similar vectors share most bar signs (1 - acos(cos_sim)/pi)
and produce visually similar waveform silhouettes.

Supports dense vectors, multivectors (row-specific sign patterns) and
sparse vectors (indices hashed into the same scheme). Computation is a
single O(dim) pass per vector; rendering is one small canvas per vector.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant