Skip to content

Conversation

@matthewmcneely
Copy link
Contributor

Description

DO NOT MERGE

This PR adds support for the new effort and distance threshold in generated GraphQL queries for types that have embedding vectors.

Note. There's a breaking change in the resulting computed distance in that for cosine and dotproduct indexes, the computed distance is no longer divided by 2. The results now correctly represent the distances stored in the index.

Checklist

  • The PR title follows the
    Conventional Commits syntax, leading
    with fix:, feat:, chore:, ci:, etc.
  • Code compiles correctly and linting (via trunk) passes locally
  • Tests added for new functionality, or regression tests for bug fixes added as applicable
  • For public APIs, new features, etc., a PR on the
    docs repo staged and linked here. This process can
    be simplified by going to the public docs site and clicking the
    "Edit this page" button at the bottom of page(s) relevant to your changes. Ensure that you
    indicate in the PR that this is an unreleased feature so that it does not get merged into
    the main docs prematurely.

@matthewmcneely matthewmcneely requested a review from a team as a code owner January 9, 2026 22:30
@github-actions github-actions bot added area/testing Testing related issues area/graphql Issues related to GraphQL support on Dgraph. area/core internal mechanisms go Pull requests that update Go code labels Jan 9, 2026
@matthewmcneely matthewmcneely force-pushed the matthewmcneely/add-support-for-similar_to-params-in-graphql branch from 55afc9d to 3db2184 Compare January 15, 2026 20:53
@matthewmcneely matthewmcneely force-pushed the matthewmcneely/add-support-for-similar_to-params-in-graphql branch from 3db2184 to d61c91a Compare January 22, 2026 23:12
Copy link
Contributor

@raphael-istari raphael-istari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done extensive tests on different metrics and checked the distance values against python https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise_distances.html

Verified the support of the new parameter and also the improvement in precision for dotproduct and cosine and the vector_distance values.

@matthewmcneely matthewmcneely merged commit 96f976d into main Jan 23, 2026
28 of 29 checks passed
@matthewmcneely matthewmcneely deleted the matthewmcneely/add-support-for-similar_to-params-in-graphql branch January 23, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core internal mechanisms area/graphql Issues related to GraphQL support on Dgraph. area/testing Testing related issues go Pull requests that update Go code

Development

Successfully merging this pull request may close these issues.

3 participants