1Z0-184-25 Question 111
Select 2Your team is implementing a new semantic search component for a product catalog using Oracle Database 23c. You want to generate and store vector embeddings for product descriptions directly within the database to enhance search accuracy. Which two approaches would allow you to generate embeddings in the Oracle Database environment while adhering to best practices for scalability and maintainability?
- A
Use Oracle Machine Learning for Python (OML4Py) in-database scripts with a pretrained embedding model, then store the resulting vectors in a dedicated vector data type column.
- B
Create a custom PL/SQL procedure that calls an external REST endpoint via DBMS_CLOUD to obtain embeddings, storing the vectors in a table designed for vector search.
- C
Enable an Oracle Text index on the product descriptions to automatically produce vector embeddings with no additional user-defined process required.
- D
Develop a Java stored procedure that directly references JDBC drivers to store raw text as CLOB and rely on the SQL engine to derive embeddings automatically.
- E
Add a semantic index on text columns assuming the database will generate vector embeddings without any custom code or model configuration.
Show answer and explanation
Correct answers: A, B
Explanation
To generate vector embeddings inside Oracle Database 23c, you need to either apply an in-database machine learning approach (e.g., Oracle Machine Learning for Python) or call an external service from a PL/SQL procedure and store resulting vectors in a table. Oracle Text and semantic indexes do not independently produce embeddings. Refer to Oracle documentation on Oracle Machine Learning for Python (OML4Py) and the DBMS_CLOUD package for best practices on embedding generation and storage within Oracle Database.
- A. Correct.
Option 1 is correct. Oracle Machine Learning for Python (OML4Py) allows you to implement machine learning logic, such as generating vector embeddings from a pretrained model, directly inside the database. This approach centralizes data and minimizes data movement while leveraging in-database processing.
- B. Correct.
Option 2 is correct. PL/SQL procedures can use DBMS_CLOUD to call external services, including REST endpoints, for embedding generation. After retrieving the vectors, you can store them in a dedicated column (like the new vector data type) and index them for semantic search. This is a valid and flexible in-database workflow.
- C. Incorrect.
Option 3 is incorrect. Oracle Text does not automatically generate vector embeddings without any additional user-defined logic or integration. Oracle Text focuses on keyword-based text indexes rather than embedding-based approaches.
- D. Incorrect.
Option 4 is incorrect. While Java stored procedures can process data within the database, simply storing raw text as CLOB and expecting automatic embedding generation from the SQL engine is not a native function. Additional custom code and an actual embedding model would be required, making this option misleading in its current wording.
- E. Incorrect.
Option 5 is incorrect. Creating a semantic index alone does not automatically generate vector embeddings; you must provide or generate the vector data from a suitable model or service. A proper embedding model or integration is needed to produce vectors before they are indexed.