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

Support similarity scores in Document API #1794

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Nov 27, 2024

  1. Support similarity scores in Document API

    Document
    * Introduced “score” attribute in Document API. It stores the similarity score.
    * Consolidate “distance” metadata for Documents. It stores the distance measurement.
    * Adopted prefix-less naming convention in Document.Builder and deprecated old methods.
    * Deprecated the many overloaded Document constructors in favour of Document.Builder.
    
    Vector Stores
    * Every vector store implementation now configures a “score” attribute with the similarity score of the Document embedding. It also includes the “distance” metadata with the distance measurement.
    * Fixed error in Elasticsearch where distance and similarity were mixed up.
    * Added missing integration tests for SimpleVectorStore.
    * The Azure Vector Store and HanaDB Vector Store do not include those measurements because the product documentation do not include information about how the similarity score is returned, and without access to the cloud products I could not verify that via debugging.
    * Improved tests to actually assert the result of the similarity search based on the returned score.
    
    Signed-off-by: Thomas Vitale <[email protected]>
    ThomasVitale committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    d262c4c View commit details
    Browse the repository at this point in the history
  2. Handle PR comments

    Signed-off-by: Thomas Vitale <[email protected]>
    ThomasVitale committed Nov 27, 2024
    Configuration menu
    Copy the full SHA
    3a740ec View commit details
    Browse the repository at this point in the history