VectorisedGraph

VectorisedGraph object that contains embedded documents that correspond to graph entities.

Methods

MethodDescription
edges_by_similarityPerform a similarity search between each edge's associated document and a specified query. Returns a number of edges up to a specified limit ranked in descending order of similarity score.
empty_selectionReturn an empty selection of entities.
entities_by_similarityPerform a similarity search between each entity's associated document and a specified query. Returns a number of entities up to a specified limit ranked in descending order of similarity score.
nodes_by_similarityPerform a similarity search between each node's associated document and a specified query. Returns a number of nodes up to a specified limit ranked in descending order of similarity score.

Method Details

edges_by_similarity

Signature: edges_by_similarity(query, limit, window=None)

Perform a similarity search between each edge's associated document and a specified query. Returns a number of edges up to a specified limit ranked in descending order of similarity score.

Parameters

NameTypeDefaultDescription
querystr | list-The text or the embedding to score against.
limitint-The maximum number of new edges in the results.
windowTuple | str, int | str], optionalNoneThe window that documents need to belong to in order to be considered.

Returns

TypeDescription
VectorSelectionThe vector selection resulting from the search.

empty_selection

Return an empty selection of entities.

entities_by_similarity

Signature: entities_by_similarity(query, limit, window=None)

Perform a similarity search between each entity's associated document and a specified query. Returns a number of entities up to a specified limit ranked in descending order of similarity score.

Parameters

NameTypeDefaultDescription
querystr | list-The text or the embedding to score against.
limitint-The maximum number of new entities in the result.
windowTuple | str, int | str], optionalNoneThe window that documents need to belong to in order to be considered.

Returns

TypeDescription
VectorSelectionThe vector selection resulting from the search.

nodes_by_similarity

Signature: nodes_by_similarity(query, limit, window=None)

Perform a similarity search between each node's associated document and a specified query. Returns a number of nodes up to a specified limit ranked in descending order of similarity score.

Parameters

NameTypeDefaultDescription
querystr | list-The text or the embedding to score against.
limitint-The maximum number of new nodes in the result.
windowTuple | str, int | str], optionalNoneThe window that documents need to belong to in order to be considered.

Returns

TypeDescription
VectorSelectionThe vector selection resulting from the search.