AWS-119 · Lesson 3 of 12 · 21 min
Domain 1 review: AI and ML fundamentals
▶ Video coming soon A video version of this lesson is on the way.
Domain 1 carries 20 of every 100 scored points, roughly ten questions. It is the domain Jonah knows best, because he spent October building the no-show analysis with Noor: three years of appointment history, about 410,000 appointments, a no-show rate of about 7 in 100, and a first model that caught most missed appointments without flooding the clinics with false alarms. Noor warned him that familiarity is a risk. "You know the story of our model," she wrote. "The exam knows the vocabulary. Make sure you can say every term precisely, not just recognize it." This lesson reviews the three task statements of domain 1, then gives you original practice items.
Task 1.1: basic concepts and terms
Artificial intelligence is the broad field of systems that perform tasks associated with human intelligence. Machine learning is a subset of AI in which systems learn patterns from data rather than following hand-written rules. Deep learning is a subset of machine learning that uses neural networks with many layers, and it powers most modern image, speech and language systems. Generative AI uses deep learning models, especially large foundation models, to create new content. Computer vision is the part of AI that interprets images and video; natural language processing interprets and produces human language. A model is the learned function; an algorithm is the method used to learn it; training is the process of learning from data; and inference is using the trained model to make predictions on new data.
The guide names several inference types. Real-time inference returns a prediction immediately for each request, through an endpoint that is always running, which suits a booking screen that must flag a likely no-show as the appointment is made. Batch inference processes many records at once on a schedule, which suits scoring tomorrow's 1,800 appointments every evening. Asynchronous inference queues requests that may take longer, such as large files, and returns results when ready. Serverless inference scales to zero when idle and suits traffic that is light or unpredictable, at the cost of occasional delays when it wakes. A typical exam question describes the workload and asks which inference option fits.
Domain 1 also expects you to recognize types of data and types of learning. Data can be labelled, with the correct answer attached, or unlabelled. It can be tabular, time-series, image, text or audio, and it can be structured or unstructured. Supervised learning learns from labelled examples and is used for classification and regression. Unsupervised learning finds structure without labels, as in clustering clients into groups by visit patterns. Reinforcement learning learns by trial and error from rewards. The guide also mentions agentic AI as a basic concept: systems in which a model plans steps and calls tools to complete a goal rather than answering a single prompt. Domain 2 goes deeper into agents.
Task 1.2: practical use cases
The second task statement is about judgement. You should know when AI and machine learning add value, for example by assisting human decisions, scaling a task, or automating repetitive work, and when they are not appropriate. AI is a poor fit when a fixed rule gives the right answer, when the cost of building and maintaining a model outweighs the benefit, or when the task needs a specific, explainable outcome that a probabilistic model cannot guarantee. Noor's favourite example from the assessment is vaccine due dates. The group considered a model to predict them and rejected it, because the protocol sets the schedule exactly: a rules engine is enough and is easier to audit.
You should also match problems to machine learning techniques. Regression predicts a number, such as how many appointments a clinic will have next Monday. Classification predicts a category, such as whether an appointment will be missed. Clustering groups similar items without labels, such as grouping clients by visit patterns for a newsletter. And you should know the managed AI services that solve common problems without training a model: Amazon Transcribe turns speech into text, Amazon Translate translates text, Amazon Comprehend finds meaning in text such as sentiment, key phrases and entities, Amazon Lex builds conversational chatbots, and Amazon Polly turns text into lifelike speech. The guide names these explicitly, so expect at least one question that tests which is which.
| Need | Technique or service | Why |
|---|---|---|
| Predict next Monday's appointment count | Regression | The output is a number |
| Flag appointments likely to be missed | Binary classification | The output is one of two categories |
| Group clients by visit patterns, no labels | Clustering | Unsupervised; finds structure |
| Turn after-hours call recordings into text | Amazon Transcribe | Speech to text |
| Read reminder messages aloud on a phone call | Amazon Polly | Text to speech |
| Find themes in client review comments | Amazon Comprehend | Natural language processing |
| Translate client letters into French | Amazon Translate | Machine translation |
| A chatbot that books appointments | Amazon Lex | Conversational interface |
Task 1.3: the machine learning lifecycle
The lifecycle starts with a business goal and moves through data collection, data preparation and feature engineering, model training and tuning, evaluation, deployment and monitoring. Monitoring feeds back into the start: when the data changes and accuracy drops, a process called drift, the model is retrained. The guide asks you to recognize the components of this pipeline and the AWS services that support each stage. Amazon SageMaker AI supports most of the stages for teams that build models, with tools for data preparation, training, tuning, deployment and monitoring. SageMaker Data Wrangler prepares data; SageMaker Feature Store stores and shares features; SageMaker Model Monitor watches a deployed model for drift. For people who do not code, SageMaker Canvas offers a visual way to build models, which is how Noor first prototyped the no-show model before moving it to SageMaker AI training.
The guide also covers where foundation models come from and how they are hosted. You can use a pre-trained foundation model through a managed API, as Amazon Bedrock provides, or host an open model yourself, for example through SageMaker JumpStart. A managed API means AWS runs the model and you pay per use; self-hosting gives more control but more operational work. The term MLOps means applying engineering discipline to machine learning: repeatable experiments, automated pipelines, version control for data and models, monitoring and governance. On the exam, MLOps answers usually involve automation and monitoring rather than one-off manual steps.
Metrics: model performance and business value
Domain 1 expects you to know common model metrics and to connect them to business outcomes. Accuracy is the share of all predictions that are correct, which can be misleading when one outcome is rare. With a no-show rate of about 7 in 100, a model that predicts that everyone will attend is right 93 times in 100 and useless. Precision answers: of the appointments the model flagged, how many were really missed? Recall answers: of the appointments that were really missed, how many did the model flag? The F1 score combines precision and recall into one number. Area under the ROC curve, or AUC, summarizes how well a model separates the two classes across all thresholds. For regression, mean squared error and similar measures describe the size of errors.
Business metrics answer a different question: is the model worth it? Examples include cost per prediction, cost savings, customer satisfaction, return on investment and, in Jonah's case, recovered appointment slots. The group's pilot, planned for February 2027, measures how many flagged appointments are filled from the waiting list after an extra reminder. The model metric tells you whether the predictions are good; the business metric tells you whether they help. A frequent exam pattern gives you a model with high accuracy and asks why the business is unhappy. The answer is usually that the metric chosen does not reflect the cost of the errors that matter.
Choosing between a managed service and a custom model
A recurring domain 1 question asks whether a managed AI service or a custom model fits better. If a managed service already does the job, such as transcribing speech, translating text or detecting sentiment, it is usually the right answer: no training data, no model to maintain and fast results. A custom model makes sense when the problem is specific to the organization's own data and no managed service addresses it, as with the no-show prediction, which depends on the group's own booking history. Traditional machine learning also often beats a foundation model for structured, tabular prediction tasks, because it is cheaper, faster and easier to explain. Expect options that offer a large language model for a simple tabular classification problem; on this exam, that is usually a distractor.
Domain 1 also includes the sources of foundation models. Some are proprietary and offered only through an API; others are open-weight models whose parameters are published, so they can be hosted, inspected and fine-tuned by anyone who accepts the licence. Bedrock offers models from several providers, and SageMaker JumpStart offers many open models for teams that want to host them. An exam scenario that stresses full control over where a model runs, or the ability to inspect and modify it, leans toward an open model hosted by the team; one that stresses speed and minimal operations leans toward a managed API.
Worked problem
Choosing the metric that matters
The group's no-show model flags appointments so that staff can send a second reminder. A second reminder costs very little, but a missed appointment costs a clinic slot. Should the team favour precision or recall when choosing the model's threshold?
Show solution
- A false positive (flagging someone who would have come) costs one extra reminder: cheap.
- A false negative (missing someone who will not come) costs an empty slot: expensive.
- Recall measures how many real no-shows the model catches, so it reduces false negatives.
- So the team should accept lower precision in exchange for higher recall, within reason.
Answer: Favour recall. Precision would matter more if each flag led to a costly or harmful action, which is why the group never refuses a booking based on the model.
tp, fp, fn, tn = 44, 63, 27, 866
precision = tp / (tp + fp)
recall = tp / (tp + fn)
f1 = 2 * precision * recall / (precision + recall)
accuracy = (tp + tn) / (tp + fp + fn + tn)
print("precision", round(precision, 2), "recall", round(recall, 2), "F1", round(f1, 2), "accuracy", round(accuracy, 2))precision 0.41 recall 0.62 F1 0.49 accuracy 0.91
What this code does
It calculates precision, recall, F1 and accuracy from the four counts of a confusion matrix: true positives, false positives, false negatives and true negatives. It prints the four results. Accuracy looks high at 0.91 while precision is only 0.41, a common exam point about why accuracy alone can mislead on rare events.
Practice items for domain 1
Try these original items before reading the answers. First: a shelter partner wants to estimate how many litres of food it will need each week, based on past intake. Which technique fits? Regression, because the answer is a number. Second: the group wants to read the text from scanned lab reports into the records system. Which service fits? Amazon Textract, which extracts text and data from documents; Comprehend would be the next step if they wanted meaning from that text. Third: the team needs to score every appointment for the next day once each evening. Which inference type fits? Batch inference. Fourth: a model performed well at launch but its recall has fallen over six months as booking habits changed. What is happening, and which tool helps detect it? Drift, detected by monitoring such as SageMaker Model Monitor. Fifth: is AI appropriate for deciding which pet should be seen first in the emergency waiting room? The guide's judgement skills, and the group's own rule, say no: triage priority is a clinical decision that stays with a veterinarian or credentialed technician, though AI could help with administrative steps around it.
Common mistakes
MistakeTreating accuracy as the main metric for a rare event.
InsteadFor rare outcomes, look at precision and recall; accuracy can hide a useless model.
MistakeConfusing Amazon Comprehend with Amazon Textract.
InsteadTextract pulls text out of documents; Comprehend finds meaning in text.
MistakeChoosing real-time inference for a nightly scoring job.
InsteadBatch inference suits large scheduled jobs; real-time suits one request at a time.
MistakeUsing machine learning where a fixed rule gives the answer.
InsteadIf a rule is exact and auditable, a rules engine is enough.
MistakeThinking deep learning and machine learning are separate fields.
InsteadDeep learning is a subset of machine learning, which is a subset of AI.
Summary and key terms
- AI contains machine learning, which contains deep learning; generative AI builds on deep learning.
- Inference can be real-time, batch, asynchronous or serverless; match it to the workload.
- Regression predicts numbers, classification predicts categories, clustering finds groups without labels.
- Know the managed services: Transcribe, Translate, Comprehend, Lex, Polly, and Textract for documents.
- The lifecycle ends in monitoring for drift; MLOps automates and governs the pipeline.
- Choose model metrics that reflect the cost of errors, and pair them with business metrics.
- Inference
- Using a trained model to make predictions on new data.
- Batch inference
- Scoring many records together on a schedule.
- Drift
- A change in data or behaviour that makes a model less accurate over time.
- Precision
- Of the items a model flagged, the share that were truly positive.
- Recall
- Of the truly positive items, the share the model flagged.
- MLOps
- Engineering practices that automate, monitor and govern the machine learning lifecycle.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Which inference type scales to zero when idle?
Show answer
Serverless inference.
Which service turns text into speech?
Show answer
Amazon Polly.
Which metric answers: of the real no-shows, how many did we catch?
Show answer
Recall.
Name the stage that detects drift.
Show answer
Monitoring.
Which technique predicts a category?
Show answer
Classification.
Give one sign that AI is not appropriate.
Show answer
A fixed rule gives the exact answer, or the cost outweighs the benefit, or an exact explainable outcome is required.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.