Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Implement calculate_similarity Method in VectorDatabaseProvider #2

Closed
emrgnt-cmplxty opened this issue Jun 20, 2023 · 0 comments
Closed

Comments

@emrgnt-cmplxty
Copy link
Owner

emrgnt-cmplxty commented Jun 20, 2023

The VectorDatabaseProvider abstract base class currently has a placeholder for the calculate_similarity method. For a functioning implementation, this method needs to calculate the similarity between a given vector (i.e., symbol embedding) and all vectors in the database. This is crucial for any use case involving similarity or distance-based retrieval of symbols in the database.

The calculate_similarity method should return a list of dictionaries, each containing a symbol and its corresponding similarity score. The implementation will largely depend on the data structure used for the database and the specific similarity measure employed (for instance, cosine similarity for vector data).

Here's a high-level overview of what needs to be done:

Update the calculate_similarity method in VectorDatabaseProvider to correctly compute similarity scores instead of raising a NotImplementedError.
The similarity scores should be computed for all vectors in the database against the provided input vector.
The output should be a list of dictionaries, each containing a Symbol instance and the corresponding similarity score as a float value.
Test the method to ensure it correctly computes and returns similarity scores.
Feel free to post any questions or concerns you have about this implementation. Your contribution to this project is highly appreciated!

emrgnt-cmplxty added a commit that referenced this issue Aug 28, 2023
Huntemall pushed a commit to Huntemall/automata-dev that referenced this issue Oct 30, 2023
…mmit-cleanup

Feature/first commit cleanup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant