Courseiva
Fundamentals of Generative AIhardMultiple ChoiceObjective-mapped

RAG for Proprietary Data Privacy

A company has a large dataset of proprietary documents and wants to build a Q&A system using a foundation model without exposing the documents to the model. Which approach is most appropriate?

Quick Answer

The correct answer is to use RAG with Vertex AI Vector Search and embeddings. This approach is most appropriate because Retrieval-Augmented Generation allows the system to convert proprietary documents into vector embeddings stored in a vector database, then retrieve only the most relevant chunks for the foundation model’s prompt, keeping the full documents isolated and never exposed to the model for training or memorization. On the Google Cloud Generative AI Leader exam, this scenario tests your understanding of how to balance data privacy with generative AI capabilities, often appearing as a trap where candidates might incorrectly choose fine-tuning or direct model access. The key insight is that RAG acts as a privacy buffer: the model sees only the retrieved context, not the raw documents. Memory tip: think of RAG as a librarian who brings you a relevant page from a locked vault—you never see the vault itself.

⚠ Common exam trap

Google Cloud often tests the misconception that fine-tuning or prompt engineering can solve data privacy concerns, when in reality RAG is the only approach that keeps proprietary documents isolated from the model's training and inference pipeline.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Use RAG with Vertex AI Vector Search and embeddings

Retrieval-Augmented Generation (RAG) with Vertex AI Vector Search allows the system to retrieve relevant document chunks via embeddings without exposing the full documents to the foundation model. The model only sees the retrieved context in the prompt, ensuring proprietary data remains isolated and not used for training or memorization.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use RAG with Vertex AI Vector Search and embeddings

    Why this is correct

    RAG retrieves documents at query time without training on them.

  • Use a zero-shot model with context in prompt

    Why it's wrong here

    Zero-shot with context is limited by context length and may not scale.

  • Fine-tune the model on the documents

    Why it's wrong here

    Fine-tuning embeds data into the model, risking exposure.

  • Use prompt engineering to instruct the model

    Why it's wrong here

    Prompt engineering alone cannot handle large volumes of proprietary data effectively.

About these practice questions

One of 683 original Generative AI Leader practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

3 more ways this is tested on Generative AI Leader

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A startup is building a customer service chatbot that generates responses in real-time. They want the model to have up-to-date information on the latest product catalog but cannot afford frequent fine-tuning. Which technique should they use to inject current data into the model without retraining?

easy
  • A.Rely on the model's zero-shot capabilities to infer product details.
  • B.Use retrieval-augmented generation (RAG) to fetch relevant documents from a vector database at inference time.
  • C.Craft detailed system prompts that include the entire product catalog in the prompt.
  • D.Fine-tune the base model weekly on the latest product catalog.

Why B: Retrieval-Augmented Generation (RAG) is the correct technique because it allows the chatbot to fetch the most current product catalog entries from an external vector database at inference time, without requiring any model retraining. This keeps responses grounded in up-to-date information while avoiding the cost and latency of frequent fine-tuning.

Variation 2. A startup is building a customer support chatbot using Vertex AI and wants to ground responses in their product documentation to reduce hallucinations. Which approach should they use?

easy
  • A.Enable Vertex AI Grounding with a custom enterprise data store containing the documentation.
  • B.Use the Codey API for text generation.
  • C.Use the base model without any grounding to maximize flexibility.
  • D.Fine-tune the model on the documentation and deploy.

Why A: Vertex AI Grounding with a custom enterprise data store is the correct approach because it allows the chatbot to retrieve and cite specific chunks from the product documentation in real time, directly reducing hallucinations by constraining responses to verified content. This method uses the underlying grounding service to query a vector-based data store (powered by Vertex AI Search) and append source references to the model's output, ensuring factual accuracy without retraining.

Variation 3. A healthcare company is building a clinical decision support system using Gemini 1.5 Pro on Vertex AI. They need responses that are highly accurate and comply with medical regulations, including traceability to source documents. They have a large corpus of curated medical guidelines stored in PDFs in Cloud Storage. Their team has experience with both fine-tuning and prompt engineering. Which approach best ensures regulatory compliance and accuracy?

medium
  • A.Use a combination of grounding to the medical guidelines and prompt engineering with system instructions specifying compliance requirements.
  • B.Use prompt engineering with system instructions and few-shot examples, but no grounding.
  • C.Use grounding to the medical guidelines but rely on prompt engineering only for compliance instructions.
  • D.Fine-tune the model on the medical guidelines corpus to internalize the knowledge.

Why A: Grounding the model to the curated medical guidelines in Cloud Storage ensures responses are directly traceable to source documents, which is critical for medical regulatory compliance. Combining this with system instructions that specify compliance requirements (e.g., HIPAA, FDA guidelines) enforces behavioral constraints without altering the model's weights, maintaining accuracy and auditability.

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This Generative AI Leader practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Generative AI Leader exam.