Practice Questions - Amazon AWS Certified AI Practitioner AIF-C01 Flashcards
(154 cards)
A company has built an image classification model to predict plant diseases from photos of plant leaves. The company wants to evaluate how many images the model classified correctly. Which evaluation metric should the company use to measure the model’s performance?
A. R-squared score
B. Accuracy
C. Root mean squared error (RMSE)
D. Learning rate
B. Accuracy
Accuracy is the correct answer because it directly measures the proportion of correctly classified images out of the total number of images. R-squared score and RMSE are used for regression problems, not classification problems. Learning rate is a hyperparameter used during model training, not an evaluation metric.
A company uses Amazon SageMaker for its ML pipeline in a production environment. The company has large input data sizes up to 1 GB and processing times up to 1 hour. The company needs near real-time latency. Which SageMaker inference option meets these requirements?
A. Real-time inference
B. Serverless inference
C. Asynchronous inference
D. Batch transform
C
Asynchronous inference is the correct answer because it is designed for large payloads and longer processing times, aligning with the company’s needs of up to 1 GB input data and processing times up to 1 hour. While it doesn’t provide truly immediate responses like real-time inference, it offers near real-time latency, which is specified as a requirement. Real-time inference is unsuitable due to its typically smaller payload sizes and shorter processing times. Serverless inference is optimized for low latency but may not handle the 1-hour processing time efficiently. Batch transform is entirely unsuitable as it is for offline processing and does not meet the near real-time requirement.
A company wants to use language models to create an application for inference on edge devices. The inference must have the lowest latency possible. Which solution will meet these requirements?
A. Deploy optimized small language models (SLMs) on edge devices.
B. Deploy optimized large language models (LLMs) on edge devices.
C. Incorporate a centralized small language model (SLM) API for asynchronous communication with edge devices.
D. Incorporate a centralized large language model (LLM) API for asynchronous communication with edge devices.
A
The correct answer is A because deploying optimized small language models (SLMs) directly onto edge devices minimizes latency. SLMs have a smaller size and computational footprint compared to LLMs, leading to faster inference times. Options B, C, and D all introduce latency: B due to the inherent computational demands of LLMs on resource-constrained edge devices, and C and D because of the communication overhead involved in using a centralized API. Asynchronous communication, while offering other benefits, inherently adds delay compared to on-device processing.
A company wants to build an ML model using Amazon SageMaker and needs to share and manage variables for model development across multiple teams. Which SageMaker feature best meets these requirements?
A. Amazon SageMaker Feature Store
B. Amazon SageMaker Data Wrangler
C. Amazon SageMaker Clarify
D. Amazon SageMaker Model Cards
A. Amazon SageMaker Feature Store
The correct answer is A because Amazon SageMaker Feature Store provides a centralized repository for storing, managing, and sharing features (variables) used in machine learning models. This allows multiple teams to collaborate effectively and ensures consistency in feature usage across different models. Options B, C, and D are incorrect because they do not directly address the need for centralized sharing and management of variables across multiple teams for model development. Data Wrangler focuses on data preparation, Clarify on model bias detection, and Model Cards on model documentation.
A company possesses petabytes of unlabeled customer data intended for use in an advertisement campaign. The company aims to classify its customers into tiers for targeted advertising and product promotion. Which methodology is most appropriate for this task?
A. Supervised learning
B. Unsupervised learning
C. Reinforcement learning
D. Reinforcement learning from human feedback (RLHF)
B. Unsupervised learning
Unsupervised learning is the correct answer because the company has unlabeled data and needs to identify patterns and groupings within that data to classify customers into tiers. Supervised learning requires labeled data, which is not available. Reinforcement learning and RLHF focus on learning through trial and error and feedback, which are not directly applicable to the problem of initial customer classification. Clustering techniques, a core component of unsupervised learning, are perfectly suited to this task.
An AI practitioner wants to use a foundation model (FM) to design a search application. The search application must handle queries that have text and images. Which type of FM should the AI practitioner use to power the search application?
A. Multi-modal embedding model
B. Text embedding model
C. Multi-modal generation model
D. Image generation model
A. Multi-modal embedding model
The correct answer is A because multi-modal embedding models are designed to process and understand multiple data types, including text and images. This is precisely what is needed for a search application that accepts queries containing both text and images.
Option B is incorrect because text embedding models only handle text data and would not be able to process image queries. Option C is incorrect because multi-modal generation models are focused on creating new content (text and/or images), not on searching existing data. Option D is incorrect because image generation models are solely focused on generating images and cannot handle text-based queries.
A company wants to use AI to protect its application from threats. The AI solution needs to check if an IP address is from a suspicious source. Which solution meets these requirements?
A. Build a speech recognition system.
B. Create a natural language processing (NLP) named entity recognition system.
C. Develop an anomaly detection system.
D. Create a fraud forecasting system.
C
Anomaly detection is the correct answer because it focuses on identifying unusual patterns in data. In this context, an anomaly detection system can analyze IP address access patterns and flag deviations from normal behavior, indicating potentially suspicious activity. Options A and B are incorrect because they are not relevant to identifying suspicious IP addresses. Speech recognition deals with audio, and NLP named entity recognition deals with text. Option D, fraud forecasting, is focused on predicting future fraud rather than detecting it in real-time based on an immediate event like an IP address access.
A company uses machine learning (ML) models to forecast demand each quarter, informing operational optimization decisions. An AI practitioner is creating a report to explain these models to company stakeholders. Which of the following should the AI practitioner include in the report to ensure transparency and explainability?
A. Code for model training
B. Partial dependence plots (PDPs)
C. Sample data for training
D. Model convergence tables
B
The correct answer is B, Partial dependence plots (PDPs). PDPs visualize the relationship between model features and predictions, making it easy to understand how changes in input variables affect forecasts. This is crucial for stakeholder understanding without requiring in-depth knowledge of the model’s internal workings.
Option A, code for model training, is incorrect because it is too technical for most stakeholders. Option C, sample data for training, might raise privacy concerns and is unnecessary for explaining model predictions. Option D, model convergence tables, is relevant for model developers but less so for stakeholders concerned with understanding the model’s outputs and their impact.
A law firm wants to build an AI application using large language models (LLMs) to read legal documents and extract key points. Which solution best meets these requirements?
A. Build an automatic named entity recognition system.
B. Create a recommendation engine.
C. Develop a summarization chatbot.
D. Develop a multi-language translation system.
C
The correct answer is C because the core requirement is to extract key points from legal documents, which is the function of a summarization chatbot. Options A, B, and D are incorrect. A named entity recognition system (A) identifies predefined entities (names, places, etc.), not key points of an argument. A recommendation engine (B) suggests related items, not summarizes information. A multi-language translation system (D) translates languages, not extracts key points. A summarization chatbot uses LLMs to condense information, directly addressing the law firm’s needs.
A company wants to create a chatbot using a foundation model (FM) on Amazon Bedrock. This FM needs to access encrypted data stored in an Amazon S3 bucket encrypted with Amazon S3 managed keys (SSE-S3). The FM fails to access the S3 bucket data. Which solution will resolve this issue?
A. Ensure that the role that Amazon Bedrock assumes has permission to decrypt data with the correct encryption key.
B. Set the access permissions for the S3 buckets to allow public access to enable access over the internet.
C. Use prompt engineering techniques to tell the model to look for information in Amazon S3.
D. Ensure that the S3 data does not contain sensitive information.
A
A company wants to use generative AI to increase developer productivity and software development. The company wants to use Amazon Q Developer. What can Amazon Q Developer do to help the company meet these requirements?
A. Create software snippets, reference tracking, and open source license tracking.
B. Run an application without provisioning or managing servers.
C. Enable voice commands for coding and providing natural language search.
D. Convert audio files to text documents by using ML models.
A
A financial institution is using Amazon Bedrock to develop an AI application hosted within a VPC. Due to regulatory compliance, this VPC is not permitted to access the internet. Which AWS service or feature best addresses this requirement?
A. AWS PrivateLink
B. Amazon Macie
C. Amazon CloudFront
D. Internet gateway
A. AWS PrivateLink
AWS PrivateLink enables private connectivity between a VPC and AWS services, eliminating the need for internet access. This directly addresses the requirement of the financial institution’s isolated VPC needing to access Amazon Bedrock.
Option B, Amazon Macie, is a data security and privacy service; it does not provide private connectivity. Option C, Amazon CloudFront, is a content delivery network that relies on the internet. Option D, an internet gateway, is explicitly designed to connect a VPC to the internet, which is against the stated requirement.
A company wants to develop an educational game where users answer questions such as the following: “A jar contains six red, four green, and three yellow marbles. What is the probability of choosing a green marble from the jar?” Which solution meets these requirements with the LEAST operational overhead?
A. Use supervised learning to create a regression model that will predict probability.
B. Use reinforcement learning to train a model to return the probability.
C. Use code that will calculate probability by using simple rules and computations.
D. Use unsupervised learning to create a model that will estimate probability density.
C
A company is using a pre-trained large language model (LLM) to build a chatbot for product recommendations. The company needs the LLM outputs to be short and written in a specific language. Which solution will align the LLM response quality with the company’s expectations?
A. Adjust the prompt.
B. Choose an LLM of a different size.
C. Increase the temperature.
D. Increase the Top K value.
A
A company is using domain-specific models and wants to adapt pre-trained models to create models for new, related tasks, instead of creating new models from scratch. Which machine learning (ML) strategy best meets these requirements?
A. Increase the number of epochs.
B. Use transfer learning.
C. Decrease the number of epochs.
D. Use unsupervised learning.
B
The correct answer is B, Use transfer learning. Transfer learning leverages pre-trained models and adapts them for new, related tasks, directly addressing the company’s requirement to avoid building models from the ground up. Options A and C relate to the training process of a single model and don’t address the core issue of adapting existing models. Option D, unsupervised learning, involves training a model on unlabeled data, which is not relevant to adapting a pre-trained model for a new task.
A company is building a solution to generate images for protective eyewear. The solution must have high accuracy and must minimize the risk of incorrect annotations. Which solution will meet these requirements?
A. Human-in-the-loop validation by using Amazon SageMaker Ground Truth Plus
B. Data augmentation by using an Amazon Bedrock knowledge base
C. Image recognition by using Amazon Rekognition
D. Data summarization by using Amazon QuickSight Q
A
Which metric measures the runtime efficiency of operating AI models?
A. Customer satisfaction score (CSAT)
B. Training time for each epoch
C. Average response time
D. Number of training instances
C
The correct answer is C, Average response time. Average response time directly measures how long an AI model takes to process a request and return a result. This is crucial for evaluating runtime efficiency, especially in applications requiring quick responses.
Option A, Customer satisfaction score (CSAT), measures user satisfaction, not the model’s technical performance. Option B, Training time for each epoch, measures the time it takes to train the model, not its runtime efficiency during operation. Option D, Number of training instances, refers to the amount of data used for training, not the model’s operational speed.
A company is building a contact center application and wants to gain insights from customer conversations. The company wants to analyze and extract key information from the audio of the customer calls. Which solution meets these requirements?
A. Build a conversational chatbot by using Amazon Lex.
B. Transcribe call recordings by using Amazon Transcribe.
C. Extract information from call recordings by using Amazon SageMaker Model Monitor.
D. Create classification labels by using Amazon Comprehend.
B
A company wants to classify human genes into 20 categories based on gene characteristics. The company needs an ML algorithm to document how the inner mechanism of the model affects the output. Which ML algorithm meets these requirements?
A. Decision trees
B. Linear regression
C. Logistic regression
D. Neural networks
A. Decision trees
Decision trees are the most suitable algorithm because they offer high transparency and interpretability. The decision-making process is easily visualized by following the branches of the tree, directly showing how input features (gene characteristics) influence the output (gene category). This fulfills the requirement to document the model’s inner workings. Linear regression and logistic regression are unsuitable; linear regression is for predicting continuous values, not classifications, and logistic regression is primarily designed for binary classification (two categories), not the 20 categories required here. Neural networks, while capable of multi-class classification, are often considered “black boxes,” making it difficult to document how the inner mechanisms affect the output.
A company uses a foundation model (FM) from Amazon Bedrock for an AI search tool. The company wants to fine-tune the model to be more accurate by using the company’s data. Which strategy will successfully fine-tune the model?
A. Provide labeled data with the prompt field and the completion field.
B. Prepare the training dataset by creating a .txt file that contains multiple lines in .csv format.
C. Purchase Provisioned Throughput for Amazon Bedrock.
D. Train the model on journals and textbooks.
A. Provide labeled data with the prompt field and the completion field.
The correct answer is A because fine-tuning a foundation model requires providing labeled data where each example consists of a prompt (input) and a completion (desired output). This allows the model to learn specific patterns and behaviors relevant to the company’s data and use case. Option B is incorrect because while a .txt file might be used, it must contain appropriately labeled data, not just raw .csv data. Option C is incorrect because while provisioned throughput might improve performance, it is not directly involved in the fine-tuning process itself. Option D is incorrect because training the model on general data (journals and textbooks) won’t tailor the model to the company’s specific needs; fine-tuning uses the company’s own data for this purpose.
Which feature of Amazon OpenSearch Service gives companies the ability to build vector database applications?
A. Integration with Amazon S3 for object storage
B. Support for geospatial indexing and queries
C. Scalable index management and nearest neighbor search capability
D. Ability to perform real-time analysis on streaming data
C
Which option is a use case for generative AI models?
A. Improving network security by using intrusion detection systems
B. Creating photorealistic images from text descriptions for digital marketing
C. Enhancing database performance by using optimized indexing
D. Analyzing financial data to forecast stock market trends
B
A company wants to build a generative AI application using Amazon Bedrock and needs to choose a foundation model (FM). The company wants to know how much information can fit into one prompt. Which consideration will inform the company’s decision?
A. Temperature
B. Context window
C. Batch size
D. Model size
B
The correct answer is B, Context window. The context window refers to the maximum amount of text a foundation model can process in a single input (prompt). This directly addresses the company’s need to understand how much information can be included in a single prompt.
Option A, Temperature, is incorrect because it controls the randomness of the model’s output, not the input size. Option C, Batch size, refers to the number of inputs processed simultaneously, not the size of a single input. Option D, Model size, refers to the overall size of the model’s parameters, which indirectly relates to its capabilities but does not directly specify the maximum input length.
A company wants to create a chatbot using a foundation model (FM) to help customers solve technical problems without human intervention. The chatbot’s responses must adhere to the company’s tone. Which solution best meets these requirements?
A. Set a low limit on the number of tokens the FM can produce.
B. Use batch inferencing to process detailed responses.
C. Experiment and refine the prompt until the FM produces the desired responses.
D. Define a higher number for the temperature parameter.
C
The correct answer is C because prompt engineering is the most effective way to control the tone and style of a foundation model’s output. By carefully crafting and iteratively refining the prompts given to the FM, the company can guide the chatbot to generate responses that align with their desired tone.
Option A is incorrect because limiting the number of tokens primarily affects the length of the response, not necessarily its tone. Option B is incorrect because batch inferencing is about efficiency in processing multiple requests, not about controlling the tone of individual responses. Option D is incorrect because increasing the temperature parameter generally leads to more creative, but potentially less coherent and less on-brand, responses.