Add joint/centroid embedding and concept-to-concept similarity queries#40
Add joint/centroid embedding and concept-to-concept similarity queries#40nicoloesch wants to merge 6 commits into
Conversation
|
Lint PR is failing because it is not adhering to our current CI/CD. Related to #39 and the decisions there. |
gkennos
left a comment
There was a problem hiding this comment.
also in docs/usage/interface-guide.md add docs for the two new functions
|
Accepted and implemented all review comments. I addressed the obfuscation of |
35637d7 to
c7cb1b9
Compare
|
Update: reverted the That split fixed the k/limit precedence issue correctly, but it's a breaking change to a released public type: Replaced it with a backward-compatible fix instead: the underlying SQL-level bug (backends overriding The real type split is tracked as a separate, future breaking-change issue: #48. Label: |
gkennos
left a comment
There was a problem hiding this comment.
still breaking - don't think there are active consumers, honestly, but since we are actively pursuing improved release hygiene, it seems worth retaining for now
|
Decided to restore the function and add the |
Summary
Adds two composition methods to
EmbeddingReaderInterface:get_joint_embedding(concept_ids, weights=None)(weighted-mean centroid, normalized for cosine space), andget_similar_concepts(concept_id, k, *, concept_filter=None)(single-call nearest-neighbor lookup, built on the former).Both are pure compositions of existing
get_embeddings_by_concept_ids/get_nearest_concepts. No backend or schema changes.