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

Rename max_inner_product #17

Closed
lucasgadams opened this issue Jun 14, 2023 · 2 comments
Closed

Rename max_inner_product #17

lucasgadams opened this issue Jun 14, 2023 · 2 comments

Comments

@lucasgadams
Copy link

Just wondering why the comparator is called max_inner_product. Shouldn't it be negative_inner_product? Seems like it could be confusing. Thanks for making the package!

@ankane
Copy link
Member

ankane commented Jun 15, 2023

Hi @lucasgadams, thanks for the suggestion. I thought max_inner_product was better since the function is used for maximum inner product search. I'd like to keep the current name for now, but may revisit / add an alias in the future.

@ankane ankane closed this as completed Jun 15, 2023
@lucasgadams
Copy link
Author

I'm not sure that really makes sense? Maximum inner product search is when you are trying to maximize the inner product between similar items (its a similarity metric). Here the function is actually the opposite, its a sort of inner product distance (negative inner product). And I don't think you need use MIPS or the word max to explain the utility for inner product, it's ubiquitous in ML as a measure of similarity (i've worked in ml for 10 years and have never heard the specific phrase MIPS). I'd argue the reason why most people are using inner product comparison in the first place is they are actually doing cosine similarity and have already normalized vectors (such as openai). I see that you are the author or the original pgvector so I assume you know all this already. Just my 2 cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants