Actions12
Matryoshka Search
AI-generatedSummary
Searches a vector store collection using a Matryoshka cascade over progressively wider query-vector dimensions, returning the top matches ranked with the selected metric.
Inputs
- Collection (required) — Collection to search.
- Query Vector (required) — Array of finite numbers or a JSON string containing one. Its length must match the dimension configured in the Vector Store credentials.
- Limit — Maximum number of results; defaults to 50 and must be at least 1.
- Metric — Ranking metric: cosine (default), dot product, Euclidean, or Manhattan.
- Stages — JSON array of dimensional slice sizes for the cascade. Values are clamped to the credential dimension. An empty or unusable list defaults to [floor(dimension/4), floor(dimension/2), dimension], with duplicates removed.
Output shape
A list of n8n items, one per matching vector, each containing id, score, and metadata.
Metadata defaults to an empty object when absent. Search errors if the query vector is invalid or does not match the configured dimension; with Continue On Fail enabled, an error item is returned instead.