Courseiva
Security →hardMultiple Select

CCDV-F Security Practice Question

Which TWO of the following are effective ways to protect sensitive data when building a RAG (Retrieval-Augmented Generation) pipeline?

⚠ Common exam trap

Candidates often assume that simply adding a system prompt instruction to 'ignore sensitive data' is sufficient, failing to realize that RAG pipelines require architectural enforcement like ABAC and data masking.

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

✓

Apply attribute-based access control (ABAC) to the vector database queries.

Protecting data in a RAG pipeline requires securing both the retrieval process and the generation process. Access control at the retrieval stage ensures that users only query information they are authorized to see. Simultaneously, data minimization during the augmentation phase prevents sensitive information from being unnecessarily exposed to the model. These steps are crucial because RAG systems often bridge the gap between secure databases and generative models, creating a high-risk surface for accidental data leakage.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Index all documents regardless of user access permissions.

    Why it's wrong here

    Indexing all documents without regard for access controls is a major security flaw. If the retrieval system does not respect existing permissions, any user could potentially query sensitive data that they should not have access to. Access control must be enforced at the document-indexing or retrieval-query level.

  • ✓

    Apply attribute-based access control (ABAC) to the vector database queries.

    Why this is correct

    Implementing ABAC ensures that the search results returned to the model are restricted based on user identity and context. This prevents unauthorized users from retrieving sensitive documents, ensuring that the RAG pipeline only provides information that is appropriately scoped to the user's privilege level within the organization.

  • ✗

    Include the entire enterprise document store in the prompt context.

    Why it's wrong here

    Passing the entire document store into the prompt context is an extreme security risk and technically impractical. It risks overwhelming the model's context window, increasing costs, and significantly raising the likelihood of leaking sensitive information by providing the model with more data than it needs for a specific query.

  • ✓

    Mask sensitive data in the retrieved context before sending it to the model.

    Why this is correct

    Redacting or masking PII and sensitive data before sending it to the model is a strong data minimization strategy. If the model does not receive the sensitive data, it cannot leak it, regardless of any potential prompt injection or security issues within the model's environment. This provides powerful defense-in-depth.

  • ✗

    Store all retrieved documents in plain text within the application code.

    Why it's wrong here

    Storing documents in plaintext within application code is a security nightmare that leads to credential exposure and data breaches. All sensitive data must be handled in secure, encrypted storage and retrieved dynamically through authorized channels only when needed, never hardcoded into the application's logic or source files.

About these practice questions

One of 257 original CCDV-F 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

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Anthropic exam blueprint

This CCDV-F practice question is part of Courseiva's free Anthropic 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 CCDV-F exam.