Amazon Aurora PostgreSQL-Compatible Edition supports the pgvector extension that enables manipulating vector embeddings in relational databases.
Amazon Bedrock is a fully-managed AWS service that offers various foundation models (FMs), including Amazon Titan Text Embeddings.
Preparing dataset, generating vector embeddings, storing data and embedding in Aurora PostgreSQL database and importing required libraries are the steps to visualize vector embeddings and explore semantic similarities.
PCA is used to transform high-dimensional data into a lower-dimensional space, which enables visualizing the underlying structure of the data.
This article provides a step-by-step guide for preparing dataset, using Bedrock to generate vector embeddings, storing data and embedding in PostgreSQL table, performing dimensionality reduction with PCA technique and using the plotly package to plot a 3D Scatter Plot of Categories.
The resulting three-dimensional scatter plot shows items with similar meanings clustered closely in the embedding space. This proximity ensures that when we perform a semantic search on this dataset for a specific item, it returns products with similar semantics.
The integration of vector data types in Aurora PostgreSQL-Compatible opens up exciting possibilities for exploring semantic similarities and visualizing complex data structures.
By using techniques such as PCA, users can gain valuable insights into their data, uncover hidden patterns, and make informed decisions.
Clean up the resources used after the completion of tasks to avoid incurring charges.
The author of this article, Ravi Mathur, is a Sr. Solutions Architect at AWS who provides technical assistance and architectural guidance on various AWS services.