Amazon AWS Certified Generative AI Developer – Professional AIP-C01 Practice Test Questions and Exam Dumps Part12 Q221-240

View Full Amazon AWS Certified Generative AI Developer – Professional AIP-C01 Exam Dumps and Practice Test Dumps

 

Question 221

Which technique allows a foundation model to receive a few examples of the desired task directly within the prompt?

  1. Fine-tuning
  2. Retrieval indexing
  3. Few-shot prompting
  4. Model quantization

Correct Answer: 3

Explanation

Few-shot prompting provides a model with several examples of the expected input and output pattern directly within the prompt. These examples help the model infer how to perform the requested task without requiring model retraining. It can be useful for classification, formatting, extraction, and other tasks where examples clearly communicate the desired behavior. Fine-tuning changes model behavior through additional training, while retrieval indexing focuses on finding relevant information. Quantization is a model optimization technique rather than a prompting strategy.

Question 222

A developer needs a workflow in which several independent processing tasks execute at the same time before a final aggregation step. Which capability is most appropriate?

  1. Sequential execution only
  2. Parallel workflow execution
  3. Manual approval for every task
  4. Single-threaded prompt generation

Correct Answer: 2

Explanation

Parallel workflow execution allows independent tasks to run concurrently rather than waiting for each task to finish sequentially. This can significantly reduce total processing time when the tasks do not depend on one another. After the parallel branches complete, an aggregation step can combine their results. AWS Step Functions can support parallel workflow patterns and coordinate downstream processing. Sequential execution may increase latency unnecessarily, while manual approval or single-threaded execution does not provide an efficient solution for large numbers of independent operations.

Question 223

A RAG application uses one embedding model during ingestion and a different incompatible embedding model for user queries. What problem is most likely to occur?

  1. Improved encryption
  2. Faster API authentication
  3. Incorrect or poor similarity matching
  4. Automatic data synchronization

Correct Answer: 3

Explanation

Documents and queries used for vector similarity search should generally be represented using compatible embedding models and configurations. If documents are embedded using one model while queries are generated using an incompatible model, their vector representations may not be meaningfully comparable. This can result in poor retrieval quality even when the correct documents exist in the index. The developer should maintain embedding-model consistency and re-index existing data when changing embedding strategies if necessary. Encryption, authentication, and synchronization are separate architectural concerns.

Question 224

Which feature is most useful when an application needs to prevent certain categories of unsafe content from being generated or returned?

  1. Bedrock Guardrails
  2. Amazon S3 lifecycle rules
  3. AWS CloudFormation
  4. Amazon DynamoDB Streams

Correct Answer: 1

Explanation

Amazon Bedrock Guardrails provides controls designed to help applications manage undesirable content and apply configurable safety policies to generative AI interactions. Depending on the configuration, guardrails can help address harmful content, denied topics, sensitive information, and other application-specific safety requirements. Guardrails should complement, rather than replace, authentication, authorization, input validation, and application-level security controls. S3 lifecycle rules manage stored objects, CloudFormation provisions resources, and DynamoDB Streams captures database changes. Guardrails are specifically relevant to generative AI safety enforcement.

Question 225

A developer wants an AI application to produce machine-readable JSON that follows a predefined structure. Which approach is most appropriate?

  1. Allow completely unrestricted responses
  2. Increase temperature substantially
  3. Remove output validation
  4. Use structured output instructions and validate the result

Correct Answer: 4

Explanation

Structured output instructions can tell the model to produce data according to a defined JSON schema or format. However, applications should still validate the generated response before using it programmatically. Validation can detect malformed JSON, missing fields, invalid values, or unexpected content. Depending on the model and application architecture, supported structured-output capabilities can provide additional reliability. Unrestricted generation and higher randomness can make parsing less predictable. Combining clear formatting requirements with programmatic validation provides a stronger approach for production applications.

Question 226

A developer wants to adapt a foundation model to consistently perform a specialized task using a collection of high-quality examples. Which approach may be appropriate when prompting alone is insufficient?

  1. Model customization or fine-tuning
  2. Increasing CloudTrail retention
  3. Changing the S3 storage class
  4. Adding more IAM users

Correct Answer: 1

Explanation

Model customization or fine-tuning can be considered when an application requires more consistent behavior for a specialized task and prompt engineering alone does not provide adequate results. A carefully prepared training dataset is essential because poor-quality or inconsistent examples can negatively affect the customized model. Developers should evaluate whether customization provides sufficient benefits compared with prompt engineering, RAG, or model selection. CloudTrail retention, S3 storage classes, and IAM user counts do not directly change how a foundation model learns a specialized task.

Question 227

An AI agent receives a tool response containing unexpected fields and values. What should the application do before using the data in a subsequent sensitive operation?

  1. Trust the response automatically
  2. Validate and sanitize the tool output
  3. Increase model temperature
  4. Disable authorization checks

Correct Answer: 2

Explanation

