1Z0-184-25 Question 112
Single answerYou are building a product recommendation engine on Oracle Autonomous Database in Oracle Cloud Infrastructure. You need to generate vector embeddings for thousands of product descriptions directly in the database so that you can perform vector-based similarity searches without transferring data externally. Which approach should you choose?
- A
Use Oracle Machine Learning for Python in the Autonomous Database and a pretrained language model to generate embeddings within the database environment.
- B
Rely on DBMS_CRYPTO to create hashes of product descriptions and store them as vectors.
- C
Enable Oracle Text on each product description to automatically produce vector embeddings during indexing.
- D
Export all product descriptions to a standalone Python environment for embedding generation and then import the vectors back into the database.
Show answer and explanation
Correct answer: A
Explanation
By leveraging Oracle Machine Learning for Python (OML4Py) within Autonomous Database, you can integrate Python scripts and pretrained models in a secure, in-database environment to generate vector embeddings natively. Once generated, these embeddings can be stored in a specialized vector column (introduced in Oracle Database 23c) and indexed for high-performance similarity searches. Refer to official Oracle Machine Learning documentation for guidelines on setting up and using Python scripts in Autonomous Database for embedding generation.
- A. Correct.
Option 1 is correct. Oracle Machine Learning for Python (OML4Py) allows you to run Python scripts and leverage pretrained language models directly in Autonomous Database. This avoids unnecessary data movement, keeps everything within the Oracle environment, and produces vector embeddings that can be stored and indexed for similarity searches.
- B. Incorrect.
Option 2 is incorrect. DBMS_CRYPTO deals with cryptographic operations (e.g., hashing, encryption) rather than generating semantic vector embeddings. Hash functions cannot capture contextual similarity among words as embeddings do.
- C. Incorrect.
Option 3 is incorrect. Although Oracle Text provides advanced text indexing and search capabilities, it does not automatically produce vector embeddings. Oracle Text primarily uses keyword-based and full-text indexing rather than vector-based representations for semantic search.
- D. Incorrect.
Option 4 is incorrect. While exporting data to an external Python environment to generate embeddings is technically possible, it contradicts the requirement to perform the entire process within the Oracle Database environment. This also reintroduces data movement overhead.