VectorisedGraph
VectorisedGraph object that contains embedded documents that correspond to graph entities.
Methods
| Method | Description |
|---|---|
edges_by_similarity | 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. |
empty_selection | Return an empty selection of entities. |
entities_by_similarity | 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. |
nodes_by_similarity | 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. |
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
| Name | Type | Default | Description |
|---|---|---|---|
query | str | list | - | The text or the embedding to score against. |
limit | int | - | The maximum number of new edges in the results. |
window | Tuple | str, int | str], optional | None | The window that documents need to belong to in order to be considered. |
Returns
| Type | Description |
|---|---|
| VectorSelection | The 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
| Name | Type | Default | Description |
|---|---|---|---|
query | str | list | - | The text or the embedding to score against. |
limit | int | - | The maximum number of new entities in the result. |
window | Tuple | str, int | str], optional | None | The window that documents need to belong to in order to be considered. |
Returns
| Type | Description |
|---|---|
| VectorSelection | The 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
| Name | Type | Default | Description |
|---|---|---|---|
query | str | list | - | The text or the embedding to score against. |
limit | int | - | The maximum number of new nodes in the result. |
window | Tuple | str, int | str], optional | None | The window that documents need to belong to in order to be considered. |
Returns
| Type | Description |
|---|---|
| VectorSelection | The vector selection resulting from the search. |