Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve entity similarity endpoint #271

Merged
merged 7 commits into from
Jan 24, 2024
Merged

Conversation

cthoyt
Copy link
Member

@cthoyt cthoyt commented Jan 3, 2024

This PR improves the entity similarity endpoint in the following ways:

  1. Switches from returning the cosine distance to a normalized version of the cosine similarity, such that similar entities get 1.0, dissimilar entities get 0.0, and sort of similar entities get 0.5 (average)
  2. Rename the data model returned by the entity similarity endpoint and update the key inside it from distance to similarity
  3. Improve documentation inside the response model and fields
  4. Enable returning self-comparisons, which should always result in 1.0

@cthoyt cthoyt changed the title Improve documentation about entity similarity Improve entity similarity endpoint Jan 10, 2024
@bgyori bgyori force-pushed the improve-entity-similarity-docs branch from 032a132 to 0642aa0 Compare January 24, 2024 13:50
@bgyori bgyori merged commit f42a5d3 into main Jan 24, 2024
4 checks passed
@cthoyt cthoyt deleted the improve-entity-similarity-docs branch January 24, 2024 13:53
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.

2 participants