CAISP · Domain 1 of 5 · 15% of the exam

CAISP Domain 1: AI Systems and Attack Surface

30 free practice questions for AI Systems and Attack Surface in the Certified AI Security Professional exam. Try each question first, then open "Show answer" for the correct option and explanation.

AI Systems and Attack Surface practice questions

  1. Question 1. In a retrieval-augmented generation (RAG) system, what does the retrieval step do?

    1. Compresses the model for faster inference
    2. Retrains the model weights on new documents
    3. Encrypts user prompts before sending them
    4. Fetches relevant documents to add to the model's prompt
    Show answer

    Answer: D. Fetches relevant documents to add to the model's prompt

    RAG retrieves relevant content (often from a vector database) and inserts it into the prompt so the model can ground its answer, without changing the model's weights.

  2. Question 2. Why does a RAG pipeline expand an LLM application's attack surface?

    1. RAG stores user passwords inside embeddings
    2. RAG requires the model to run without authentication
    3. Retrieved content enters the prompt and can carry injected instructions
    4. RAG disables the model's safety training entirely
    Show answer

    Answer: C. Retrieved content enters the prompt and can carry injected instructions

    Anything retrieved becomes model input. Poisoned or attacker-controlled documents can inject instructions or misinformation (indirect prompt injection).

  3. Question 3. What is an embedding in the context of LLM applications?

    1. A digital signature attached to a model file
    2. A container image that bundles the model
    3. An encrypted copy of the system prompt
    4. A numeric vector representing the meaning of text
    Show answer

    Answer: D. A numeric vector representing the meaning of text

    Embeddings map text (or other data) to vectors so that semantically similar items are close together, enabling similarity search in vector databases.

  4. Question 4. What makes LLM agents that can call tools and APIs riskier than a chat-only model?

    1. Agents can't use any form of authentication
    2. Agents always run with internet access disabled
    3. Model output can trigger real actions in other systems
    4. Agents store every conversation in plaintext logs
    Show answer

    Answer: C. Model output can trigger real actions in other systems

    When outputs drive tool calls (sending email, running code, changing records), a manipulated model can cause real-world impact, so permissions and approvals matter.

  5. Question 5. Why can't an LLM reliably separate trusted instructions from untrusted data in its prompt?

    1. LLMs encrypt instructions but not user data
    2. System prompts are always discarded before inference
    3. Tokenizers remove all punctuation from data
    4. Instructions and data share one natural-language input channel
    Show answer

    Answer: D. Instructions and data share one natural-language input channel

    Unlike SQL with parameterized queries, LLMs have no hard boundary between instructions and data. This is the root cause of prompt injection.

  6. Question 6. What is a system prompt?

    1. The first question a user types in a session
    2. The operating system's command-line prompt
    3. A log of all prompts sent to the model
    4. Developer-provided instructions that set the model's behavior
    Show answer

    Answer: D. Developer-provided instructions that set the model's behavior

    System prompts define role, rules, and context. They should not be treated as a security boundary or a place to store secrets.

  7. Question 7. Which statement about LLM output is MOST accurate from a security perspective?

    1. It can be trusted if the prompt came from an employee
    2. It is safe to execute because the model was safety-trained
    3. It should be treated as untrusted input by downstream systems
    4. It only needs validation when displayed to external users
    Show answer

    Answer: C. It should be treated as untrusted input by downstream systems

    Model output can be influenced by attackers, so it must be validated, encoded, or sandboxed before being rendered, executed, or passed to other systems.

  8. Question 8. What is the main security concern with fine-tuning a model on internal company documents?

    1. Fine-tuning always removes the model's safety guardrails
    2. Fine-tuning disables logging of model requests
    3. The model may memorize and later reveal sensitive training data
    4. Fine-tuned models can't be deployed behind an API
    Show answer

    Answer: C. The model may memorize and later reveal sensitive training data

    Models can memorize and regurgitate training data. Sensitive data should be minimized, filtered, or de-identified before training, and outputs monitored.

  9. Question 9. In a multi-tenant RAG application, what is the MOST important control for the vector database?

    1. Enforcing per-user or per-tenant access filters on retrieval
    2. Storing embeddings in a single shared index for speed
    3. Using the largest available embedding dimension
    4. Letting the LLM decide which documents a user may see
    Show answer

    Answer: A. Enforcing per-user or per-tenant access filters on retrieval

    Retrieval must respect the requesting user's permissions. Otherwise the model may surface documents the user isn't authorized to see. The model itself can't enforce access control.

  10. Question 10. An attacker sends extremely long or complex prompts to drive up an AI service's compute costs and slow it for others. What is this called?

    1. Membership inference against training data
    2. Training-time data poisoning
    3. Model denial of service or unbounded consumption
    4. Model inversion through repeated querying
    Show answer

    Answer: C. Model denial of service or unbounded consumption

    Resource-exhausting inputs cause denial of service and "denial of wallet". Mitigations include input limits, rate limiting, quotas, and timeouts.

  11. Question 11. What is a model's context window?

    1. The number of GPUs used for inference
    2. The maximum amount of text (tokens) it can consider at once
    3. The time window during which the model can be queried
    4. The set of users allowed to access the model
    Show answer

    Answer: B. The maximum amount of text (tokens) it can consider at once

    Everything the model uses to generate a response, including system prompt, history, and retrieved data, must fit in the context window.

  12. Question 12. What does the temperature setting control in an LLM?

    1. The randomness of token selection in generated output
    2. The number of users who can connect
    3. The physical temperature of the GPU cluster
    4. The strength of the model's encryption
    Show answer

    Answer: A. The randomness of token selection in generated output

    Lower temperature makes output more deterministic. Higher temperature increases variety and unpredictability.

  13. Question 13. What is the key difference between fine-tuning and RAG?

    1. Neither affects what the model knows
    2. Fine-tuning changes model weights; RAG adds data to the prompt at runtime
    3. RAG changes model weights; fine-tuning adds data to prompts
    4. Both permanently retrain the base model
    Show answer

    Answer: B. Fine-tuning changes model weights; RAG adds data to the prompt at runtime

    This affects security: fine-tuned data can be memorized in weights, while RAG data depends on retrieval access controls.

  14. Question 14. What is the Model Context Protocol (MCP) primarily used for?

    1. Connecting LLM applications to external tools and data sources
    2. Scoring models on accuracy benchmarks
    3. Encrypting prompts between client and server
    4. Compressing model weights for mobile devices
    Show answer

    Answer: A. Connecting LLM applications to external tools and data sources

    MCP standardizes how assistants discover and call tools. Each connected server expands the attack surface and needs trust and permission controls.

  15. Question 15. An agent connects to a third-party MCP server whose tool descriptions contain hidden instructions. What is this risk called?

    1. Model inversion through tool outputs
    2. Membership inference via tool calls
    3. Gradient leakage from the tool server
    4. Tool poisoning through malicious tool metadata
    Show answer

    Answer: D. Tool poisoning through malicious tool metadata

    Tool descriptions enter the model's context, so malicious metadata can steer the agent. Vet and pin trusted tool servers.

  16. Question 16. What is function calling in LLM applications?

    1. The model automatically retrains itself
    2. Users call the model provider by phone
    3. The model compiles and runs its own source code
    4. The model outputs structured requests that the app executes as tool calls
    Show answer

    Answer: D. The model outputs structured requests that the app executes as tool calls

    The application, not the model, executes functions. It must validate parameters and enforce authorization.

  17. Question 17. What is the security purpose of an LLM gateway placed between applications and model providers?

    1. Replace the need for input validation in apps
    2. Store model weights for offline use
    3. Increase the model's context window size
    4. Centralize authentication, logging, rate limits, and policy checks
    Show answer

    Answer: D. Centralize authentication, logging, rate limits, and policy checks

    Gateways provide a single control point for monitoring, quotas, data protection, and provider access keys.

  18. Question 18. What is the difference between open-weight and closed (API-only) models from a security perspective?

    1. Open weights can be inspected and self-hosted but also studied by attackers
    2. Open-weight models can't be fine-tuned
    3. Closed models never process user data
    4. Closed models can be downloaded and modified freely
    Show answer

    Answer: A. Open weights can be inspected and self-hosted but also studied by attackers

    Open weights give control and transparency. They also enable white-box attacks and require self-managed security.

  19. Question 19. In a multi-agent system, why should each agent have its own scoped permissions?

    1. Agents can't communicate otherwise
    2. A compromised agent then can't abuse other agents' capabilities
    3. It makes responses more creative
    4. It reduces the total number of API calls
    Show answer

    Answer: B. A compromised agent then can't abuse other agents' capabilities

    Least privilege per agent limits the blast radius when one agent is manipulated.

  20. Question 20. What is a 'confused deputy' problem in an LLM agent context?

    1. Two agents disagree on the correct answer
    2. A model forgets its system prompt
    3. An API key expires during a session
    4. A privileged agent is tricked into acting on an attacker's behalf
    Show answer

    Answer: D. A privileged agent is tricked into acting on an attacker's behalf

    Agents with more privileges than users can be manipulated into performing actions the attacker couldn't do directly.

  21. Question 21. Why is an internally exposed model inference endpoint without authentication a risk?

    1. It prevents the platform from logging any requests
    2. It makes the model respond noticeably more slowly
    3. Anyone on the network could query, abuse, or extract it
    4. It automatically deletes the model's training data
    Show answer

    Answer: C. Anyone on the network could query, abuse, or extract it

    Inference endpoints need authentication, authorization, and rate limiting like any other API.

  22. Question 22. What is a model registry used for in MLOps?

    1. Storing, versioning, and controlling access to approved models
    2. Tracking electricity usage of GPUs
    3. Publishing models to social media
    4. Registering users for a chatbot service
    Show answer

    Answer: A. Storing, versioning, and controlling access to approved models

    Registries provide lineage and approval workflows, so they are a key integrity control point.

  23. Question 23. Why can an LLM hallucinate plausible but false information?

    1. It intentionally lies to protect its training data
    2. It generates statistically likely text rather than verifying facts
    3. Hallucinations only occur when temperature is zero
    4. It's always connected to incorrect websites
    Show answer

    Answer: B. It generates statistically likely text rather than verifying facts

    LLMs predict tokens. Grounding, verification, and user awareness reduce reliance on unverified output.

  24. Question 24. Which component of an AI system is the MOST valuable target for an attacker seeking intellectual property?

    1. Trained model weights
    2. The chat interface's CSS
    3. Public documentation
    4. The logo image
    Show answer

    Answer: A. Trained model weights

    Weights embody the investment in data and training. Their theft enables copying, misuse, or white-box attacks.

  25. Question 25. What is transfer learning?

    1. Reusing a model trained on one task as a starting point for another
    2. Moving a deployed model from one cloud provider to another
    3. Sending one model's outputs directly into another model
    4. Transferring user data between two separate applications
    Show answer

    Answer: A. Reusing a model trained on one task as a starting point for another

    Fine-tuning pretrained models is common. It also means base-model weaknesses or backdoors can be inherited.

  26. Question 26. Which is an example of an AI system's inference-time attack surface?

    1. The team's project plan
    2. The hardware purchase contract
    3. The dataset used to pretrain the base model
    4. User prompts and inputs sent to the deployed model
    Show answer

    Answer: D. User prompts and inputs sent to the deployed model

    Inference-time attacks (injection, evasion, extraction) target the deployed model through its inputs and outputs.

  27. Question 27. Which is an example of an AI system's training-time attack surface?

    1. The HTTPS certificate on the product website
    2. The chat user interface shown to customers
    3. The browser extensions installed by end users
    4. The datasets and pipelines used to train or fine-tune it
    Show answer

    Answer: D. The datasets and pipelines used to train or fine-tune it

    Training-time attacks such as poisoning and backdoors corrupt data or training processes.

  28. Question 28. Why is logging full prompts and responses for an LLM application a double-edged control?

    1. Prompt logs can't be searched or analyzed afterward
    2. Logs aid investigations but may capture sensitive data
    3. Logging makes the model hallucinate more frequently
    4. Logging prompts is prohibited under all privacy laws
    Show answer

    Answer: B. Logs aid investigations but may capture sensitive data

    Logs are essential for detecting abuse, but they must be protected, minimized, or redacted to avoid creating a new data exposure.

  29. Question 29. What is the purpose of structured output (e.g., a JSON schema) in LLM applications?

    1. Constrain responses to a format that code can validate
    2. Hide the system prompt from users of the application
    3. Increase the randomness and variety of model responses
    4. Train the model on new data gathered from each request
    Show answer

    Answer: A. Constrain responses to a format that code can validate

    Schema-constrained output makes validation easier and reduces the risk of unexpected content reaching other systems.

  30. Question 30. What is an embedding inversion attack?

    1. Flipping labels in a training dataset
    2. Reversing the order of documents in a database
    3. Reconstructing original text from its vector embedding
    4. Inverting colors in an image input
    Show answer

    Answer: C. Reconstructing original text from its vector embedding

    Embeddings can leak information about the source text, so vector stores containing sensitive data need protection.

CAISP is a certification offered by Practical DevSecOps. These questions are original study material, not questions from the real exam.