Tool outputs should be treated as untrusted data and validated before they influence sensitive actions. The application can check expected fields, data types, ranges, formats, and authorization requirements before passing information to another tool or executing an operation. This reduces the risk of malformed data, malicious content, or unexpected tool behavior propagating through an agent workflow. Model instructions alone are insufficient as a security boundary. Output validation should therefore be combined with least-privilege permissions and independent authorization checks.

Question 228

A company needs to define AWS infrastructure for its generative AI application in a repeatable way across development and production environments. Which approach is most appropriate?

  1. Configure every resource manually
  2. Use infrastructure as code
  3. Store infrastructure credentials in prompts
  4. Rebuild resources from memory

Correct Answer: 2

Explanation

Infrastructure as code allows AWS resources and their configuration to be defined in reusable templates or code. This improves consistency, repeatability, reviewability, and deployment automation across environments. It also supports integration with CI/CD pipelines and helps reduce configuration drift caused by manual changes. AWS CloudFormation and related infrastructure-as-code approaches can be used to provision application resources. Manual configuration is more error-prone and difficult to reproduce. Infrastructure definitions should also follow security and least-privilege principles.

Question 229

A RAG application retrieves documents using metadata such as department, region, and document type. What is a major benefit of this approach?

  1. It can restrict retrieval to relevant subsets of data
  2. It automatically increases model intelligence
  3. It eliminates the need for embeddings in every architecture
  4. It removes all authentication requirements

Correct Answer: 1

Explanation

Metadata filtering allows a retrieval system to narrow results according to attributes associated with documents. For example, an application could retrieve only documents belonging to a user’s department or a specific geographic region. This can improve retrieval relevance and help enforce data-isolation requirements when implemented with proper authorization controls. Metadata filtering does not make the foundation model inherently more intelligent and does not eliminate authentication. It should be combined with appropriate access-control mechanisms to ensure that filtering cannot be bypassed by malicious or unexpected requests.

Question 230

Which strategy can help reduce repeated processing costs when the same prompt and context are frequently submitted to a generative AI system?

  1. Increasing context size
  2. Prompt or response caching where appropriate
  3. Disabling monitoring
  4. Increasing model temperature

Correct Answer: 2

Explanation

Caching can reduce unnecessary repeated processing when identical or sufficiently equivalent requests occur frequently. Depending on the application and supported architecture, prompt or response caching can reduce latency and inference costs. Developers must ensure that cached results remain valid and that sensitive or user-specific information is not incorrectly shared between users. Cache keys, expiration policies, and access boundaries should be carefully designed. Increasing context size can increase costs, while temperature affects generation behavior and monitoring should remain available for operational visibility.

Question 231

A developer is building an agent that must perform a sequence of actions based on intermediate results. Which characteristic distinguishes an agentic workflow from a simple single model invocation?

  1. It can reason about a task and invoke tools or actions iteratively
  2. It never interacts with external systems
  3. It always produces the same response
  4. It requires no authorization controls

Correct Answer: 1

Explanation

An agentic workflow can use model reasoning to determine actions, invoke available tools, inspect results, and continue toward a goal. Unlike a simple single model invocation, an agent may perform multiple steps based on intermediate results. However, agentic behavior introduces additional security and reliability considerations because tool access can have real-world effects. Each action should therefore be constrained by appropriate permissions, validation, and monitoring. Agents do not automatically have authorization to perform every operation simply because the model requests it.

Question 232

A company wants to ensure that an AI application can recover from temporary downstream service failures without immediately failing the entire workflow. Which mechanism is most appropriate?

  1. Disable all error handling
  2. Increase the prompt length
  3. Use controlled retries with exponential backoff
  4. Give the application administrator permissions

Correct Answer: 3

Explanation

Controlled retries with exponential backoff can help an application recover from transient failures such as temporary throttling or service unavailability. Exponential backoff increases the waiting interval between attempts, while jitter can help prevent many clients from retrying simultaneously. Retry limits should be configured to prevent infinite loops and unnecessary costs. Applications should also distinguish transient failures from permanent errors that should not be retried. Prompt length and IAM administrator permissions do not provide resilience against downstream service failures.

Question 233

A developer wants to verify that an AI application’s answers are supported by retrieved source documents. Which evaluation dimension is most directly relevant?

  1. Groundedness
  2. Storage utilization
  3. Network bandwidth
  4. IAM policy size

Correct Answer: 1

Explanation

Groundedness evaluates whether a generated response is supported by the information available to the model, such as retrieved documents in a RAG workflow. High groundedness is important for applications where unsupported claims can create business, legal, or operational risks. Developers can evaluate responses against trusted reference information and identify unsupported statements. Storage utilization and network bandwidth can affect infrastructure performance, while IAM policy size concerns authorization configuration. They do not directly measure whether generated content is supported by retrieved evidence.

Question 234

A production application needs to detect when model invocation latency exceeds an acceptable threshold. Which capability should the developer configure?

  1. S3 versioning
  2. CloudWatch alarm
  3. KMS key policy
  4. DynamoDB partition key

