Exam Room · AI Practitioner

Pop Quiz: Where the Embeddings Go

· 2 min read

Exam-style

A retailer runs its subscriber records and its product catalogue in Amazon Aurora PostgreSQL. It wants semantic search over the product descriptions, so a shopper typing "something warm for camping in the rain" finds the right jackets even when those words appear nowhere in the listing. The team has one firm constraint: no second data store to secure, back up, patch and pay for. Where do the embeddings go?

Reveal the answer

B. Amazon Aurora PostgreSQL with the pgvector extension enabled, keeping the vectors in a column beside the product rows

Two facts decide this. The data is already in PostgreSQL, and the team has ruled out a second system. pgvector is a PostgreSQL extension that adds a vector column type and nearest-neighbour search to ordinary SQL. The embeddings sit in a column on the product table. They get backed up with the rest of the database, obey the same grants, and take a normal WHERE clause on price or stock in the same query. Amazon RDS for PostgreSQL supports the extension too, so the choice between them is the ordinary Postgres one rather than an AI one. A new Amazon OpenSearch Service domain would retrieve perfectly well; it is the general default for vector databases and it is the wrong pick only because it is the second system the constraint excludes. Amazon DynamoDB has no vector similarity search. It can hold an embedding as an attribute, but it cannot answer “which of these are nearest”, so it needs pairing with a search service, which adds the system that was ruled out. Amazon Neptune is the pick when retrieval has to follow relationships as well as measure similarity, and nothing here does. Amazon S3 is object storage; a prefix scan reads every embedding to answer one query, which is not a similarity index. One more thing makes the pick comfortable: Amazon Bedrock Knowledge Bases can write into Aurora PostgreSQL, so the chunking, embedding and syncing pipeline stays managed even though the store is your own database.

AI Fundamentals · part of The Exam Room

Q. The catalogue is already in Amazon Aurora PostgreSQL, the team wants semantic search, and it refuses to run a second data store. Where do the embeddings go?

A. Aurora PostgreSQL with the pgvector extension, vectors in a column beside the product rows. Amazon RDS for PostgreSQL does the same job on the standard engine.

Why? Sort the AWS vector databases by what the estate already looks like. Amazon OpenSearch Service is the default when there is nothing to sit next to, and it retrieves well here, but it is the extra system this team has excluded. Amazon Aurora and Amazon RDS for PostgreSQL win when the data is already in Postgres, because one backup, one set of grants and one WHERE clause cover both halves. Amazon Neptune is for retrieval that walks relationships as well as measuring similarity. Amazon DynamoDB and Amazon S3 will store an embedding and neither will search one. Amazon Bedrock Knowledge Bases can target Aurora PostgreSQL, so choosing your own database does not mean writing the ingestion pipeline yourself.

These posts are LLM-aided. Backbone, original writing, and structure by Craig. Research and editing by Craig + LLM. Proof-reading by Craig.