View Full Amazon AWS Certified Generative AI Developer – Professional AIP-C01 Exam Dumps and Practice Test Dumps
Question 261
A developer wants to ensure that a generative AI application can automatically recover when a temporary model invocation failure occurs. Which approach is most appropriate?
- Disable all error handling
- Increase the prompt size
- Remove application monitoring
- Implement controlled retries with backoff
Correct Answer: 4
Explanation
Controlled retries with backoff can help applications recover from transient failures such as temporary throttling or service interruptions. Instead of repeatedly sending requests immediately, the application waits between attempts, often using exponential backoff and jitter. A maximum retry count should also be established to prevent endless retries and unnecessary costs. Developers should distinguish between temporary errors that may succeed after another attempt and permanent errors that require different handling. Monitoring should remain enabled so retry frequency and failure patterns can be analyzed in production.
Question 262
Which AWS service is designed to provide a managed environment for developing, training, customizing, and deploying machine learning models?
- Amazon SageMaker AI
- Amazon CloudWatch
- AWS Secrets Manager
- Amazon Route 53
Correct Answer: 1
Explanation
Amazon SageMaker AI provides capabilities for developing, training, customizing, evaluating, and deploying machine learning models. It can be useful when an organization needs more control over model development or deployment than a fully managed foundation-model API provides. Developers can use SageMaker capabilities alongside other AWS services as part of broader AI architectures. CloudWatch focuses on monitoring, Secrets Manager manages sensitive credentials, and Route 53 provides DNS services. The appropriate service depends on whether the workload requires model customization, deployment control, or managed foundation-model access.
Question 263
A RAG application needs to retrieve only documents that belong to a user’s authorized department. Which mechanism should be used during retrieval?
- Increasing temperature
- Metadata filtering combined with authorization
- Increasing output tokens
- Disabling vector search
Correct Answer: 2
Explanation
Metadata filtering can restrict retrieval results based on attributes such as department, tenant, region, or document classification. However, filtering should be backed by trusted authorization controls so that users cannot manipulate request parameters to bypass access restrictions. This design helps ensure that unauthorized documents are not provided to the model as context. Increasing temperature and output tokens affect generation rather than access control. Disabling vector search may unnecessarily remove semantic retrieval capabilities. Secure RAG architectures should enforce authorization independently of model instructions.
Question 264
A developer is designing a production RAG system and wants to verify whether retrieved documents are actually useful for answering user queries. What should be measured?
- Only model temperature
- S3 storage utilization
- Retrieval quality metrics
- IAM policy length
Correct Answer: 3
Explanation
Retrieval quality metrics help determine whether the RAG pipeline is finding the information needed to answer user questions. Depending on the evaluation design, developers can measure metrics such as recall, precision, relevance, or ranking quality using representative queries and known relevant documents. Poor retrieval can lead to incorrect answers even when the foundation model itself performs well. Temperature, storage utilization, and IAM policy length do not directly measure retrieval effectiveness. Retrieval evaluation should be performed before and after changes to chunking, embeddings, filtering, or ranking.
Question 265
A company wants to reduce the number of tokens sent to a foundation model while preserving the most relevant information. Which strategy is most appropriate?
- Select and rerank only relevant context
- Add every available document to the prompt
- Increase the number of few-shot examples indefinitely
- Duplicate retrieved passages
Correct Answer: 1
Explanation
Selecting only relevant context reduces unnecessary input tokens while preserving information needed to answer the query. Retrieval systems can use top-k selection, metadata filters, similarity thresholds, and reranking to identify the most useful passages. This can reduce latency and inference costs while potentially improving answer quality by removing distracting information. Adding every available document increases context size and may exceed model limits. Developers should validate that context reduction does not remove important evidence by using representative retrieval and answer-quality evaluations.
Question 266
An AI application must securely call an external API using a credential that should not be visible in source code. Which approach is best?
- Put the credential in the prompt
- Store it in AWS Secrets Manager
- Hard-code it in Lambda
- Place it in a public S3 object
Correct Answer: 2
Explanation
AWS Secrets Manager provides a secure mechanism for storing credentials and retrieving them when required by an application. Access can be restricted using IAM permissions, allowing only authorized workloads to retrieve the secret. This prevents sensitive credentials from being embedded directly in source code, prompts, or publicly accessible configuration files. Applications should also avoid logging secret values and should implement rotation when appropriate. Hard-coded or publicly stored credentials create significant security risks and can lead to unauthorized access to external services.
Question 267
A developer is testing an AI application with a fixed evaluation dataset. A prompt change improves relevance but increases hallucinations. What should the developer do?
- Deploy immediately because relevance improved
- Ignore hallucinations
- Evaluate the trade-off and revise the prompt or architecture
- Remove the evaluation dataset
Correct Answer: 3
Explanation
Generative AI optimization requires balancing multiple quality dimensions rather than improving one metric at the expense of another. If a prompt increases relevance but also increases hallucinations, the developer should investigate why the change affected grounding and revise the prompt, retrieval context, model settings, or architecture. The same evaluation dataset and criteria should be used to compare versions consistently. Deploying solely because one metric improved can introduce production risks. A successful change should satisfy the application’s overall quality, safety, performance, and cost requirements.
Question 268
Which deployment strategy exposes a new AI application version to a small percentage of users before expanding traffic?
- Full replacement
- Manual deployment
- Immediate global deployment
- Canary deployment
Correct Answer: 4
Explanation
Canary deployment gradually introduces a new application version to a limited portion of traffic. Developers can monitor performance, errors, latency, safety signals, and application-specific quality metrics before increasing the percentage of users receiving the new version. If problems appear, traffic can be redirected to the previous version, limiting the impact of the release. Immediate global deployment exposes all users to potential regressions at once. Canary strategies are particularly useful for AI applications because changes in prompts, models, retrieval logic, or tool behavior may produce unexpected effects.
Question 269
A developer wants to ensure that an AI-generated SQL statement cannot modify production data when the application only requires read access. Which control is most important?
- Increase model temperature
- Use a read-only database identity
- Add more retrieved documents
- Increase the model context window
Correct Answer: 2
Explanation
A read-only database identity provides an independent security boundary that prevents the generated SQL from modifying production data, even if the model produces an unsafe statement. The database permission system should enforce the application’s actual access requirements rather than relying on prompts to instruct the model not to perform writes. Additional SQL validation can provide another layer of defense. Temperature and context size do not establish database authorization. Least-privilege database credentials are especially important when AI-generated queries interact with enterprise data.
Question 270
A developer notices that an AI application’s latency increased after the retrieval stage began returning more documents. What is the most likely area to investigate?
- KMS key rotation
- IAM username configuration
- Retrieved context size
- S3 bucket naming
Correct Answer: 3
Explanation
Returning more documents can increase the amount of context sent to the foundation model, which may increase token processing time and cost. The developer should investigate top-k settings, reranking, metadata filtering, chunk size, and whether all retrieved passages are actually necessary. Reducing irrelevant context can improve both latency and answer quality. KMS key rotation, IAM usernames, and S3 bucket names generally do not explain a latency increase caused specifically by larger retrieval results. Performance should be measured across the retrieval and generation stages to identify the dominant bottleneck.
Question 271
A company wants to ensure that AI application changes can be reviewed and automatically deployed through controlled environments. Which engineering practice is most appropriate?
- Manual changes directly in production
- Storing deployment settings in personal notes
- Disabling version control
- CI/CD with version-controlled infrastructure and application code
Correct Answer: 4
Explanation
CI/CD combined with version control provides a controlled process for developing, testing, reviewing, and deploying AI applications. Application code, infrastructure definitions, prompts, and configuration can be tracked, reviewed, tested, and promoted through environments. Automated pipelines can also enforce quality and security checks before production deployment. Manual production changes are harder to audit and reproduce, while disabling version control removes important history. AI applications benefit from these practices because changes to prompts, models, retrieval logic, and tool integrations can significantly affect production behavior.
Question 272
A developer wants to prevent an AI agent from accessing an internal API that it does not require. Which approach follows AWS security best practices?
- Grant only the permissions required by the agent
- Give the agent administrator privileges
- Allow unrestricted network access
- Share a developer’s credentials
Correct Answer: 1
Explanation
Least privilege requires granting an agent or its supporting workload only the permissions necessary for its intended tasks. If an internal API is not required, the agent should not have access to it. This limits the potential impact of prompt injection, tool misuse, compromised credentials, or unexpected model behavior. Administrator permissions create unnecessary risk, while shared personal credentials reduce accountability and security. IAM policies, API authorization, network controls, and application-level validation can work together to enforce the required boundaries.
Question 273
A RAG application retrieves relevant documents but sometimes ranks less useful documents above highly relevant ones. Which technique can help improve ordering?
- Increasing storage capacity
- Removing embeddings
- Reranking retrieved candidates
- Increasing API timeout
Correct Answer: 3
Explanation
Reranking can improve the ordering of documents returned by an initial retrieval stage. The system can first retrieve a broader set of candidates and then use a relevance-focused method to place the most useful documents at the top. This can improve the context supplied to the foundation model and reduce the chance that important evidence is overlooked. Increasing storage or API timeout does not improve relevance ordering. Removing embeddings could eliminate semantic retrieval capabilities. Reranking should be evaluated with representative queries and relevance judgments.
Question 274
A developer wants to detect unauthorized or unexpected AWS API activity associated with an AI workload. Which service should be used?
- Amazon S3
- AWS Lambda
- Amazon DynamoDB
- AWS CloudTrail
Correct Answer: 4
Explanation
AWS CloudTrail provides a record of AWS API activity and can help organizations investigate who or what performed actions within an AWS environment. This is useful for security monitoring, compliance, incident investigation, and operational troubleshooting. CloudTrail records can be analyzed to identify unexpected actions or activity patterns. S3 provides storage, Lambda provides compute, and DynamoDB provides database capabilities. CloudTrail should be configured with appropriate access controls and retention policies so audit information remains available when needed.
Question 275
A developer wants an application to refuse an answer when its retrieved evidence does not adequately support the requested information. Which prompt behavior should be encouraged?
- Instruct the model to acknowledge insufficient evidence
- Require an answer for every query
- Encourage the model to invent missing facts
- Ignore the retrieval results
Correct Answer: 1
Explanation
Instructing the model to acknowledge insufficient evidence can reduce unsupported responses in RAG applications. The prompt should establish that retrieved information is the basis for factual answers and that the model should not invent information when the evidence is inadequate. The application can also implement groundedness evaluation and confidence or relevance checks before returning responses. Requiring an answer regardless of evidence can increase hallucination risk. Ignoring retrieved content defeats the purpose of the RAG architecture and removes an important source of factual grounding.
Question 276
Which component is primarily responsible for converting a user’s natural-language query into a vector representation for semantic retrieval?
- API Gateway
- Embedding model
- CloudTrail
- Secrets Manager
Correct Answer: 2
Explanation
An embedding model converts text into a numerical vector representation that captures semantic characteristics of the input. In a RAG architecture, a user’s query can be embedded and compared with document embeddings stored in a vector index. This enables the retrieval system to find content that is semantically related even when the wording differs. API Gateway manages APIs, CloudTrail provides auditing, and Secrets Manager stores credentials. Embedding quality and consistency between document and query processing are important factors in semantic retrieval accuracy.
Question 277
A company wants to ensure that a newly deployed AI model does not cause a major increase in production errors. Which practice is most appropriate?
- Remove the previous model immediately
- Disable CloudWatch alarms
- Deploy without testing
- Monitor key metrics and maintain a rollback option
Correct Answer: 4
Explanation
Production model changes should be accompanied by monitoring and a reliable rollback strategy. Developers can track error rates, latency, throttling, resource utilization, and application-specific quality signals after deployment. A gradual release can further reduce risk by exposing the new model to limited traffic first. If significant problems occur, traffic can be redirected to the previous version. Removing the previous model immediately eliminates an important recovery option. Monitoring and rollback capabilities are essential parts of reliable AI deployment and operational management.
Question 278
An application processes sensitive customer information using a foundation model. Which principle should guide the amount of customer data included in model prompts?
- Include every available customer field
- Send unnecessary historical data
- Minimize data to what the task requires
- Duplicate sensitive data for context
Correct Answer: 3
Explanation
Data minimization means providing only the information necessary to perform the requested task. Sending unnecessary customer information to a model increases privacy and security risks and may increase token usage and cost. Developers should identify which fields are genuinely required, remove unnecessary sensitive data, and apply appropriate access controls. Data minimization can also improve prompt efficiency by reducing irrelevant context. Duplicating sensitive information provides no security benefit and may increase exposure. The principle should be incorporated into both prompt construction and retrieval design.
Question 279
A developer is investigating why a model invocation occasionally fails after a sudden increase in request volume. Which issue should be checked first?
- Prompt capitalization
- Service quotas and throttling
- Document heading styles
- S3 object naming
Correct Answer: 2
Explanation
A sudden increase in request volume can cause an application to exceed service quotas or encounter throttling. Developers should examine invocation rates, concurrency, quota limits, throttling metrics, and retry behavior. Appropriate backoff, traffic shaping, batching, or quota increases may be considered depending on the workload. Prompt capitalization and document formatting are unlikely to explain failures correlated with traffic volume. S3 object naming is also unrelated to model invocation capacity. Monitoring request patterns can help distinguish capacity-related failures from application-level errors.
Question 280
A developer wants to evaluate whether a prompt change improves an AI application’s performance without accidentally changing several other variables. What should the developer use?
- Controlled A/B or comparative testing
- Random production changes
- Different datasets for each prompt
- Unmeasured user feedback only
Correct Answer: 1
Explanation
Controlled comparative testing allows developers to evaluate a prompt change while keeping other important variables consistent. The same model, evaluation dataset, inference settings, and scoring criteria should generally be used so that differences can be attributed to the prompt. A/B testing can compare versions using representative workloads and measurable quality, latency, cost, or safety metrics. Changing datasets or multiple configuration variables simultaneously makes conclusions less reliable. Controlled evaluation is especially important for production AI systems where small prompt changes can significantly affect behavior.