Google Professional Machine Learning Engineer Question 48
Select 3Google Cloud PlatformYou are tasked with building a Retrieval-Augmented Generation (RAG) based application on Google Cloud to provide users with accurate and contextually relevant answers to their queries. The application must use Vertex AI for the generative model and integrate with a vector database for efficient retrieval of relevant documents. Which of the following steps should you include in your implementation?
- A
Use Vertex AI to train a custom large language model (LLM) specifically for retrieval tasks.
- B
Integrate a managed vector database, such as Vertex AI Matching Engine, for efficient similarity search.
- C
Preprocess and vectorize your document corpus using an embedding model before storing it in the vector database.
- D
Deploy a pre-trained generative model using Vertex AI and fine-tune it for your domain-specific use case.
- E
Use Vertex AI Pipelines to automate the orchestration between retrieval and generation steps.
Show answer and explanation
Correct answers: B, C, D
Explanation
In a Retrieval-Augmented Generation (RAG) application, the retrieval component provides relevant documents or context, and the generation component formulates a response based on that context. For a GCP-based implementation, you should leverage Vertex AI Matching Engine for document retrieval, preprocess and vectorize the documents for similarity search, and use Vertex AI to deploy or fine-tune a generative model. Vertex AI Pipelines is optional for this workflow, and training a large LLM from scratch using Vertex AI is not a typical use case.
- A. Incorrect.
Vertex AI is not typically used to train large-scale custom LLMs from scratch. Instead, it is better suited for fine-tuning pre-trained models or deploying them for inference.
- B. Correct.
Using a managed vector database like Vertex AI Matching Engine allows you to efficiently perform similarity searches on your document embeddings, which is a key part of RAG applications.
- C. Correct.
Preprocessing and vectorizing the document corpus into embeddings is a crucial step for enabling semantic search in RAG systems.
- D. Correct.
Deploying and fine-tuning a pre-trained generative model using Vertex AI ensures that the model is adapted to your specific application requirements while leveraging existing advancements in generative AI.
- E. Incorrect.
While Vertex AI Pipelines can automate many workflows, it is not strictly necessary to orchestrate retrieval and generation steps in a RAG application. These steps can often be handled programmatically without pipeline orchestration.