Curated

Operating, Monitoring, and Securing ML and AI Solutions (4.1–4.3)

0 votes

Questions72

  1. Question 51

    Operating, Monitoring, and Securing ML and AI Solutions

    An Amazon Bedrock deployment forecasts 200 million input tokens and 50 million output tokens monthly; quoted on-demand rates are $2 and $10 per million tokens, respectively. Sufficient Provisioned Throughput costs $1,200 monthly regardless of utilization; considering only these inference charges, which conclusion is correct?

    Show the answer

    Correct answerC. On-demand inference saves $300 monthly

    AWhy not this: This counts only output-token charges and incorrectly favors the provisioned option.

    BWhy not this: This counts only the $400 input-token charge and omits the $500 output-token charge.

    CWhy this is right: Input and output charges total $900, which is $300 below the monthly provisioned charge.

    DWhy not this: The $300 difference favors on-demand inference, not Provisioned Throughput.

    On-demand inference costs (200 × $2) + (50 × $10) = $900 monthly, which is $300 less than the $1,200 provisioned charge. The $800 savings estimate ignores output-token charges.

    Open this question
  2. Question 52

    Operating, Monitoring, and Securing ML and AI Solutions

    A team is comparing Amazon Bedrock text models using standard on-demand inference with caching disabled. Which factors should it use to estimate monthly token-based inference charges? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersC. The expected number of generated tokens across all responsesD. The expected number of input tokens across all requestsF. The selected model's token rates in the deployment Region

    AWhy not this: The output limit constrains generation; it does not mean every request is billed for that many output tokens.

    BWhy not this: Standard on-demand inference does not charge for idle customer-managed endpoint hosting hours.

    CWhy this is right: Actual generated-token volume determines the output portion of token-based inference charges.

    DWhy this is right: Input-token volume determines the input portion of token-based inference charges.

    EWhy not this: Bedrock on-demand model access does not bill the customer for storing model parameters in S3.

    FWhy this is right: Applicable input and output token prices depend on the selected model and deployment Region.

    Standard token-based on-demand charges depend on the selected model's applicable rates and actual input and output token volumes. A configured output limit is a ceiling, not the number of tokens automatically billed.

    Open this question
  3. Question 53

    Operating, Monitoring, and Securing ML and AI Solutions

    Which EC2 purchasing option suits a short inference experiment that cannot tolerate Spot interruptions and requires no long-term commitment?

    Show the answer

    Correct answerA. On-Demand Instances

    AWhy this is right: On-Demand Instances require no long-term commitment and are not subject to Spot reclamation.

    BWhy not this: Reserved Instances require a one- or three-year commitment, which does not fit a short experiment.

    CWhy not this: Spot Instances can be interrupted when EC2 reclaims the capacity.

    DWhy not this: EC2 Instance Savings Plans require a one- or three-year hourly spending commitment.

    On-Demand Instances provide pay-as-you-go compute without a long-term commitment or Spot capacity reclamation. Spot Instances can cost less, but their interruption risk conflicts with the requirement.

    Open this question
  4. Question 54

    Operating, Monitoring, and Securing ML and AI Solutions

    An assistant retrieves external documents and proposes account changes through a backend tool with broad permissions; users must retain access to those documents, but some users may only read accounts. Retrieved instructions have caused unauthorized change attempts despite prompt filtering. Which control BEST prevents execution of unauthorized changes?

    Show the answer

    Correct answerD. Validate tool requests and authorize each operation against the authenticated user's permissions.

    AWhy not this: A model's explanation is also untrusted output and does not establish permission to change an account.

    BWhy not this: Logs support investigation but do not stop an unauthorized tool request from executing.

    CWhy not this: Filtering can reduce malicious instructions but does not enforce the user's authorization when a request reaches the tool.

    DWhy this is right: Independent validation and per-user authorization prevent a manipulated model from exercising the backend's broader permissions.

    Treat model-generated tool requests as untrusted input and enforce authorization independently at execution time. Prompt filtering can reduce prompt injection, but it cannot replace a backend authorization boundary.

    Open this question
  5. Question 55

    Operating, Monitoring, and Securing ML and AI Solutions

    A classifier begins misclassifying a specific product after retraining with externally supplied labeled examples. Reviewers find deliberately incorrect labels concentrated on that product. What should the team do FIRST?

    Show the answer

    Correct answerB. Quarantine the suspect examples and validate their provenance and labels.

    AWhy not this: More compute does not correct deliberately mislabeled training examples.

    BWhy this is right: Quarantining suspect examples prevents their reuse while provenance and label checks establish whether they are trustworthy.

    CWhy not this: Encryption protects confidentiality at rest, not the correctness of supplied training labels.

    DWhy not this: Endpoint network restrictions do not remove poisoned examples from the training dataset.

    The targeted insertion of incorrect training labels indicates data poisoning. Quarantining and validating the suspect data addresses the source; encryption at rest protects stored data but does not establish that labels are trustworthy.

    Open this question
  6. Question 56

    Operating, Monitoring, and Securing ML and AI Solutions

    An application on Amazon EC2 invokes Amazon Bedrock foundation models. Which credentials avoid storing a long-lived secret on the instance?

    Show the answer

    Correct answerC. An IAM role's temporary credentials supplied through an instance profile

    AWhy not this: An IAM console password is for interactive sign-in, not for signing Bedrock API requests.

    BWhy not this: An IAM user access key is a long-lived credential that the application must store and manage.

    CWhy this is right: An instance profile makes temporary role credentials available without embedding a long-lived secret.

    DWhy not this: A long-term API key is still a stored long-lived secret.

    An EC2 instance profile supplies temporary IAM role credentials that AWS SDKs can obtain and refresh automatically. A stored IAM user access key remains a long-lived secret, even when placed in an environment variable.

    Open this question
  7. Question 57

    Operating, Monitoring, and Securing ML and AI Solutions

    An externally accessible classifier returns predicted labels and full class-probability vectors. A customer is submitting large numbers of systematically varied inputs that appear intended to train a substitute model. Which changes most directly reduce this risk while preserving label predictions? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. Return predicted labels without full probability vectors.E. Enforce per-customer request quotas and throttling.

    AWhy not this: Deployment audit records do not restrict inference queries or reduce information in responses.

    BWhy this is right: Labels expose less information about the model's decision boundaries than full probability vectors.

    CWhy not this: Artifact encryption protects stored model files, not information disclosed by inference responses.

    DWhy not this: Additional capacity can accommodate more extraction queries rather than constrain them.

    EWhy this is right: Per-customer limits constrain the volume of queries available to build a substitute model.

    FWhy not this: TLS protects data in transit but does not prevent an authorized caller from analyzing responses.

    Request limits constrain large-scale querying, and withholding probability vectors reduces information available for model extraction. Encrypting model artifacts protects stored files but does not prevent extraction through legitimate inference responses.

    Open this question
  8. Question 58

    Operating, Monitoring, and Securing ML and AI Solutions

    An agent's monthly costs rise while session counts and input tokens per model call stay flat. The bill shows higher charges for the Lambda functions and outside APIs the agent uses. Which metric should the team track to confirm the cause?

    Show the answer

    Correct answerA. Tool invocations per session

    AWhy this is right: Counting tool invocations within each session shows whether the agent now calls its tools more often.

    BWhy not this: Memory utilization tracks runtime resource use, not the Lambda and API charges that rose.

    CWhy not this: Latency measures how long model calls take, not how often the agent calls tools.

    DWhy not this: Output tokens drive model charges, but the increase is in Lambda and outside API charges.

    Higher Lambda and API charges with flat sessions and input tokens point to more tool calls per interaction, which tool invocations per session measures directly. Output tokens and memory track model and runtime cost, and latency is a speed signal rather than a count of tool use.

    Open this question
  9. Question 59

    Operating, Monitoring, and Securing ML and AI Solutions

    After an agent release, tool executions double while completed-task counts and task types remain unchanged; aggregate tool-error rates remain low. Which analysis BEST distinguishes repeated agent planning from retries inside a tool client?

    Show the answer

    Correct answerC. Inspect per-task traces for planning steps and nested retry attempts

    AWhy not this: CPU utilization and concurrency can reveal load changes but not the source of repeated tool executions.

    BWhy not this: Execution totals and charges quantify consumption but cannot distinguish planning decisions from client retries.

    CWhy this is right: Trace hierarchy and retry-attempt details reveal whether repetition occurs in agent planning or inside the tool client.

    DWhy not this: Token totals and response sizes do not establish whether repeated executions originated in planning or client retries.

    Per-task traces distinguish separate agent planning decisions from retry attempts within a tool call. Aggregate execution counts and charges show increased consumption but do not identify which layer caused it.

    Open this question
  10. Question 60

    Operating, Monitoring, and Securing ML and AI Solutions

    A workload completes 100,000 tasks monthly, with each FM invocation using 2,000 input and 500 output tokens; model A costs $1/$4 per million input/output tokens, while model B costs $2/$3. Both meet quality and latency requirements, but half of model A's tasks require one additional identical invocation, whereas model B requires no retries; which model has the lowest monthly inference cost?

    Show the answer

    Correct answerA. Model B at $550

    AWhy this is right: Each invocation costs $0.004 for input plus $0.0015 for output, totaling $550 for 100,000 tasks.

    BWhy not this: This applies model B's input-token rate to output tokens instead of its stated output-token rate.

    CWhy not this: This correctly calculates model A's spending, but $600 exceeds model B's $550.

    DWhy not this: This includes only the initial invocations and omits the additional 50,000 billable invocations.

    Model B costs $0.0055 per task, or $550 monthly. Model A costs $0.004 per invocation, but 150,000 invocations cost $600; its $400 estimate ignores retries.

    Open this question
  11. Question 61

    Operating, Monitoring, and Securing ML and AI Solutions

    An agent runtime's memory consumption rises during long conversations even though concurrent session counts remain stable. Which monitoring approach BEST determines whether retained conversation state explains the increase?

    Show the answer

    Correct answerC. Correlate runtime memory with conversation turns and retained state size

    AWhy not this: Concurrency is already stable, so comparing it with capacity does not isolate memory growth within sessions.

    BWhy not this: Latency and throughput describe serving performance, not the size of retained conversation state.

    CWhy this is right: Growth in retained state alongside turns and memory supports conversation-state accumulation as the cause.

    DWhy not this: Billing trends do not establish whether retained conversation state consumes runtime memory.

    Correlating memory with conversation length and retained state tests whether state accumulation drives memory growth. Session concurrency alone cannot explain growth when concurrent session counts remain stable.

    Open this question
  12. Question 62

    Operating, Monitoring, and Securing ML and AI Solutions

    Each night an application sends 200,000 document-summary requests to an Amazon Bedrock model through on-demand InvokeModel calls. Results are needed by the next morning. Which change BEST lowers the inference cost without changing the model?

    Show the answer

    Correct answerA. Submit the requests as a Bedrock batch inference job

    AWhy this is right: Batch inference runs the requests asynchronously at a discounted price, and the overnight window allows for that.

    BWhy not this: Each document is unique, so there is no repeated prefix for caching to reuse.

    CWhy not this: Provisioned Throughput is a capacity commitment billed by the hour, which suits steady high demand rather than a one-off nightly batch.

    DWhy not this: Cross-Region inference spreads requests across Regions for throughput but charges the same on-demand price.

    Batch inference processes a JSONL file of prompts from Amazon S3 asynchronously at a lower price than on-demand calls (half the on-demand price for supported models), which suits work that can wait hours. Prompt caching only helps when requests share a repeated prefix, and each document here is different.

    Open this question
  13. Question 63

    Operating, Monitoring, and Securing ML and AI Solutions

    A document-search application's embedding charges increase after its ingestion job changes, although the source corpus is nearly unchanged. Which measurement BEST identifies unnecessary embedding computation?

    Show the answer

    Correct answerD. Embedding input tokens grouped by document content hash and ingestion run

    AWhy not this: Generated answer tokens belong to generation costs, not document embedding computation.

    BWhy not this: Retrieval latency does not show whether ingestion recomputes embeddings for unchanged documents.

    CWhy not this: Throttles show request pressure but cannot distinguish changed content from unnecessary recomputation.

    DWhy this is right: Repeated embedding tokens for the same content hash reveal unchanged content being processed again.

    Content hashes reveal unchanged content, and per-run embedding token totals expose repeated computation for that content. Vector query latency measures retrieval performance rather than embedding work.

    Open this question
  14. Question 64

    Operating, Monitoring, and Securing ML and AI Solutions

    A retrieval-augmented generation application has rising inference charges despite stable user request volume and unchanged model prices. Which measurements BEST distinguish longer retrieved context from more verbose generated answers? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. Actual output tokens per model invocationE. Actual input tokens per model invocation

    AWhy not this: Quota utilization measures request pressure rather than input or output length.

    BWhy this is right: Rising output tokens reveal that the model is generating longer answers.

    CWhy not this: Stored bytes per document do not measure how much retrieved content enters each model invocation.

    DWhy not this: The configured ceiling does not measure actual generated output.

    EWhy this is right: Rising input tokens reveal larger prompts, including longer retrieved context.

    Actual input and output tokens distinguish growing prompt context from longer generated answers. A configured output-token maximum is only a ceiling and does not reveal how much text was generated.

    Open this question
  15. Question 65

    Operating, Monitoring, and Securing ML and AI Solutions

    A Bedrock application repeatedly sends a large, identical policy document followed by a different customer question, and every answer must use that document. The model supports prompt caching, and requests arrive within its cache lifetime; which change BEST reduces input processing costs without changing the model or removing context?

    Show the answer

    Correct answerA. Place a cache checkpoint after the shared policy prefix

    AWhy this is right: The identical prefix can be reused while each distinct customer question is still processed.

    BWhy not this: Different questions can require different answers even when they share the same policy document.

    CWhy not this: Reserving peak capacity does not specifically eliminate repeated processing of the shared prefix.

    DWhy not this: Omitting the document violates the requirement that each answer use the policy context.

    A cache checkpoint after the shared prefix lets eligible requests reuse the policy context at cached-input pricing. Caching complete answers by policy document would incorrectly reuse answers across different customer questions.

    Open this question
  16. Question 66

    Operating, Monitoring, and Securing ML and AI Solutions

    After a vector-index migration, stored vector payload bytes triple while the live vector count stays constant; dimensions increase from 768 to 1,536, and stored copies increase from two to three. Element precision is unchanged, and index overhead is reported separately; which conclusion BEST fits these measurements?

    Show the answer

    Correct answerA. The growth matches the dimension and stored-copy changes

    AWhy this is right: The expected multiplier is 1,536/768 × 3/2 = 3, matching the observed payload growth.

    BWhy not this: Index overhead is measured separately and cannot explain the reported vector payload increase.

    CWhy not this: More dimensions increase elements per vector, not the byte precision of each element.

    DWhy not this: Constant live vector count contradicts duplicate live vectors as the explanation for this increase.

    Vector payload storage scales with vector count × dimensions × bytes per element × stored copies. Doubling dimensions and increasing copies by 1.5 produces threefold growth; unchanged document count alone does not imply duplication.

    Open this question
  17. Question 67

    Operating, Monitoring, and Securing ML and AI Solutions

    An Amazon Bedrock application generates lengthy explanations when users need only short summaries. Which change most directly reduces unnecessary output-token usage?

    Show the answer

    Correct answerC. Request concise responses in the prompt

    AWhy not this: A longer timeout allows requests to run longer; it does not encourage shorter responses.

    BWhy not this: A higher request quota permits more requests but does not reduce tokens per response.

    CWhy this is right: Explicitly requesting concise responses targets the unnecessary generated tokens.

    DWhy not this: Streaming delivers tokens incrementally without inherently reducing generated output.

    Requesting concise responses reduces unnecessary generated text and its output-token charges. Streaming changes how tokens reach the client, not how many tokens the model generates.

    Open this question
  18. Question 68

    Operating, Monitoring, and Securing ML and AI Solutions

    A Bedrock application must replace email addresses in generated responses with placeholders while preserving the remaining response. Which guardrail configuration should the engineer choose?

    Show the answer

    Correct answerD. A sensitive information filter with the anonymize action

    AWhy not this: Filtering common domains neither detects all email addresses nor provides sensitive-data anonymization.

    BWhy not this: Denied topics restrict discussion subjects rather than replacing detected email addresses with placeholders.

    CWhy not this: Blocking rejects the affected response instead of preserving its nonsensitive content.

    DWhy this is right: Anonymization replaces detected email addresses with placeholders while preserving surrounding response text.

    The anonymize action masks detected sensitive information, such as email addresses, while retaining the surrounding content. The block action prevents delivery of the affected response rather than returning it with sensitive values replaced.

    Open this question
  19. Question 69

    Operating, Monitoring, and Securing ML and AI Solutions

    An application calls a foundation model hosted outside Amazon Bedrock but must enforce an existing Bedrock guardrail on prompts and responses. Which integration meets this requirement without moving the model?

    Show the answer

    Correct answerC. Call ApplyGuardrail for inputs and outputs, and enforce its results

    AWhy not this: Invocation logging records supported Bedrock invocations; it does not enforce policies on external model content.

    BWhy not this: An external model does not enforce a Bedrock guardrail merely because its identifier appears in a request.

    CWhy this is right: ApplyGuardrail evaluates supplied content independently of model hosting; the application must act on the results.

    DWhy not this: Permission to read guardrail configuration does not evaluate content or enforce guardrail decisions.

    ApplyGuardrail evaluates content independently of model invocation, allowing an application to check inputs and outputs for externally hosted models. Passing a guardrail identifier to an external model does not make that model enforce Bedrock Guardrails.

    Open this question
  20. Question 70

    Operating, Monitoring, and Securing ML and AI Solutions

    Which Amazon Bedrock Guardrails feature restricts conversations about investment advice while permitting other financial discussions?

    Show the answer

    Correct answerB. Denied topics

    AWhy not this: Word filters match configured words or phrases, not the broader meaning of a discussion topic.

    BWhy this is right: Denied topics restrict defined subjects while allowing discussions outside their scope.

    CWhy not this: Sensitive information filters detect data such as personal identifiers rather than prohibited discussion subjects.

    DWhy not this: Contextual grounding checks assess grounding and relevance rather than enforcing a prohibited-subject policy.

    Denied topics define subjects that the application should avoid, such as investment advice. Word filters match specified words or phrases rather than assessing whether a conversation concerns a prohibited subject.

    Open this question
  21. Question 71

    Operating, Monitoring, and Securing ML and AI Solutions

    A developer uses a tool that supports Amazon Bedrock bearer-token authentication but cannot sign AWS requests. Which credential should the developer configure?

    Show the answer

    Correct answerB. An Amazon Bedrock API key

    AWhy not this: An STS session token accompanies temporary signing credentials; it is not a Bedrock bearer token.

    BWhy this is right: A Bedrock API key authenticates supported Bedrock requests using bearer-token authentication.

    CWhy not this: A secret access key is used to calculate request signatures, not as a standalone bearer token.

    DWhy not this: An access key ID identifies an IAM credential but cannot authenticate a request as a bearer token.

    An Amazon Bedrock API key supports bearer-token authentication for supported Bedrock API operations. IAM access keys and STS session tokens are components of AWS signing credentials, not standalone Bedrock bearer tokens.

    Open this question
  22. Question 72

    Operating, Monitoring, and Securing ML and AI Solutions

    A service running under an IAM role must call Amazon Bedrock through an HTTP client that supports only bearer-token authentication. Security requires credentials that expire within hours and carry no permissions beyond the role's. Which credential should the service use?

    Show the answer

    Correct answerB. A short-term Bedrock API key generated from the role's credentials

    AWhy not this: A long-term key lasts days, not hours, and is tied to a separate IAM user rather than the service's role.

    BWhy this is right: A short-term key is a bearer token that expires within 12 hours and carries only the generating role's permissions.

    CWhy not this: IAM user access keys are long-lived and need Signature Version 4 signing, which this client cannot do.

    DWhy not this: Role credentials meet the expiry rule, but this client cannot sign requests with Signature Version 4.

    A short-term Bedrock API key lasts up to 12 hours (or the session, if shorter), inherits the permissions of the IAM principal that generated it, and is the type AWS recommends for production; the token generator library can renew it before it expires. A long-term key creates an IAM user and is meant only for exploration.

    Open this question