1/220
[AIF-C01] AWS AI Practioner Certification
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
SageMaker Ground Truth
It involves human annotators for labeling data, but it is NOT specifically designed for monitoring or human review of model predictions in production
Specifically designed for creating labeled datasets for machine learning, incorporating both automated and human labeling
To train a machine learning model, you need a large, high-quality, labeled dataset. Helps you build high-quality training datasets for your machine learning models.
Offers the most comprehensive set of human-in-the-loop capabilities for incorporating human feedback across the ML lifecycle to improve model accuracy and relevancy.
Includes a data annotator for RLHF capabilities. You can give direct feedback and guidance on output that a model has generated by ranking, classifying, or doing both for its responses for RL outcomes.
You can use workers from either Amazon Mechanical Turk, a vendor company that you choose, or an internal, private workforce along with machine learning to enable you to create a labeled dataset.
You can use the labeled dataset output to train your models. You can also use the output as a training dataset for an Amazon SageMaker model.
Sagemaker AI
1. Build, train, and deploy ML models for any use case with fully managed infrastructure, tools, and workflows. Removes the heavy lifting from each step of the ML process to make it easier to develop high-quality models.
2. Provides all the components used for ML in a single toolset, so models get to production faster with much less effort and at lower cost.
3. It is a fully managed service that provides a complete machine learning lifecycle, including data preparation, model building, training, tuning, and deployment.
4. Fully managed ML service.
5. data scientists and developers can quickly and confidently build, train, and deploy ML models into a production-ready hosted environment. It provides a UI experience for running ML workflows that makes tools available across multiple integrated development environments (IDEs).
6. Following tasks
Collect and prepare data.
Build and train machine learning models.
Deploy the models and monitor the performance of their predictions.
7. Comprehensive platform for developing and deploying machine learning models, streamlining the entire ML workflow from data preparation to deployment.
SageMaker JumpStart
1. Helps you quickly get started with ML.
2. Pre-trained models are available
3. To facilitate getting started, provides a set of solutions for the most common use cases, which can be readily deployed.
4. The solutions are fully customizable and showcase the use of AWS CloudFormation templates and reference architectures so that you can accelerate your ML journey.
5. Provides both proprietary and public models.
6. Supports one-click deployment and fine-tuning of more than 150 popular open-source models such as natural language processing, object detection, and image classification models.
7. This solution requires you to configure and monitor the production endpoint that hosts the ML model.
8. Your inference and training data will NOT be used nor shared to update or train the base model
Bedrock
1. Foundation Model as a Service
2. Give access to Foundation Models from AWS and third-party providers
2. Provides access to a choice of high-performing pre-trained FMs from leading AI companies like AI21 Labs, Anthropic, Cohere, Meta, Mistral AI, Stability AI, and Amazon.
3. With these FMs as a foundation, you can further optimize their outputs with
a) Prompt engineering
b) RAG
c) Fine-tuning
Inference Parameters
1 Parameters
a Temperature
b Top-p
c Top-k
d Diversity
e Output length
2 They influence how the model generates text by adjusting the probability distribution of the next token.
ROUGE (Recall-Oriented Understudy for Gisting Evaluation)
Set of metrics used to evaluate automatic summarization of texts, in addition to machine translation quality in NLP.
To assess the performance of an FM for text generation.
The main idea is to count the number of overlapping units. This includes words, N-grams, or sentence fragments between the computer-generated output and a set of reference (human-created) texts.
SageMaker JumpStart; Bedrock
A. ____________________
1. Provides a wider range of models with greater customization options, allowing for fine-tuning and adaptation to specific use cases,
2. Better for developers who need flexibility to tailor models
3. Offers pre-built solutions and one-click deployment for various machine learning models
B. __________________
1. Focuses on a curated selection of high-quality foundation models with a simpler, more streamlined access through a single API, prioritizing ease of use over extensive customization
2. Ideal for rapid prototyping and quick integration of foundational AI capabilities with less technical overhead.
3. Provides foundational models for generative AI applications
Amazon Rekognition
1. Cloud-based image and video analysis service that makes it easy to add advanced computer vision capabilities to your applications. The service is powered by proven deep learning technology, and it requires no machine learning expertise to use.
2. Specializes in identifying text located spatially within an image, for instance, words displayed on street signs, t-shirts, or license plates. It's NOT the ideal choice for images containing more than 100 words, as this exceeds its limitation.
3. USE CASE: A traffic monitoring application needs to detect license plate numbers for the vehicles that pass a certain location from 11 PM to 7 AM every day
4. USE CASE: Classification of products into categories by using custom labels and training a model. To meet the requirements, you must provide labeled images for training.
5. Includes a simple, easy-to-use API that can quickly analyze any image or video file that’s stored in Amazon S3.
6. You can add features that detect objects, text, and unsafe content, analyze images/videos using the APIs.
7. You can detect, analyze, and compare faces for a wide variety of use cases, including user verification, cataloging, people counting, and public safety.
8. Offers pre-trained and customizable computer vision (CV) capabilities to extract information and insights from your images and videos.
9 Does NOT support PDF file formats
BLEU (Bilingual Evaluation Understudy)
1. It is one of the most widely used performance metrics for evaluating machine translation quality.
2. It compares machine-generated translations with one or more human reference translations by analyzing n-gram overlaps. It provides a quantitative measure of translation accuracy, where a higher score indicates closer alignment with the reference translation.
3. This makes it particularly suited for assessing the performance of translation models.
4. A score is typically a number between 0–1; it calculates the similarity of the machine translation to the reference human translation. The higher score represents better quality in natural language understanding (NLU).
Security Hub
Provides customers with a single dashboard to view all security findings, and to create and run automated playbooks.
KMS (Key Management Service)
1. Encrypts data and gives customers the choice and control of using
a) AWS managed keys or
b) customer-managed keys to protect their data.
2. Encryption at rest
Amazon GuardDuty
1. A threat detection service that monitors for suspicious activity and unauthorized behavior to protect AWS accounts, workloads, and data.
2. Continuously monitors your AWS accounts and workloads for malicious activity and delivers detailed security findings for visibility and remediation.
Shield Advanced
1. Helps protect workloads against Distributed Denial of Service (DDoS) events.
2. Includes AWS WAF and AWS Firewall Manager.
Supervised Learning
1 Train the model with a set of input data and a corresponding set of paired labeled output data
2. Labeled data is annotated with output labels that provide specific information about each data point
3 Examples:
a. Image classification: Images labeled with the objects they contain.
b. Sentiment analysis: Text labeled with the sentiment it expresses (e.g., positive, negative).
c. Spam detection: Emails labeled as "spam" or "not spam."
Unsupervised Learning
A type of machine learning where the model is trained on input data without labeled responses, allowing it to identify patterns and relationships in the data.
Give the algorithm input data without any labeled output data
Bedrock Knowledge Bases
1. You can give FMs and agents contextual information from your company’s private data sources for RAG to deliver more relevant, accurate, and customized responses
2 Create and manage your own private knowledge repositories
3. Takes care of the entire ingestion workflow of converting your documents into embeddings (vector) and storing the embeddings in a specialized vector database.
4. Supports popular databases for vector storage, including vector engine for Amazon OpenSearch Serverless, Pinecone, Redis Enterprise Cloud, Amazon Aurora (coming soon), and MongoDB (coming soon).
5. DEFAULT: If you do not have an existing vector database, Amazon Bedrock creates an OpenSearch Serverless vector store for you
Amazon Forecast
1. Fully managed service that uses statistical and machine learning algorithms to deliver highly accurate time-series forecasts. Based on the same technology used for time-series forecasting at Amazon.com,
2. Provides state-of-the-art algorithms to predict future time-series data based on historical data and requires no machine learning experience.
3. USE CASE: A retail company needs a solution that can help in forecasting foot traffic, visitor counts, and channel demand to efficiently manage the operating costs.
4. Here are some common use cases
a. Retail demand planning – Predict product demand, allowing you to accurately vary inventory and pricing at different store locations.
b. Supply chain planning – Predict the quantity of raw goods, services, or other inputs required by manufacturing.
c. Resource planning – Predict requirements for staffing, advertising, energy consumption, and server capacity.
d. Operational planning – Predict levels of web traffic, AWS usage, and IoT sensor usage.
AWS Region and AZ
Each AWS Region consists of a minimum of three Availability Zones (AZ)
Each Availability Zone (AZ) consists of one or more discrete data centers
Model Regularization
1. L1 or L2 regularization, are designed to prevent overfitting by adding a penalty to the loss function during training.
2. These techniques do not address the issue of data imbalance or bias, and therefore do not solve the problem of biased outputs from the image generation model.
SageMaker Clarify
1. Helps identify potential bias during data preparation without writing code.
2. You specify input features, such as gender or age, run an analysis job to detect potential bias in those features.
3. Provides tools to help explain how machine learning (ML) models make predictions.
4. Uses a model-agnostic feature attribution approach using SHAP based on Shapley and producing PDP (Partial Dependence Plots)
5. These tools can help ML modelers and developers and other internal stakeholders understand model characteristics as a whole prior to deployment and to debug predictions provided by the model after it's deployed.
6 Tools for analyzing model predictions, enhance transparency and explainability
SageMaker Model Dashboard
1. A centralized portal, accessible from the SageMaker console, where you can view, search, and explore all of the models in your account. You can track which models are deployed for inference and if they are used in batch transform jobs or hosted on endpoints.
2. Aggregates and displays data from a) Amazon SageMaker Model Cards, b) SageMaker Model Monitor and c) SageMaker Endpoint services
3. Provides insights into model deployment, usage, performance tracking, and monitoring.
4. Is a centralized repository of all models created in your account. The models are generally the outputs of SageMaker training jobs, but you can also import models trained elsewhere and host them
5. Single interface for IT administrators, model risk managers, and business leaders to track all deployed models and aggregate data from multiple AWS services to provide indicators about how your models are performing.
6. You can view details about model endpoints, batch transform jobs, and monitoring jobs for additional insights into model performance.
7. The visual display helps you quickly identify which models have missing or inactive monitors, so you can ensure all models are periodically checked for data drift, model drift, bias drift, and feature attribution drift.
8. Helps you dive deep, so you can access logs, infrastructure-related information, and resources to help you debug monitoring failures.
9. If you set up monitors with Amazon SageMaker Model Monitor, you can also track the performance of your models as they make real-time predictions on live data.
10. Extracts high-level details from each model to provide a comprehensive summary of every model in your account. If your model is deployed for inference, the dashboard helps you track the performance of your model and endpoint in real time.
11. You can select the endpoint column to view performance metrics such as CPU, GPU, disk, and memory utilization of your endpoints in real time to help you track the performance of your compute instances.
Reinforcement Learning
1. Works by having an agent take actions in an environment, receiving rewards or penalties based on the actions, and learning a policy that aims to maximize cumulative rewards over time. This process involves continuously adjusting actions based on the real-time feedback received to improve performance.
2. Better suited for dynamic and complex environments, such as games or robotic control, where exploration and adaptation are necessary.
3. This approach is particularly effective in applications like robotics, game playing, and industrial automation, where learning optimal actions through trial and error is crucial.
4. NOT APPROPRIATE: for solving straightforward mathematical problems with well-defined answers, as it does not leverage existing mathematical rules and requires significant computational resources for training.
Spot Instance
1. This is NOT available as a pricing model for Amazon Bedrock.
2. “Reserved Instance” is also NOT available as a pricing model for Amazon Bedrock.
3. Pricing model offered by AWS for EC2 compute instances, which allows you to bid for spare EC2 capacity at reduced rates.
4. Can be interrupted by AWS with little notice.
SageMaker Canvas
1. Offers a no-code interface that can be used to create highly accurate machine learning models.
2. Provides access to ready-to-use models including foundation models from Amazon Bedrock or Amazon SageMaker JumpStart or you can build your custom ML model using AutoML powered by SageMaker AutoPilot.
3. Provides a visual point-and-click interface for business analysts to solve business problems using ML such as customer churn prediction, fraud detection, forecasting financial metrics and sales, inventory optimization, content generation, and more without writing any code.
4. This makes it highly suitable for business analysts and non-technical users.
5. USE CASE: Want to use Machine Learning, but does not have dedicated data science team
Bedrock Guardrails
1. Detects sensitive information such as personally identifiable information (PIIs) in input prompts or model responses. You can also configure sensitive information specific to your use case or organization by defining it with regular expressions (regex).
2. This option dynamically scans and redacts confidential information from the model's responses, and it provides a practical and efficient solution. It allows the company to continue using the fine-tuned model without the need to retrain or delete it.
3. Prevent prompt attacks
4. This method provides real-time filtering of outputs, ensuring that any sensitive data is removed before it is presented to the end user, effectively maintaining data privacy and security.
4. Control the content (content filtering) that is generated by Bedrock.
5. Ensure that the content aligns with safety and compliance policies.
6. Avoid specific topics, filter harmful & offensive content, and monitor user inputs for violations.
7. Maintain a safe and compliant environment for generative AI applications.
8. Help implement safeguards that are customizable to your use cases and responsible AI policies.
Gen AI Use Cases
Use Case
1. Generative models such as DALL-E, Midjourney, and Stable Diffusion are designed to transform text prompts into high-quality, photorealistic images.
2. These models use advanced techniques like Generative Adversarial Networks (GANs) or diffusion models to generate novel visual content based on the input description.
3. Text, image, video, audio generation
4. Text Summarization
5. Translation
6. Chatbots
7. Code Generation
Customer
Responsible for security in the cloud
AWS
Responsible for security of cloud
Amazon Macie
1. Uses ML to automate sensitive data discovery at scale.
2. Scan S3 buckets for personally identifiable information (PII), personal health information (PHI), financial information, and other sensitive data. You can determine whether you need to remove the data or whether it needs more security protections before training or fine-tuning models.
3. Scan databases by extracting data to a data lake in Amazon S3 and then scan the database content.
4. Use to discover, classify, and protect sensitive data that is stored in Amazon S3.
5. Is useful for data security. However, it primarily focuses on data at rest
AWS Verified Access and Permissions
1 Explore further zero trust capabilities to add fine-grained access controls.
2 Further eliminate the costs, complexity and performance issues related to virtual private networks (VPNs).
SageMaker Role Manager
Provides three preconfigured role personas and predefined permissions for common ML activities. These are as follows:
Data scientist persona
MLOps persona
SageMaker compute persona
AWS PrivateLink
Establish private connectivity from your Amazon VPC to Amazon Bedrock, without having to expose your VPC to internet traffic.
Amazon Inspector
1. Vulnerability management service that continuously scans your AWS workloads for software vulnerabilities and unintended network exposure.
2. USE CASE : The company's security team is looking for an AWS service that can automate security assessments.
3. It automatically assesses applications for exposure, vulnerabilities, and deviations from best practices, making it an essential tool for ensuring the security of AI systems.
4. Automatically discovers and scans running AWS resources for known software vulnerabilities and unintended network exposure. Some of these resources include Amazon Elastic Compute Cloud (Amazon EC2) instances, container images, and Lambda functions.
5. Creates a finding when it discovers a software vulnerability or network configuration issue.
Amazon Detective
Streamlines the investigative process and helps security teams conduct faster and more effective forensic investigations.
WAF (Web Application Firewall)
Helps you protect against common web exploits and bots that can affect availability, compromise security, or consume excessive resources. You can do the following:
Filter web traffic.
Prevent account takeover fraud.
Use Bot Control to control pervasive bot traffic (such as scrapers, scanners, crawlers). Pervasive bot traffic can consume excess resources, skew metrics, cause downtime, or perform other undesired activities
Data Lineage
1. Technique used to track the history of data, including its origin, transformation, and movement through different systems.
2. Used to document the journey of the training data, from its initial sources to the final model.
3. This information can be used to provide detailed source citations and data origin documentation for transparency and reproducibility.
4. This is crucial for ensuring data privacy, security, and compliance with regulatory standards. By having a clear record of where data comes from and how it has been processed, organizations can ensure that their machine learning models are built on trustworthy and compliant data.
Cataloging
1. Involves the systematic organization and documentation of the datasets, models, and other resources used in the development of a generative AI system.
2. Can serve as a comprehensive repository of information about the components of the AI system. In addition, this information can include sources, licenses, and metadata associated with the training data.
3. Facilitates the effective management and communication of data origins and source citations to users and stakeholders.
SageMaker Model Card
1. You can capture, retrieve, and share essential model information, such as intended uses, risk ratings, and training details, from conception to deployment.
2. Document critical details about your machine learning (ML) models in a single place for streamlined governance and reporting.
3. Provide transparency to models that they build and train. They can use it to document and catalog information for the sake of transparency.
4. Provide additional custom information
5. Has a defined structure that cannot be modified. This structure gives guidance on what information should be captured in a model card.
6. Communicate how a model is intended to support business goals.
7. Support audit activities with detailed descriptions of model training and performance.
Amazon Kendra
1. Highly accurate and easy-to-use enterprise search service that’s powered by machine learning (ML).
2 USE CASE: A company wants a unified search solution that can connect the company's multiple data repositories, third-party document repositories, and FAQs to create a new search experience so that the employees can efficiently find the right answers for their queries
3. It allows developers to add search capabilities to their applications so their end users can discover information stored within the vast amount of content spread across their company.
3. Search engine built on OpenSearch foundation
4. This includes data from manuals, research reports, FAQs, human resources (HR) documentation, and customer service guides, which may be found across various systems such as Amazon Simple Storage Service (S3), Microsoft SharePoint, Salesforce, ServiceNow, RDS databases, or Microsoft OneDrive.
Amazon Textract
1. A service that automatically extracts text and data from scanned documents.
2. E.g. Extract text from thousands of receipts and invoices generated across all its stores.
3. Goes beyond optical character recognition (OCR) to also identify the contents of fields in forms and information stored in tables.
4. Provides you with the ability to extract layout elements such as paragraphs, titles, lists, headers, footers, and more from documents
5. All extracted data is returned with bounding box coordinates—polygon frames that encompass each piece of identified data, such as a word, a line, a table, or individual cells within a table.
6. Currently supports PNG, JPEG, TIFF, and PDF formats.
7. Not a search service.
SageMaker Data Wrangler
1. Simplify the process of data preparation and feature engineering, and complete each step of the data preparation workflow (including data selection, cleansing, exploration, visualization, and processing at scale) from a single visual interface.
2. You can split a machine learning (ML) dataset into train, test, and validation datasets
3. Contains over 300 built-in data transformations, so you can quickly transform data without writing code.
4. Fix bias by balancing the dataset: When the number of samples in the majority class (bigger) is considerably larger than the number of samples in the minority (smaller) class, the dataset is considered imbalanced. This skew is challenging for ML algorithms and classifiers because the training process tends to be biased towards the majority class
5. Offers three balancing operators: 1) random undersampling, 2) random oversampling, and 3) Synthetic Minority Oversampling Technique (SMOTE) to rebalance data in your unbalanced datasets.
6. A tool for data preparation and feature engineering, NOT for storing or sharing features across different teams.
6. Reduces the time it takes to aggregate and prepare tabular and image data for ML from weeks to minutes.
7. Supports various popular sources - such as Amazon Simple Storage Service (Amazon S3), Amazon Athena, Amazon Redshift, AWS Lake Formation, Snowflake, and Databricks - and over 50 other third-party sources - such as Salesforce, SAP, Facebook Ads, and Google Analytics. You can also write queries for data sources using SQL and import data directly into SageMaker from various file formats, such as CSV, Parquet, JSON, and database tables.
Amazon Comprehend
1. Uses ML and natural language processing (NLP) to help you uncover the insights and relationships in your unstructured data. This service performs the following functions:
Identifies the language of the text
Extracts key phrases, places, people, brands, or events
Understands how positive or negative the text is
Analyzes text using tokenization and parts of speech
And automatically organizes a collection of text files by topic
2. It is a natural language processing service that can analyze text and extract insights such as sentiment, entities, key phrases, and topics.
3. USE CASE: Detect and redact personally identifiable information (PII) in customer emails, support tickets, product reviews, social media, and more. No ML experience is required. For example, you can analyze support tickets and knowledge articles to detect PII entities and redact the text. Redacting PII entities helps you protect privacy and comply with local laws and regulations.
Trusted Advisor
1. Helps you optimize costs, increase performance, improve security and resilience (fault tolerance), and operate at scale in the cloud.
2. Continuously evaluates your AWS environment using best practice checks across the categories of cost optimization, performance, resilience, security, operational excellence, and service limits.
3. It then recommends actions to remediate any deviations from best practices.
Temperature
1. Value is between 0 and 1, and it regulates the creativity of the model's responses.
2. Use a lower value for more deterministic responses,
3. Use a higher value if you want creative, different responses, randomness or diversity for the same prompt on Amazon Bedrock.
Supervised Learning Types
1. Classification
2. Linear Regression
3. Decision Tree
A. Highly interpretable model
B. supervised machine learning technique that takes some given inputs and applies an if-else structure to predict an outcome. C. An example of a decision tree problem is predicting customer churn
4. Neural Network
A. More complex supervised learning technique.
B. To produce a given outcome, it takes some given inputs and performs one or more layers of mathematical transformation based on adjusting data weightings.
Unsupervised Learning Types
1. Clustering (Groups data into different clusters based on similar features or distances between the data point to better understand the attributes of a specific cluster)
2. Dimensionality Reduction (Reduce the number of features or dimensions in a dataset while preserving the most important information or patterns)
Prompt Engineering
1 Act as instructions for foundation models.
2 It focuses on developing, designing, and optimizing prompts to enhance the output of FMs for your needs.
3 It gives you a way to guide the model's behavior to the outcomes that you want to achieve.
4 The process of designing and refining the input prompts for an LLM to generate a specific type of output.
5 Involves selecting appropriate keywords and shaping the input so that the model can produce your desired outcomes.
a. Instructions – a task for the model to do (description, how the model should perform)
b. Context – external information to guide he model
c. Input data – the input for which you want a response
d. Output Indicator – the output type or format
Control Bedrock Pricing
1. For the given use case, reducing the number of tokens in the input is the most effective way to minimize costs associated with the use of a generative AI model.
2 Each token represents a piece of text that the model processes, and the cost is directly proportional to the number of tokens in the input.
3 By reducing the input length, the company can decrease the amount of computational power required for each request, thereby lowering the cost of usage.
Amazon Personalize
1. An ML service that developers can use to create individualized recommendations for customers who use their applications. Fully managed machine learning (ML) service that uses your data to generate product and content recommendations for your users.
2 Accelerates your digital transformation with ML, making it easier to integrate personalized recommendations into existing websites, applications, email marketing systems, and more.
3. Improve the discoverability of your catalog by surfacing similar items to your users. The Similar-Items (aws-similar-items) generates recommendations for items that are similar to an item you specify. Use Similar-Items to help customers discover new items in your catalog based on their previous behavior and item metadata. Recommending similar items can increase user engagement, click-through rate, and conversion rate for your application.
4. You provide data about your end-users (e.g., age, location, device type), items in your catalog (e.g., genre, price), and interactions between users and items (e.g., clicks, purchases). Uses this data to train custom, private models that generate recommendations that can be surfaced via an API. Choose to provide with additional demographic information from your users, such as age or geographic location.
5. Processes and examines the data, identifies what is meaningful, selects the right algorithms, and trains and optimizes a personalization model that is customized for your data. The service uses algorithms to analyze customer behavior and recommend products, content, and services that are likely to be of interest to them.
Amazon Q
1. Kind of Assistant or Companion
2. Help you get fast, relevant answers to pressing questions, solve problems, generate content, and take actions using the data and expertise found in your company's information repositories, code, and enterprise systems.
3. Provides immediate, relevant information and advice to help streamline tasks, speed decision-making, and help spark creativity and innovation.
4. A generative AI-powered assistant for accelerating software development and leveraging companies' internal data.
5. Generates code, tests, and debugs. It has multistep planning and reasoning capabilities that can transform and implement new code generated from developer requests.
6. Makes it easier for employees to get answers to questions across business data.
EDA (Exploratory Data Analysis)
1. Examine the data through statistical summaries and visualizations to identify patterns, detect anomalies, and form hypotheses.
2. This phase is crucial for understanding the dataset’s structure and characteristics, making it the most appropriate description of the current activities.
3. Tasks like calculating statistics and visualizing data are fundamental, helping to uncover patterns, detect outliers, and gain insights into the data before any modeling is done.
4. Serves as the foundation for building predictive models by providing a deep understanding of the data.
Confusion Matrix
1. A tool specifically designed to evaluate the performance of classification models by displaying the number of true positives, true negatives, false positives, and false negatives.
2. This matrix provides a detailed breakdown of the model's performance across all classes, making it the most suitable choice for evaluating a classification model's accuracy and identifying potential areas for improvement.
3. It provides a comprehensive overview of the model's performance by detailing how many instances were correctly or incorrectly classified in each category.
4. This enables the company to understand where the model is performing well and where it may need adjustments, such as improving the classification of specific material types.
RMSE (Root Mean Squared Error)
1. A metric commonly used to measure the average error in regression models by calculating the square root of the average squared differences between predicted and actual values.
2. NOT suitable for classification tasks, as it is designed to measure continuous outcomes, not discrete class predictions.
Diffusion Model
Model
1. Create new data by iteratively making controlled random changes to an initial data sample.
2. Start with the original data and add subtle changes (noise), progressively making it less similar to the original. This noise is carefully controlled to ensure the generated data remains coherent and realistic.
3. After adding noise over several iterations, the model reverses the process. Reverse denoising gradually removes the noise to produce a new data sample that resembles the original.
Shapley Value
Explanability
1. Used to explain the contribution of each feature to a prediction
2. Is a local interpretability method that explains individual predictions by assigning each feature a contribution score based on its marginal effect on the prediction.
3. This is from the field of cooperative game theory, that assigns each feature an importance value for a particular prediction.
4. This method is useful for understanding the impact of each feature on a specific instance's prediction.
PDP (Partial Dependence Plots)
1. For explainability
2. Provide a global view of the model’s behavior by illustrating how the predicted outcome changes as a single feature is varied across its range, holding all other features constant.
3. Help understand the overall relationship between a feature and the model output across the entire dataset.
Context Window
1. Text (measured in tokens) the AI model can process and understand at one time to generate a coherent output.
2. It determines the limit of input data that the model can use to understand context, maintain conversation history, or generate relevant responses.
3. Measured in tokens (units of text), not characters, making it the key concept for understanding data processing limits in AI models.
BERT (Bidirectional Encoder Representations from Transformers)
1. Metric designed to capture the contextual meaning of words by looking at both the words that come before and after them (bidirectional context).
2. Measures semantic similarity between texts
3. USE CASE: Uses deep learning techniques to predict missing words by considering the words before and after the gap. This makes it an ideal choice for suggesting missing words in text due to database errors, as it can understand the context and provide accurate word suggestions.
4. Unlike older models that use static embeddings, this metric creates dynamic word embeddings that change depending on the surrounding text, allowing it to understand the different meanings of the same word in various contexts.
5. It makes ideal for tasks that require understanding the nuances and subtleties of language.
Foundation Model
1. Large models that are pre-trained on a vast amount of data and that can perform several and wide-range tasks. Can be fine-tuned for downstream tasks by using smaller datasets.
2. Use unlabeled training data sets for self-supervised learning
3. Designed to have a broad scope, capable of handling multiple data types like text, images, and audio
4. Provide a broad base with generalized capabilities that can be applied to various tasks such as natural language processing (NLP), question answering, and image classification. The size and general-purpose nature make them different from traditional ML models, which typically perform specific tasks, like analyzing text for sentiment, classifying images, and forecasting trends.
5. Uses “learned to predict” the next item in a sequence. For example, with image generation, the model analyzes the image and creates a sharper, more clearly defined version of the image. Similarly, with text, the model predicts the next word in a string of text based on the previous words and their context. It then selects the next word using probability distribution techniques.
LLM (Large Language Model)
1. A type of Foundation Model
2. Specifically designed for tasks involving the understanding and generation of human language, making them more specialized.
3. Specifically focused on language-based tasks such as summarization, text generation, classification, open-ended conversation, and information extraction.
3. Specialized for language-based tasks, excelling in natural language processing (NLP).
4. Specialized for understanding and generating human language
Embeddings
1. Are a way of representing tokens (words, sub-words, or phrases) as numerical vectors to capture their semantic relationships in a high-dimensional space.
2. Numerical representations of data that captures semantic relationships
3. Help the model understand the meaning and context of tokens, but they are not the units of text themselves.
SageMaker Feature Store
1. A fully managed, purpose-built repository to store, share, and manage features for machine learning (ML) models.
2. Features are inputs to ML models used during training and inference.
3. For example, in an application that recommends a music playlist, features could include song ratings, listening duration, and listener demographics.
4. USE CASE: It allows data scientists and engineers to create a centralized, consistent, and standardized set of features (variables) that can be easily accessed and reused across different teams and projects, making it the ideal choice for sharing variables during model development
5. Features are used repeatedly by multiple teams and feature quality is critical to ensure a highly accurate model
6. Uses the AWS Glue Data Catalog by default but allows you to use a different catalog if desired.
Bedrock Agents
1. An application that carries out orchestrations through cyclically interpreting inputs and producing outputs by using a foundation model.
2. Fully managed capabilities that make it easier for developers to create generative AI-based applications that can complete complex tasks for a wide range of use cases and deliver up-to-date answers based on proprietary knowledge sources.
3. Software components or entities designed to autonomously or semi-autonomously perform specific actions or tasks based on predefined rules or algorithms.
4. Utilized to manage and execute various multi-step tasks related to infrastructure provisioning, application deployment, and operational activities.
5. Can be used to carry out customer requests.
6. USE CASE: Create to help customers process insurance claims or help customers make travel reservations. You don't have to provision capacity, manage infrastructure, or write custom code.
Top K
1. Represents the number of most likely candidates that the model considers for the next token.
2. Choose a lower value to decrease the size of the pool and limit the options to more likely outputs.
3. Choose a higher value to increase the size of the pool and allow the model to consider less likely outputs.
4. Limits the number of most probable words to the value defined in this parameter, regardless of their percent probabilities.
5. For instance, if value is set to 50, the model will only consider the 50 most likely words for the next word in the sequence, even if those 50 words only make up a small portion of the total probability distribution.
Top P
1. Represents the percentage of most likely candidates that the model considers for the next token.
2. Choose a lower value to decrease the size of the pool and limit the options to more likely outputs.
3. Choose a higher value to increase the size of the pool and allow the model to consider less likely outputs.
4. More flexible, selecting a variable number of possible next words based on their cumulative probability.
Amazon Q Apps
1. A capability within Amazon Q Business for users to create generative artificial intelligence (generative AI)–powered apps based on the organization’s data.
2. Users can build apps using natural language and securely publish them to the organization’s app library for everyone to use.
SageMaker Model Monitor
1. A service within the Amazon SageMaker suite that helps developers continuously monitor machine learning models deployed in production.
2. It ensures that models maintain optimal performance and make accurate predictions over time by detecting data quality issues, concept drift, data drift and other anomalies.
3. Automatically detects and alerts you to inaccurate predictions from deployed models.
4. Monitors the quality of ML models and data in production.
5 You cannot use to create a record of essential model information such as risk ratings, training details, and evaluation results.
Feature Engineering
1. Process of selecting, modifying, or creating new features from raw data to enhance the performance of machine learning models.
2. It is crucial because it can lead to significant improvements in model accuracy and efficiency by providing the model with better representations of the data.
Semi-supervised Learning
1. When you apply both supervised and unsupervised learning techniques to a common problem. This technique relies on using a small amount of labeled data and a large amount of unlabeled data to train systems.
2. First, the labeled data is used to partially train the machine learning algorithm.
3. After that, the partially trained algorithm labels the unlabeled data. This process is called pseudo-labeling.
4. The model is then re-trained on the resulting data mix without being explicitly programmed.
5. Example
a) Fraud Identification
b) Sentiment Analysis
c) Document Classification
Bedrock Model Evaluation Tool
1. A tool to incorporate Generative AI into your application by giving you the power to select the foundation model that gives you the best results for your particular use case.
2. Involves a comprehensive process of preparing data, training models, selecting appropriate metrics, testing and analyzing results, ensuring fairness and bias detection, tuning performance, and continuous monitoring.
Computer Vision
1. Focuses on interpreting and understanding the content of images to make decisions, such as object detection, facial recognition, and scene understanding.
2. Often uses machine learning algorithms to achieve these tasks.
Bias versus Variance Trade-off
1. Bias
a. Incorrect assumptions in the model
b. High bias can cause underfitting
2. Variance
a. Model complexity
b. High variance can cause overfitting
3. Finding a balance between bias (error due to overly simplistic assumptions in the model, leading to underfitting) and variance (error due to the model being too sensitive to small fluctuations in the training data, leading to overfitting).
4. The goal is to achieve a model that generalizes well to new data.
Validation set
1. Introduces new data to the trained model.
2. You can use it periodically measure model performance as training is happening
3 Use it to tune any hyperparameters of the model.
4 They are optional.
Test Set
1. Used on the final trained model to assess its performance on unseen data.
2. Helps determine how well the model generalizes.
Machine Learning Models
1. Model that can be deterministic or probabilistic or a mix of both, depending on their nature and how they are designed to operate.
2. Deterministic models always produce the same output given the same input. Their behavior is predictable and consistent. Example: Decision Trees: Given the same input data, a decision tree will always follow the same path and produce the same output.
3. Probabilistic models provide a distribution of possible outcomes rather than a single output. They incorporate uncertainty and randomness in their predictions. Example: Bayesian Networks: These models represent probabilistic relationships among variables and provide probabilities for different outcomes.
Multimodal Model
1. Can accept a mix of input types such as audio/text and create a mix of output types such as video/image
2. An artificial intelligence system designed to process and understand multiple types of data, such as text, images, audio, and video. Can integrate and make sense of information from various sources, allowing them to perform more complex and versatile tasks.
3. Represent a significant advancement in AI, enabling the integration and understanding of multiple types of data. By combining different modalities, these models can perform a wide range of complex tasks, making them highly versatile and powerful tools in various fields.
Hallucination
What can high temperature cause?
Transformer Model
1. This model uses a self-attention mechanism. They weigh the importance of different parts of an input sequence when processing each element in the sequence.
2. Self-attention allows the model to weigh the importance of different words in a sentence when encoding a particular word. This helps the model capture relationships and dependencies between words, regardless of their position in the sequence.
2. ChatGPT is an example
3. Working of Model : Imagine a sentence as a sequence of words. Self-attention helps the model focus on the relevant words as it processes each word. To capture different types of relationships between words, the model employs multiple encoder layers called attention heads. Each head learns to attend to different parts of the input sequence. This allows the model to simultaneously consider various aspects of the data.
Chat Generative Pretrained Transformer
Chat GPT Fullform
Diffusion Model Examples
Model Examples
1. DALL-E
2. Adobe Firefly
3. Stable Diffusion
Response Length
1. Represents the minimum or maximum number of tokens to return in the generated response.
2. Refers to the settings that control the maximum length of the generated output and specify the stop sequences that signal the end of the generation process.
3. This parameter helps to prevent the model from generating excessive or infinite output, which could lead to resource exhaustion or undesirable behavior
Amazon Q in Connect
1 Contact center service from AWS. Amazon Q helps customer service agents provide better customer service.
2 Uses real-time conversation with the customer along with relevant company content to automatically recommend what to say or what actions an agent should take to better assist customers.
3 Developed in Amazon Bedrock
No
Can you perform RLHF (Reinforcement Learning from Human Feedback) in Bedrock ?
Self Supervised Learning
1. It works when models are provided vast amounts of raw, almost entirely, or completely unlabeled data and then generate the labels themselves.
2. This means no one has instructed or trained the model with labeled training data sets.
CNN (Convolutional Neural Network)
1 Model designed specifically for image recognition and processing tasks and is highly effective for analyzing visual data.
2. Excel at identifying patterns in images and other grid-like data, like videos, due to their architecture which is inspired by the human visual cortex.
3. USE CASE: They are commonly used in applications like self-driving cars, facial recognition, and medical image analysis.
Weight
1. Prompt engineering does NOT change the ______ of the FM.
2. Retrieval-Augmented Generation (RAG) does NOT change the ______ of the FM.
3. Fine-tuning DOES change the ________ of the FM.
Overfitting
1. Model learns the training data too well, including noise and outliers, leading to excellent performance on the training data, but poor generalization to new, unseen data.
2. High Variance & Low Bias
3. Model is too complex, meaning it has too many parameters relative to the number of observations.
Underfitting
1. Model is too simplistic to capture the underlying patterns in the data, resulting in poor performance on BOTH the training data and new data.
2. Due To : High Bias and Low Variance
3. Ideal Stage : Low Bias and Low Variance
Amazon Augmented AI (A2I)
1. Service that helps build the workflows required for human review of ML predictions.
2. Brings human review to all developers and removes the undifferentiated heavy lifting associated with building human review systems or managing large numbers of human reviewers.
3. It integrates human judgment into ML workflows, allowing for reviews and corrections of model predictions, which is critical for applications requiring high accuracy and accountability.
4 High confidence predictions are sent immediately to client. Low confidence predictions are sent for human review and weighted scores are sent to S3 and the predictions are sent to client
4. USE CASE: A company needs to support human reviews and audits for its ML model predictions. The solution should be easy to implement and have the facility to add multiple reviewers.
IAM Identity Center
1. Create or connect workforce users and centrally manage their access across all their AWS accounts and applications.
2. You need to configure this instance for your Amazon Q Business application environment with users and groups added.
3. Amazon Q Business supports both organization and account-level instances.
4. USE CASE : Options for user management that offer secure, scalable, and easy-to-administer controls within Amazon Q Business.
Model Training In Deep Learning
Training
Involves using large datasets to adjust the weights and biases of a neural network through multiple iterations, using techniques such as gradient descent to minimize the error
Techniques such as gradient descent are used to minimize the error by computing the gradient of the loss function and updating the weights to reduce the prediction error.
Involves initializing a neural network, feeding it data, calculating losses, adjusting weights using optimization algorithms, and iterating through this process until the model achieves satisfactory performance.
Proper data preparation, validation, and hyperparameter tuning are crucial steps to ensure the model generalizes well to new, unseen data.
Audit Manager
1. Helps automate the collection of evidence (automate evidence collection) to continuously audit your AWS usage.
2. It simplifies the process of assessing risk and compliance with regulations and industry standards, making it an essential tool for governance in AI systems.
3 Helps you continuously audit your AWS usage to simplify how you assess risk and compliance with regulations and industry standards.
4. While it is useful for compliance and audit purposes, it DOES NOT provide continuous monitoring and configuration assessment of AWS resources like AWS Config does.
AWS Artifact
1. Specifically designed to provide access to a wide range of AWS compliance reports & certifications, including those from Independent Software Vendors (ISVs).
2. Allows users to configure settings to receive notifications when new compliance documents or reports are available. This capability makes it an ideal choice for a company that needs timely email alerts regarding the availability of ISV compliance reports.
3. Provides on-demand access to AWS’ compliance reports and online agreements.
4. It is useful for obtaining compliance documentation
5 Does NOT provide continuous auditing or automated evidence collection.
Benefits of Cloud Computing
1. Benefit from massive economies of scale
2. Trade capital expense for variable expense
3. Go global in minutes and deploy applications in multiple regions around the world with just a few clicks
Interpretability; Explainability
A. ________
1. Is about understanding the internal mechanisms of a machine learning model
2. Is a pre-deployment approach, focusing on designing inherently understandable models
B. ________
1. Focuses on providing understandable reasons for the model's predictions and behaviors to stakeholders
2. Is a post-deployment approach, focusing on understanding complex models after they've been trained
Feature Engineering
Engineering Activities
For structured data typically includes tasks like normalization, handling missing values, and encoding categorical variables.
For unstructured data, such as text or images, involves different tasks like tokenization (breaking down text into tokens), vectorization (converting text or images into numerical vectors), and extracting features that can represent the content meaningfully.
Prevent Overfitting
1. Techniques such as cross-validation, regularization, and pruning are employed.
2. Cross-validation helps ensure the model generalizes well to unseen data by dividing the data into multiple training and validation sets.
3. Regularization techniques, such as L1 and L2 regularization, penalize complex models to reduce overfitting.
4. Pruning simplifies decision trees by removing branches that have little importance.
AI Service Card
A. Provide comprehensive information about specific AI services offered by a provider, like Amazon Web Services (AWS).
B. Form of responsible AI documentation that provides a single place to find information on the
1. Intended use cases and limitations,
2. Responsible AI design choices, and
3. Deployment and performance optimization best practices for AWS AI services.
4. Provide transparency for AWS services
Neural Network
1 Consist of layers of nodes (neurons) that process input data, adjusting the weights of connections between nodes through training to recognize patterns and make predictions
2. The nodes process input data and adjust the weights of the connections between them during the training phase.
3. This process allows the network to learn to recognize patterns and make predictions based on the data.
Data Residency ; Data Retention
1 ____________ refers to the geographical or physical location where data is stored, which is crucial for compliance with regional laws and regulations.
2. ___________ , on the other hand, involves policies and practices related to how long data should be kept, archived, or deleted, ensuring that data is available when needed and disposed of when no longer required.