1Z0-184-25 Question 4
Single answerYou have a table in Oracle Autonomous Database storing 768-dimensional embeddings of product reviews. Your goal is to retrieve the top 10 most similar products for a given embedding using the built-in vector search functionality. Which approach ensures the most efficient retrieval of top-K results?
- A
Store the embeddings in a BLOB column and parse the vectors at query time using a custom PL/SQL function.
- B
Use a specialized vector data type for fixed-dimension embeddings and create an approximate nearest neighbor (ANN) index on that column.
- C
Store each dimension of the embedding separately in its own numeric column, for a total of 768 columns, and use standard indexing on all columns.
- D
Convert the embedding into a list of comma-separated values in a TEXT column and rely on full-text search indexes for similarity queries.
Show answer and explanation
Correct answer: B
Explanation
Using Oracle� specialized vector data type and approximate nearest neighbor (ANN) indexing enables high-performance top-K embeddings queries. By avoiding on-the-fly parsing and leveraging a single column for embeddings, you gain efficiency and scalability. Refer to Oracle� documentation on 'Vector Search in Oracle Database' for configuration details and performance best practices related to storing and indexing high-dimensional embeddings.
- A. Incorrect.
Option 1 is incorrect. While storing embeddings in a BLOB might seem convenient, parsing large BLOBs on the fly leads to inefficiencies. You lose the benefits of specialized indexing and would have to implement custom routines for similarity calculations.
- B. Correct.
Option 2 is correct. Oracle Database supports a specialized vector data type for storing fixed-dimension embeddings. Coupled with an approximate nearest neighbor (ANN) index, the database can run high-performance vector similarity queries needed for top-K retrieval.
- C. Incorrect.
Option 3 is incorrect. Creating 768 separate numeric columns can drastically impact both schema design and query performance. Managing indexes on hundreds of columns is cumbersome and inefficient for vector similarity searches.
- D. Incorrect.
Option 4 is incorrect. Storing embeddings as text and relying on full-text search indexes is inappropriate for vector operations. Vector similarity relies on distance metrics (e.g., cosine or Euclidean), which are poorly supported by text-based indexes.