Skip to content

bug: DiskANN CalcDistByIDs returns incorrect COSINE/IP distances when all vectors are cached #1762

Description

@SpadeA-Tang

DiskANN CalcDistByIDs returns early when all requested vectors are found in the coordinate cache, skipping the metric-specific distance
conversion.

As a result:

  • COSINE similarity is returned with the wrong sign.
  • INNER_PRODUCT conversion and norm rescaling are skipped.
  • L2 and requests containing uncached vectors are unaffected.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions