Skip to content

retrieval: TurbopufferVectorStore returns raw distance as score (inconsistent with other stores) #1014

Closed

Description

@AmitoVrito

Found during review of #1012 (issue #888).

TurbopufferVectorStore._search_sync emits the raw dist value into the score field. Turbopuffer distance is lower-is-better, whereas every other SynapseKit store returns a cosine similarity (higher-is-better). Result ordering is correct (turbopuffer orders by distance), so this is a semantic/consistency issue, not a wrong-order bug — but a user applying a score > threshold filter across stores, or comparing scores, gets inverted behavior.

Note: distance_metric is configurable (cosine_distance, euclidean_squared), so the fix must be metric-aware — e.g. 1 - dist only for cosine. Deferred from the #1012 merge to avoid a metric-dependent partial fix.

Activity

  1. added
    bug
    on Sep 3, 2026
  2. added a commit that references this issue on Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions