↑ ↓ to move, Enter to open, Esc to close

    awsAIF-C01AI Practitioner

    Switch exam

    Microsoft Azure

    aws Amazon Web Services

    Google Cloud

    ServiceNow

    Databricks

    Cisco

    Salesforce

    All exams and search
    Free exam

    Exams / AIF-C01 / D2 Fundamentals of AI and ML

    D2.1

    Fundamentals of AI and ML (part 1 of 3)

    • 8 min read
    • 9 sections
    • 35 questions
    • Exam domain: Fundamentals of AI and ML

    This chapter covers the foundational vocabulary of AI/ML that AIF-C01 tests throughout: the ML lifecycle, the supervised/unsupervised split and the techniques under each, data types, inference modes, model-fit problems, evaluation metrics, and interpretability/explainability.

    The ML lifecycle

    AWS's Well-Architected Machine Learning Lens defines a repeatable lifecycle. The exam tests both the names of the phases and their order:

    1. Business goal identification — the business problem is framed as a machine learning problem; this is also where legal/regulatory constraints are scoped.
    2. ML problem framing / data processing — the data needed to solve the problem is collected and prepared.
    3. Model development — building, training, tuning, and evaluating the model.
    4. Model deployment — the trained, validated model goes to production for inference/prediction.
    5. Model monitoring — the deployed model's live performance is tracked for drift, often feeding back into retraining.

    Define the business goal, process data, develop and train the model, deploy it, then monitor it in production, feeding drift back into retraining

    The exam asks you to order these steps in different wordings ("Define business goal and frame ML problem", "Process the data", "Develop and train the model", "Deploy the model", "Monitor model") — the order is always: goal → data → develop → deploy → monitor.

    Supervised vs. unsupervised learning

    The single most-tested distinction in this domain is whether training data carries labels:

    Supervised learning Unsupervised learning
    Input data Labeled (input and expected output given) Unlabeled
    Goal Predict a known output type Discover structure in the data
    Techniques Classification (binary, multiclass), regression Clustering, dimensionality reduction
    Example Predict loan default (yes/no) Group customers by purchasing behavior

    Training data with labels leads to supervised learning techniques like classification and regression, while unlabeled data leads to unsupervised learning techniques like clustering and dimensionality reduction

    Classification vs. regression (supervised). Binary classification assigns one of two labels (e.g., correct/incorrect, fraud/not fraud). Multiclass classification assigns one of several labels (e.g., car model, gene group). Regression predicts a continuous numeric value (e.g., house price, species count) — if the exam's expected output is a number, it's regression; if it's a category, it's classification.

    Clustering vs. dimensionality reduction (unsupervised). Clustering (e.g., K-means) groups similar, unlabeled observations so that members of a group are as similar as possible to each other and as different as possible from other groups — this is the answer whenever a question describes segmenting customers, images, or genes with no pre-existing labels. Dimensionality reduction instead reduces the number of features in a dataset while preserving structure; it is not a grouping technique.

    DeepAR and time series. Amazon SageMaker's DeepAR algorithm is a supervised algorithm purpose-built for forecasting scalar time series with recurrent neural networks — it requires historical, regularly-spaced, timestamped data (e.g., weekly sales) and is the standard answer for "predict future demand" questions.

    Data types

    Data type What it looks like Example
    Structured Standardized, tabular schema (rows/columns) A CSV of sensor measurements
    Unstructured No predefined schema Forum text, video, transcribed calls
    Time series Observations/measurements recorded at regular time intervals, each tied to a timestamp Daily internet-speed readings, hourly sales

    Recognize time series whenever a question describes repeated measurements over time used to spot intraday/seasonal patterns or to forecast a future value — this is distinct from one-off tabular, text, or image data.

    Model inference modes

    Inference is the process of running a trained model on new input data to produce a prediction — distinct from data collection, training (finding patterns), and evaluation (measuring performance), which are earlier lifecycle stages.

    Mode Fits Avoid when
    Real-time inference Low-latency, continuously available predictions Workload is not time-sensitive — wastes an always-on endpoint's cost
    Batch transform Offline inference over an entire dataset, no persistent endpoint needed You need a response in milliseconds
    Serverless inference Intermittent, bursty low-latency traffic without managing an endpoint Large payloads or need for provisioned capacity
    Asynchronous inference Large payloads queued for near-real-time processing Simple scheduled batch reporting — batch transform is cheaper

    A recurring "most cost-effective" scenario: scheduled (e.g., monthly) analysis over historical data, with no need for a constantly running endpoint → batch transform.

    Embeddings

    Embeddings are numerical vectors that represent real-world objects (words, images, items) in a reduced-dimensional space, letting models compare semantic or structural relationships mathematically. They are a representation technique — not compression, encryption, or visualization, even though a lower dimensionality can incidentally make data easier to visualize.

    Model fit: underfitting vs. overfitting

    Symptom Diagnosis Fix
    Poor performance on training data and evaluation data Underfitting (model too simple / not enough training) Increase model flexibility, train longer, add features
    Good performance on training data, poor performance on evaluation/production data Overfitting (model memorized training noise, can't generalize) Increase the volume/diversity of training data, add regularization — never reduce data or just add more training time

    The classic exam scenario — a model performs well in training, then degrades sharply once deployed to production — is overfitting, and the fix tested is almost always "collect more training data," not reducing data, adding unrelated hyperparameters, or training longer on the same data.

    Evaluation metrics

    Metric Formula / idea Best for
    Accuracy Correctly classified items ÷ total items Overall correctness on a reasonably balanced classification task
    Precision True positives ÷ all predicted positives Minimizing false positives (e.g., less time reviewing fraud alerts that aren't fraud)
    Recall True positives ÷ all actual positives Minimizing false negatives (e.g., catching every cancer case)
    F1 score Harmonic mean of precision and recall Balancing precision/recall, especially on imbalanced classes
    BERTScore Cosine similarity of contextual BERT embeddings between candidate and reference text Semantic similarity of generated vs. reference text
    ROUGE Recall-oriented n-gram/content overlap with a reference Coverage of key reference information, e.g., summarization

    Accuracy can be misleading on imbalanced datasets (a model that always predicts the majority class can still score high); F1 is the metric the exam expects when a question stresses classes with unequal example counts.

    Interpretability and explainability

    • Model interpretability — understanding how a model produces its predictions. Simpler models (linear/logistic regression, decision trees) are more interpretable than complex ones (neural networks).
    • Linear/logistic regression — the most explainable technique the exam offers: a feature's coefficient magnitude gives its global importance, and coefficient × feature value gives a local attribution for a single prediction. This is also why logistic regression is the standard answer for "interpretable model for loan-risk scoring."
    • Decision trees — explicit if-else split rules that can be traced and documented, making them the answer whenever a question asks to document how a multiclass model's internal logic drives its output (e.g., classifying genes into 20 groups).
    • Amazon SageMaker Clarify — provides both: (1) pre-training bias metrics on raw data before training, and (2) post-training feature-attribution explainability (Shapley values) showing which input features most influenced a prediction, including NLP/text features. Don't confuse it with SageMaker Model Monitor (production drift) or Model Cards (static documentation).

    Other AI/ML vocabulary tested in this domain

    • Fine-tuning — further training a pretrained model on labeled, domain/task-specific examples, so it learns specialized terminology (e.g., industry jargon). Different from data augmentation (creating synthetic training variations), model quantization (reducing numeric precision for efficiency), and continuous pre-training (further training on typically unlabeled domain data).
    • Retrieval Augmented Generation (RAG) — augments an LLM at inference time with an authoritative external knowledge source outside its training data, without retraining the model.
    • Zero-shot learning — the model performs a new task with no task-specific examples in the prompt.
    • Few-shot learning — the model is given a small number of examples in the prompt to adapt to a new task.
    • Natural language processing (NLP) — the AI field covering sentiment analysis and automatic text categorization (e.g., classifying customer feedback by topic).
    • Hallucination — an AI model generating plausible-looking but factually incorrect output (e.g., wrong numbers in an AI-generated budget).
    • BERT / masked language modeling — during pretraining, BERT randomly masks input tokens and predicts them from their bidirectional context, which is why BERT-based models are the answer for "suggest the missing word in text."
    • Amazon SageMaker Canvas — a no-code ML tool: build models and generate predictions (including forecasts) from internal and external data with no coding or ML expertise required.
    • Amazon SageMaker Model Registry — catalogs models for production, manages model versions, and manages approval status; the answer whenever a question asks to store/manage/version multiple models.

    Exam traps

    • "No pre-existing labels" + grouping/segmenting → clustering (unsupervised), never classification.
    • Numeric output → regression; categorical output → classification — don't be misled by business phrasing ("predict the number of species" is regression, not classification).
    • Good on training, bad in production → overfitting → more/better training data. Reducing data, adding unrelated hyperparameters, or training longer on the same data are always wrong fixes.
    • Minimize false positives reviewed by humans → precision. Minimize missed true cases: recall. Imbalanced classes → F1.
    • SageMaker Clarify (bias + explainability) vs. Model Monitor (production drift) vs. Model Cards (static documentation) — three different SageMaker governance features, don't swap them.
    • Linear/logistic regression and decision trees are the "most explainable/interpretable" answers; neural networks are the least.
    • Batch transform = cheapest for scheduled/offline inference with no persistent endpoint needed. Real-time/serverless/asynchronous all assume some form of low-latency or queued need the scenario doesn't have.
    • RAG (external data, no retraining) vs. fine-tuning (retrains on labeled data) vs. zero-shot (no examples) vs. few-shot (a few examples) — four different techniques for four differently-worded "enhance the model" scenarios.

    Docs

    The rest of this chapter is part of the AIF-C01 premium course

    Unlock every chapter, all 555 questions and spaced review with All access or a 90-day exam pass. Every Fundamentals exam stays free, and the first chapter of every exam is open.

    Chapters