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
| Layer | You... | Examples |
|---|---|---|
| AI services (pre-trained) | Call an API, no ML expertise needed | Rekognition, Comprehend, Transcribe, Polly, Textract |
| ML platform | Build, train, deploy custom models | SageMaker AI |
| Infrastructure | Pick chips and instances | Trainium, Inferentia, GPU instances (EC2 P/G) |
Service finder
| If the task is... | Use |
|---|---|
| Recognise objects, faces or unsafe content in images/video | Rekognition |
| Convert audio to text | Transcribe |
| Convert text to natural speech | Polly |
| Chatbot or voice bot | Lex |
| Analyse sentiment or entities in text | Comprehend |
| Translate text | Translate |
| Extract fields from invoices and forms | Textract |
| Product recommendations | Personalize |
| Intelligent search across company documents | Kendra |
| Build and train custom models | SageMaker AI |
| Use foundation models for generative AI | Bedrock |
| AI assistant for questions, code and company data | Amazon 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.
aws bedrock list-foundation-models --query "modelSummaries[].modelId"
Key AI/ML terms
| Term | Meaning |
|---|---|
| Training | Teaching a model by feeding data |
| Inference | Using a trained model to make predictions |
| Foundation model | Large pre-trained model adaptable to many tasks |
| Prompt | The instruction or question given to a generative model |
| RAG | Retrieve relevant data and add it to the prompt to improve accuracy |
| Hallucination | A model producing confident but incorrect output |
| Overfitting | A model memorises training data and generalises poorly |
Other AI/ML services in scope
| Service | Purpose |
|---|---|
| Amazon Lex | Build conversational chatbots |
| Amazon Kendra | Intelligent enterprise search |
| Amazon Personalize | Product and content recommendations |
| Amazon Comprehend | Natural language processing (sentiment, entities) |
| Amazon Translate | Language translation |
| Amazon Q | Generative 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.
{
"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
- 1Identify the task: vision, language, speech, documents or generation.
- 2Start with a pre-trained AI service when one matches the task.
- 3Use SageMaker AI when you need a custom-trained model.
- 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

