1Z0-184-25 Question 142
Single answerYou are building a retrieval-augmented generation (RAG) application in Python on Oracle Cloud Infrastructure. You plan to generate embeddings from your domain-specific text locally in Python, then store and query these embeddings to quickly retrieve relevant documents for context. How should you configure your end-to-end pipeline so that your application can efficiently leverage vector search during inference?
- A
Generate embeddings with a Python library, configure an index in OCI Search Service with OpenSearch for vector search at creation time, then store both the text and embeddings in the same index and use KNN queries to retrieve the most relevant documents.
- B
Implement a custom Terraform module to upload the raw documents to Oracle Object Storage and rely on automatic vector embedding generation in the OCI console without any local processing in Python.
- C
Enable the 'auto-embedding' feature in the OCI Search Service with OpenSearch domain, which automatically extracts and indexes embeddings from unstructured text without additional configuration in Python.
- D
Create a Spark job in Oracle Data Flow to convert documents to embeddings on the fly and store them in an ephemeral index. Rely on periodic re-ingestion to refresh the vector index for RAG queries.
Show answer and explanation
Correct answer: A
Explanation
In a retrieval-augmented generation workflow on OCI, the typical sequence is: (1) create or obtain embeddings from documents using a Python library or OCI AI service, (2) index those embeddings in a vector-capable datastore like OCI Search Service with OpenSearch (configured for vector search), and (3) perform KNN or approximate nearest neighbor searches to retrieve top matches. Refer to the OCI Search Service with OpenSearch documentation for details on setting up vector search indices and running similarity queries.
- A. Correct.
Option 1 is correct because it follows a practical RAG pipeline: generate document embeddings in Python, configure vector search at index creation, and store both the embeddings and documents in the same OpenSearch index. Then use KNN queries to retrieve top matching vectors at runtime. This approach is supported by OCI Search Service with OpenSearch and avoids the need for manual nearest neighbor calculations.
- B. Incorrect.
Option 2 is incorrect because simply placing documents in Oracle Object Storage does not provide a native vector search feature. Uploading raw text to storage without embedding or indexing steps prevents direct similarity queries, and there is no built-in mechanism in Object Storage to generate or handle embeddings automatically.
- C. Incorrect.
Option 3 is incorrect because there is no built-in 'auto-embedding' feature in OCI Search Service with OpenSearch that automatically generates embeddings for you. You need to generate your own embeddings (e.g., via a Python library or OCI AI service) before indexing vectors for search.
- D. Incorrect.
Option 4 is incorrect because Oracle Data Flow does not maintain a permanent vector index within an ephemeral Spark job. While Data Flow can process and generate embeddings, you would still need a persistent store (e.g., OpenSearch) to perform queries against the vectors in real time. Relying on periodic re-ingestion alone is not suitable for an on-demand RAG workflow.