Correct Answer: 2

Explanation

A CloudWatch alarm can monitor a selected metric and trigger an alert when that metric crosses a defined threshold. For generative AI workloads, teams can monitor metrics related to latency, errors, throttling, resource utilization, and application-specific performance indicators. Alerts can help operations teams investigate problems before they significantly affect users. S3 versioning protects object versions, KMS key policies control key access, and DynamoDB partition keys determine data distribution. None of those capabilities directly provides threshold-based operational alerting.

Question 235

A developer is designing a prompt for a model that must classify support tickets into predefined categories. Which prompt design is likely to improve consistency?

  1. Clearly define the categories and expected output format
  2. Ask the model to invent new categories
  3. Provide no classification criteria
  4. Require lengthy explanations for every classification

Correct Answer: 1

Explanation

Classification prompts should clearly describe the available categories, provide criteria for distinguishing them, and specify the expected output format. This reduces ambiguity and helps the model produce consistent results. Examples can also be included when useful, particularly when category boundaries are difficult to communicate through descriptions alone. Allowing the model to invent categories defeats the purpose of a predefined classification system. Requiring unnecessary explanations can increase output tokens and complicate downstream processing. The final classification should also be validated against application requirements.

Question 236

A company wants to expose a generative AI capability to multiple internal applications while applying authentication, throttling, and request controls. Which AWS service is a suitable API front door?

  1. AWS Lambda
  2. Amazon S3
  3. Amazon API Gateway
  4. AWS KMS

Correct Answer: 3

Explanation

Amazon API Gateway can provide a managed front door for APIs and support capabilities such as authentication integration, throttling, request handling, monitoring, and traffic management. It can be integrated with services such as Lambda and other backend components to expose generative AI functionality to internal or external applications. Lambda provides compute execution, S3 provides object storage, and KMS manages encryption keys. API Gateway can therefore help establish a controlled interface between clients and AI application backends.

Question 237

A RAG application has excellent retrieval recall but frequently includes irrelevant passages in the final context. Which improvement should the developer consider?

  1. Remove all metadata
  2. Increase the number of retrieved results indefinitely
  3. Apply reranking or improve retrieval precision
  4. Disable evaluation

Correct Answer: 3

Explanation

High recall means that relevant information is generally being retrieved, but excessive irrelevant content indicates that retrieval precision may need improvement. Reranking can reorder candidate documents according to relevance, while better metadata filtering, query formulation, similarity thresholds, and top-k configuration can reduce unnecessary context. Increasing the number of retrieved documents indefinitely can make the problem worse by adding more irrelevant information and increasing token usage. Evaluation should continue so developers can measure whether retrieval changes improve both relevance and downstream answer quality.

Question 238

Which practice helps prevent secrets from being accidentally exposed through source code repositories?

  1. Hard-code API keys in application files
  2. Store secrets in a managed secrets service
  3. Include passwords in prompts
  4. Put credentials in public configuration files

Correct Answer: 2

Explanation

Managed secrets services such as AWS Secrets Manager provide a safer mechanism for storing credentials, API keys, and other sensitive information. Applications can retrieve secrets when required while access is controlled through IAM permissions. This avoids embedding long-lived credentials directly in source code or public configuration files. Developers should also use secret rotation where appropriate and ensure that secrets are not accidentally written to logs. Hard-coded credentials and credentials included in prompts create unnecessary exposure and should be avoided.

Question 239

A developer needs to determine whether a new prompt version improves answer quality without increasing cost excessively. Which evaluation should be performed?

  1. Evaluate only visual appearance
  2. Measure quality and relevant cost metrics together
  3. Ignore token usage
  4. Test only the shortest possible prompt

Correct Answer: 2

Explanation

Prompt optimization should consider both response quality and operational cost. A new prompt might improve accuracy or groundedness while substantially increasing input or output tokens, making it unsuitable for production. Developers should evaluate representative queries and compare quality metrics with token usage, latency, and other relevant costs. Testing only a few simple examples can produce misleading results. A balanced evaluation provides evidence about whether the prompt delivers enough additional value to justify its operational impact.

Question 240

A developer wants to ensure that a model does not follow malicious instructions embedded inside retrieved documents. Which design approach is most appropriate?

  1. Treat retrieved content as trusted system instructions
  2. Clearly separate trusted instructions from untrusted retrieved content
  3. Give retrieved documents administrator permissions
  4. Remove all authentication from the application

Correct Answer: 2

Explanation

Retrieved documents should generally be treated as untrusted data rather than trusted instructions. A secure prompt architecture should clearly distinguish system or developer instructions from retrieved content and explicitly tell the model how that content should be used. Additional protections such as input filtering, Bedrock Guardrails, tool authorization, and output validation can provide defense in depth. Treating retrieved text as authoritative instructions can expose the application to indirect prompt injection. Security controls should remain enforced outside the model wherever possible.