SkillSprout
Chapter 5 · Lesson 4
Beginner
5 min read

AI, Machine Learning and Generative AI Services

Overview

Artificial intelligence (AI) lets computers do tasks that normally need human intelligence; machine learning (ML) is the technique where models learn patterns from data instead of following hand-written rules. Generative AI creates new content - text, images, code - using large foundation models.

AWS organises this into three layers. At the top are ready-made AI services, like hiring a specialist who already knows the job. In the middle is Amazon SageMaker, a workshop for building and training your own models. At the bottom are chips and infrastructure for heavy training.

For CLF-C02 you are not expected to build models. You should recognise the AI services by what they do and understand responsible AI basics.

Key Concepts

  • Amazon SageMaker AI is a managed platform to build, train and deploy your own ML models.
  • Amazon Rekognition analyses images and video (faces, objects, text, moderation).
  • Amazon Comprehend performs natural language processing: sentiment, entities, key phrases; Amazon Translate translates languages.
  • Amazon Transcribe converts speech to text; Amazon Polly converts text to speech; Amazon Lex builds chatbots (the engine behind Alexa).
  • Amazon Textract extracts text and data from documents and forms; Amazon Kendra provides intelligent enterprise search.
  • Amazon Bedrock offers foundation models from multiple providers through one API for generative AI applications; Amazon Q is a generative AI assistant for work and developers.
  • Amazon Personalize builds real-time recommendations; Amazon Kendra provides intelligent enterprise search.
  • Responsible AI covers fairness, explainability, privacy, transparency and safety.

Detailed Notes

The three layers of AWS AI/ML

LayerYou...Examples
AI services (pre-trained)Call an API, no ML expertise neededRekognition, Comprehend, Transcribe, Polly, Textract
ML platformBuild, train, deploy custom modelsSageMaker AI
InfrastructurePick chips and instancesTrainium, Inferentia, GPU instances (EC2 P/G)

Service finder

If the task is...Use
Recognise objects, faces or unsafe content in images/videoRekognition
Convert audio to textTranscribe
Convert text to natural speechPolly
Chatbot or voice botLex
Analyse sentiment or entities in textComprehend
Translate textTranslate
Extract fields from invoices and formsTextract
Product recommendationsPersonalize
Intelligent search across company documentsKendra
Build and train custom modelsSageMaker AI
Use foundation models for generative AIBedrock
AI assistant for questions, code and company dataAmazon Q

Generative AI on AWS

Amazon Bedrock is a fully managed service giving access to foundation models (from Amazon and other providers) through a single API. Key capabilities include prompt engineering, Retrieval Augmented Generation (RAG) with Knowledge Bases (grounding answers in your data), fine-tuning, and Guardrails for safety filters. Your data is not used to train the underlying shared models.

bash
aws bedrock list-foundation-models --query "modelSummaries[].modelId"

Key AI/ML terms

TermMeaning
TrainingTeaching a model by feeding data
InferenceUsing a trained model to make predictions
Foundation modelLarge pre-trained model adaptable to many tasks
PromptThe instruction or question given to a generative model
RAGRetrieve relevant data and add it to the prompt to improve accuracy
HallucinationA model producing confident but incorrect output
OverfittingA model memorises training data and generalises poorly

Other AI/ML services in scope

ServicePurpose
Amazon LexBuild conversational chatbots
Amazon KendraIntelligent enterprise search
Amazon PersonalizeProduct and content recommendations
Amazon ComprehendNatural language processing (sentiment, entities)
Amazon TranslateLanguage translation
Amazon QGenerative AI assistant for work and development

Choose a pre-trained AI service when the task is common; use SageMaker AI when you need custom models.

Responsible AI

Good AI practice includes fairness (avoiding bias), explainability, privacy and security, transparency, robustness and governance. SageMaker Clarify helps detect bias, and Bedrock Guardrails filters harmful content.

Shared responsibility

AWS secures the AI infrastructure and managed models; you secure your data, control access with IAM, and decide how outputs are used, including reviewing for accuracy and bias.

json
{
  "task": "Analyse customer reviews",
  "service": "Amazon Comprehend",
  "output": ["sentiment", "key phrases", "entities"]
}

Real World Example

A call-center company uses Transcribe to convert recorded calls to text, Comprehend to score customer sentiment, and Translate to handle multiple languages, giving managers insight without building any ML models.

For customer self-service, they create a Lex chatbot and use Bedrock with a knowledge base so the assistant answers from the company's own policy documents. A data science team uses SageMaker AI to train a custom churn-prediction model.

Architecture Diagram

Picking an AI service
Architecture
AWS AI / ML
Audio / text / images

Pre-trained AI services

Transcribe / Polly
Rekognition / Textract
Comprehend / Translate
SageMaker AICustom models
BedrockFoundation models
  1. 1Identify the task: vision, language, speech, documents or generation.
  2. 2Start with a pre-trained AI service when one matches the task.
  3. 3Use SageMaker AI when you need a custom-trained model.
  4. 4Use Bedrock for generative AI with foundation models and guardrails.

Best Practices

  • ✓Start with pre-trained AI services before building custom models.
  • ✓Ground generative AI in your data with RAG to reduce hallucinations.
  • ✓Apply Guardrails and human review for sensitive use cases.
  • ✓Protect training data with encryption and IAM, and track data lineage.
  • ✓Evaluate models for bias and fairness before deployment.

Common Interview Questions

Exam Tips

CLF-C02 focus

  • "Speech to text" = Transcribe; "text to speech" = Polly; "chatbot" = Lex.
  • "Image and video analysis" = Rekognition; "extract data from documents" = Textract.
  • "Build and train custom ML models" = SageMaker AI; "foundation models" = Bedrock.
  • Know basic terms: training, inference, prompt, RAG, hallucination, bias.

Finished this lesson?

0 of 43 lessons done · 0% of the course