Skip to main content

vectors

Creates, updates, deletes, gets or lists a vectors resource.

Overview

Namevectors
TypeResource
Idaws.dynamodb.vectors

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
consumed_capacityobjectThe capacity units consumed by the SearchVectors operation. Contains VectorSearchRequestBytes, which represents the vector search capacity consumed.
search_resultsarrayA list of items returned by the vector similarity search, sorted by similarity with the most similar item first. Each item contains the projected attributes and a similarity score.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
search_vectorsselectregionPerforms a vector similarity search on a vector index associated with an Amazon DynamoDB table, and returns the most similar items sorted by similarity score based on the distance function configured for the index. Score interpretation depends on the distance function: COSINE - Returns the items with the k smallest scores. Scores range from 0 (identical) to 2 (opposite). Lower scores indicate higher similarity. EUCLIDEAN - Returns the items with the k smallest scores. Scores represent the Euclidean distance between vectors. Lower scores indicate higher similarity. DOT_PRODUCT - Returns the items with the k highest scores. Higher scores indicate higher similarity.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Performs a vector similarity search on a vector index associated with an Amazon DynamoDB table, and returns the most similar items sorted by similarity score based on the distance function configured for the index. Score interpretation depends on the distance function: COSINE - Returns the items with the k smallest scores. Scores range from 0 (identical) to 2 (opposite). Lower scores indicate higher similarity. EUCLIDEAN - Returns the items with the k smallest scores. Scores represent the Euclidean distance between vectors. Lower scores indicate higher similarity. DOT_PRODUCT - Returns the items with the k highest scores. Higher scores indicate higher similarity.

SELECT
consumed_capacity,
search_results
FROM aws.dynamodb.vectors
WHERE region = '{{ region }}' -- required
;