1 Answer
- Newest
- Most votes
- Most comments
1
Hi,
You don't have to provide the embeddings dimensions in the query: the model that you select (via its id) will return the number of dimensions that it is programmed for.
So, if you work with multiple embedding engines, your code must be ready to work with variable numbers of dimensions depending on the model that you query.
Best,
Didier
Relevant content
- asked a year ago
Currently, our solution selects the model_id and defaults the text embedding dimensions to 1536 for Titan version 1 and 1024 for Titan version 2. However, we aim to test our dataset with various embedding sizes, such as 256, 512, and 1024.
How can we dynamically set the embedding dimension for both Titan version 1 and version 2 using the Langchain Community BedrockEmbedding? The model keyword arguments do not seem to accept dimension specifications.
How do we dynamically select the embedding dimension for both Titan version 1 and version 2 during testing.