Skip to content

Add single-call concept-to-concept similarity query #32

Description

@gkennos

Motivation

Currently, finding concepts similar to a known concept requires two steps: (1) fetch its embedding from the DB via get_embeddings_by_concept_ids, (2) pass the vector to get_nearest_concepts.

Pitch

This should be a single method.

Alternatives

No response

Additional context

Proposed signature on EmbeddingReaderInterface:

def get_similar_concepts(
    self,
    concept_id: int,
    k: int,
    *,
    concept_filter: EmbeddingConceptFilter | None = None,
) -> tuple[NearestConceptMatch, ...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions