Fundamentals of AI and ML

Domain 1: Fundamentals of AI and ML

54 practice questions for Domain 1 of the AWS Certified AI Practitioner (AIF-C01) exam, which makes up 20% of its scored content. Your answers count towards one score and one timer for the whole exam.

Domain 1: Fundamentals of AI and ML

20% of scored content · 54 practice questions

1. A retailer has five years of labelled sales records and wants to predict next quarter's unit sales for each product. Which type of machine learning problem is this?

Answer and explanation

Answer: A. The historical records are labelled with the known outcome and the target is a continuous numeric quantity, which defines supervised regression. Binary classification predicts one of two discrete classes, not a unit count. Clustering is unsupervised and groups records without labels, so it cannot use the labelled history to predict a value. Reinforcement learning trains an agent through reward signals from interaction with an environment and does not fit a static historical dataset.

2. A team evaluates a fraud-detection model on a dataset where only 0.5% of transactions are fraudulent. The model reports 99.5% accuracy. Why is accuracy a poor metric here, and what is more informative?

Answer and explanation

Answer: C. With 0.5% positives, a model that labels every transaction as legitimate scores 99.5% accuracy while catching no fraud at all, so accuracy conceals total failure on the class that matters. Precision, recall, and their harmonic mean F1 measure performance on the minority class directly. Accuracy is not always unreliable — it is a reasonable metric on balanced data. Training loss measures optimization progress, not business performance on held-out data. Dataset size is not the issue; class distribution is.

3. A marketing team wants to group customers into segments without any predefined categories or labelled examples. Which type of learning applies?

Answer and explanation

Answer: B. Discovering structure in unlabelled data is unsupervised learning, and clustering is its classic form. Supervised learning requires labelled examples of the outcome, which the team does not have. Reinforcement learning trains an agent through rewards from interacting with an environment. Transfer learning reuses a model trained on one task for another and describes a training strategy rather than a learning paradigm for this problem.

4. Which AWS service extracts text and structured data, including tables and form fields, from scanned documents?

Answer and explanation

Answer: C. Textract goes beyond optical character recognition to identify tables, key-value form pairs, and document structure. Rekognition analyses images and video for objects, faces, and scenes rather than document layout. Comprehend performs natural language processing on text that has already been extracted. Translate converts text between languages.

5. A model performs well on training data but poorly on unseen data. What is this called, and what is a standard remedy?

Answer and explanation

Answer: D. A large gap between training and held-out performance is the definition of overfitting, where the model has memorised the training set rather than learned generalisable structure. Underfitting shows poor performance on both training and unseen data. Data drift describes the live input distribution moving away from training data after deployment. Class imbalance is a distribution problem that shows up in metrics such as recall on the minority class.

6. Which service builds a personalized product recommendation engine from a company's own interaction history without requiring machine learning expertise?

Answer and explanation

Answer: B. Personalize trains recommendation models on a customer's interaction, item, and user data and serves recommendations through an API. Forecast produces time-series predictions such as demand. Kendra is an intelligent enterprise search service. Polly converts text into lifelike speech.

7. What is the purpose of splitting a dataset into training, validation, and test sets?

Answer and explanation

Answer: B. The validation set guides hyperparameter choices without contaminating the final estimate, and the test set gives an unbiased measure of performance on data used in neither training nor tuning. Splitting does not reduce the data processed; it partitions it. The split has nothing to do with encryption. Distributing training across nodes is a separate infrastructure concern.

8. Which metric is appropriate for evaluating a model that predicts a continuous numeric value such as house price?

Answer and explanation

Answer: B. Root mean squared error measures the average magnitude of prediction error in the units of the target, which suits a continuous outcome. F1 score, precision, and area under the ROC curve are all classification metrics defined on discrete predicted classes and do not apply to a continuous prediction.

9. A company wants to convert recorded customer support calls into searchable text. Which service should it use?

Answer and explanation

Answer: B. Transcribe performs automatic speech recognition, converting audio into text. Polly performs the reverse, turning text into speech. Lex builds conversational interfaces such as chatbots. Comprehend analyses text for entities and sentiment once the transcription already exists.

10. Which statement best describes inference in a machine learning workflow?

Answer and explanation

Answer: C. Inference is the act of applying an already trained model to new input to obtain a prediction. Adjusting weights to reduce error describes training. Collecting and labelling data is dataset preparation. Feature selection is part of building the model rather than running it.

11. A company must choose between batch inference and real-time inference for scoring 10 million records overnight, with results needed by morning. Which is appropriate and why?

Answer and explanation

Answer: D. A large, scheduled workload with an overnight window is exactly the batch case: throughput matters and no individual record needs a low-latency response. Real-time endpoints are provisioned for per-request latency and are more expensive for bulk scoring, not less. Accuracy is a property of the model and does not change with the inference mode.

12. Which AWS service provides a managed environment for building, training, and deploying custom machine learning models?

Answer and explanation

Answer: B. SageMaker AI covers the custom model lifecycle from data preparation through training, tuning, and hosted deployment. Bedrock provides access to pre-built foundation models through an API rather than a custom training environment. Glue is a serverless data integration service. QuickSight is a business intelligence and dashboarding tool.

13. An agent learns to control a warehouse robot by receiving rewards for completed tasks and penalties for collisions. Which learning type is this?

Answer and explanation

Answer: B. Learning a policy from reward and penalty signals received by interacting with an environment defines reinforcement learning. Supervised learning requires labelled examples of correct outputs. Unsupervised learning finds structure in unlabelled data. Transfer learning reuses a model trained on one task for another.

14. Which service detects objects, faces, and unsafe content in images and video?

Answer and explanation

Answer: B. Rekognition analyses images and video for objects, scenes, faces, and moderation labels. Textract extracts text and structure from documents. Comprehend performs natural language processing on text. Polly synthesises speech from text.

15. A company wants an internal search tool that answers employee questions from company documents using natural language. Which purpose-built service fits?

Answer and explanation

Answer: A. Kendra is an intelligent enterprise search service that returns answers from indexed documents in response to natural language questions. Comprehend extracts entities and sentiment from text. Translate converts between languages. Forecast produces time series predictions.

16. In a supervised learning dataset, what is the difference between a feature and a label?

Answer and explanation

Answer: C. Features are the inputs and the label is the target the model learns to predict from them. The roles are not reversed. Both concepts apply across data types. They refer to different columns with different roles.

17. Which service helps detect potentially fraudulent online activities such as fake account creation, without requiring machine learning expertise?

Answer and explanation

Answer: D. Fraud Detector builds fraud detection models from a company's historical event data through a guided workflow. GuardDuty detects threats to AWS accounts and workloads. Macie classifies sensitive data in S3. Inspector assesses software vulnerabilities.

18. A model predicts whether an email is spam. Which pair of metrics describes how many spam emails it caught and how many of its spam predictions were correct?

Answer and explanation

Answer: B. Recall is the proportion of actual spam that was identified, and precision is the proportion of spam predictions that were correct. Accuracy and loss are aggregate measures that do not separate these. Mean squared error and R-squared are regression metrics. Latency and throughput are operational measures.

19. Which statement describes the trade-off between a model that is too simple and one that is too complex?

Answer and explanation

Answer: B. Underfitting and overfitting are the two failure modes at either end of model complexity, and the aim is the balance point that generalizes best. Neither extreme is universally better. Complexity affects generalization, not only training duration.

20. Several AWS AI services must be matched to the task each one performs. (Match each service to its task.)

  1. Amazon Textract
  2. Amazon Transcribe
  3. Amazon Comprehend
  4. Amazon Polly
Answer and explanation

Answer: 1-D, 2-B, 3-C, 4-A. Textract reads documents and preserves structure such as tables, which plain optical character recognition does not. Transcribe and Polly are opposites, converting speech to text and text to speech respectively, and are frequently confused for that reason. Comprehend operates on text that already exists rather than producing or extracting it. A pipeline processing recorded calls typically uses two of these in sequence: speech to text, then analysis of the text.

21. What distinguishes agentic AI from a single foundation model invocation?

Answer and explanation

Answer: C. Agentic AI adds planning and tool use so the system can take actions toward a goal rather than producing one response. Parameter count, infrastructure type, and fine-tuning all describe the model rather than the agentic pattern around it.

22. When is a traditional machine learning model more appropriate than a foundation model?

Answer and explanation

Answer: A. A well-defined prediction on structured data with an explainability requirement favours a traditional model, which is typically cheaper and more interpretable. Language generation and multi-document reasoning are foundation model strengths. Having no labelled data argues against supervised traditional ML.

23. Which term describes a model learning patterns from data that has no labels?

Answer and explanation

Answer: C. Unsupervised learning finds structure in unlabelled data. Supervised learning requires labels. Reinforcement learning learns from rewards. Transfer learning adapts a pre-trained model.

24. Which term describes a model that learns by receiving rewards or penalties for its actions?

Answer and explanation

Answer: B. Reinforcement learning optimises behaviour against a reward signal. Supervised learning uses labelled examples. Unsupervised learning finds structure without labels. Batch learning describes how data is fed rather than the learning signal.

25. What distinguishes structured data from unstructured data?

Answer and explanation

Answer: A. The distinction is organization into a predefined format. Volume, storage location, and preprocessing requirements vary independently of structure.

26. What is inference in the context of machine learning?

Answer and explanation

Answer: B. Inference is applying a trained model to new input. Training, collection, and labelling all precede inference.

27. Which term describes a model that performs well on training data but poorly on new data?

Answer and explanation

Answer: A. Overfitting means the model has learned the training data too closely to generalise. Underfitting means it has not learned enough. Bias concerns systematic error. Drift concerns change over time after deployment.

28. Which use case is best addressed by a computer vision model?

Answer and explanation

Answer: D. Identifying defects from photographs is computer vision. Summarization and translation are language tasks. Forecasting is time series prediction.

29. Which use case is best addressed by a recommendation model?

Answer and explanation

Answer: D. Recommendation predicts preference from behaviour. Text extraction, intrusion detection, and speech recognition are different task types.

30. When is a machine learning solution NOT appropriate for a business problem?

Answer and explanation

Answer: B. Fully known stable rules are implemented more cheaply and reliably as explicit logic. Large data volumes, prediction, and available examples all favour machine learning.

31. Which capability does Amazon Comprehend provide?

Answer and explanation

Answer: D. Comprehend performs natural language analysis on text. Polly converts text to speech. Textract extracts from documents. Image generation is a different capability.

32. Which stage of the machine learning lifecycle comes immediately before model training?

Answer and explanation

Answer: B. Data preparation immediately precedes training. Deployment and monitoring follow it. Problem framing occurs at the start, before data collection.

33. Why is a model monitored after deployment?

Answer and explanation

Answer: D. Drift between production and training data degrades performance over time. Storage, licensing, and data retention are not the reason for monitoring.

34. Which practice supports repeatable machine learning operations?

Answer and explanation

Answer: C. An automated versioned pipeline makes the process repeatable and auditable. Manual notebooks, documents, and ad hoc testing all vary between runs.

35. Which consideration is part of evaluating whether an AI project delivers business value?

Answer and explanation

Answer: C. Value is the measurable benefit weighed against total cost. Model counts, dataset size, and parameter count describe activity rather than value.

36. Which use case is best addressed by an anomaly detection model?

Answer and explanation

Answer: D. Anomaly detection flags observations unlike the norm. Translation, summarization, and image generation are language and generative tasks.

37. Which use case is best addressed by a forecasting model?

Answer and explanation

Answer: B. Forecasting predicts future values of a time series. Classification assigns categories, face detection is computer vision, and table extraction is document processing.

38. Which capability does Amazon Textract provide?

Answer and explanation

Answer: A. Textract reads documents and preserves structure. Transcribe converts speech to text, Translate handles languages, and Polly generates speech.

39. Which capability does Amazon Personalize provide?

Answer and explanation

Answer: C. Personalize produces recommendations from interaction data. Fraud detection, transcription, and image classification are served by other capabilities.

40. Which capability does Amazon Kendra provide?

Answer and explanation

Answer: D. Kendra provides intelligent enterprise search over an organization's content. Translation, data generation, and model monitoring are different capabilities.

41. An organization must decide between a purpose-built AI service and a custom model. Which factor favours the purpose-built service?

Answer and explanation

Answer: C. A standard capability is met most cheaply by a managed service. Unique patterns, extensive labelled data, and architecture requirements all point toward a custom model.

42. Which characteristic makes a problem suitable for machine learning?

Answer and explanation

Answer: C. Machine learning suits problems where patterns exist but explicit rules do not. Stable published rules, documented responses, and single thresholds are implemented more reliably as logic.

43. Which use case is best addressed by a computer vision model rather than a language model?

Answer and explanation

Answer: D. Counting items in an image is computer vision. Document questions, drafting, and summarization are all language tasks.

44. Which stage of the machine learning lifecycle establishes what success looks like?

Answer and explanation

Answer: B. Problem framing defines the outcome and its measurement before any data work. Collection, training, and deployment all follow it.

45. What is the purpose of a holdout test set?

Answer and explanation

Answer: C. A holdout set estimates generalization. Additional learning examples are training data, hyperparameter tuning uses a validation set, and class balancing is a data preparation step.

46. What does feature engineering involve?

Answer and explanation

Answer: A. Feature engineering transforms raw data into informative inputs. Architecture, infrastructure, and accuracy measurement are separate steps.

47. What distinguishes a hyperparameter from a parameter?

Answer and explanation

Answer: B. Hyperparameters are configured before training; parameters are learned during it. Hyperparameters apply to models generally and are not outputs.

48. What is the purpose of a machine learning pipeline?

Answer and explanation

Answer: B. A pipeline automates the lifecycle sequence for repeatability. Storage, serving, and visualization are separate concerns.

49. Which practice supports reproducing a model produced months earlier?

Answer and explanation

Answer: B. Data version, code version, and hyperparameters together determine the result. Date, author, and accuracy identify or describe the run without enabling reproduction.

50. Which consideration applies when deciding how often to retrain a model?

Answer and explanation

Answer: B. Retraining cadence follows the rate of drift weighed against cost. Training duration, staffing, and artifact size do not determine how often the model becomes stale.

51. What is the purpose of a model registry?

Answer and explanation

Answer: C. A registry versions models with metadata and approval state. Datasets, serving, and monitoring are handled elsewhere.

52. Which stage follows model evaluation when the model does not meet its target?

Answer and explanation

Answer: D. A model failing evaluation returns to earlier stages. Deploying, documenting as complete, and relaxing the threshold all ship a model known to be inadequate.

53. Which use case is best addressed by a foundation model rather than a purpose-built AI service?

Answer and explanation

Answer: C. Open-ended question answering over documents suits a foundation model. Speech recognition, object detection, and translation are served well by purpose-built services.

54. Why is a model's performance measured on data held back from training?

Answer and explanation

Answer: D. A holdout estimates generalization, which training performance cannot. Quality, speed, and regulation are not the reason.