Test
SageMaker Ground Truth
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.
Specifically designed for creating labeled datasets for machine learning, incorporating both automated and human labeling
The data, referred to as comparison and ranking data, is effectively a reward model or reward function that is then used to train the model.
Use comparison and ranking data to customize an existing model for your use case or to fine-tune a model that you build from scratch.
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.
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).
5. Following tasks
Collect and prepare data.
Build and train machine learning models.
Deploy the models and monitor the performance of their predictions.
6. is a 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. The solutions are fully customizable and showcase the use of AWS CloudFormation templates and reference architectures so that you can accelerate your ML journey.
4. 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.
5. 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. Provides access to a choice of high-performing 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) fine-tuning, or c) RAG.
Inference parameters
1 Parameters like temperature, top-p, and top-k control randomness, diversity, and 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.
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.
Difference between SageMaker JumpStart and Bedrock
While both SageMaker JumpStart and Amazon Bedrock are AWS services offering access to pre-trained AI models, the key difference is
A. JumpStart provides a wider range of models with greater customization options, allowing for fine-tuning and adaptation to specific use cases, whereas Bedrock 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;
B. JumpStart is better for developers who need flexibility to tailor models, while Bedrock is ideal for rapid prototyping and quick integration of foundational AI capabilities with less technical overhead.
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. Includes a simple, easy-to-use API that can quickly analyze any image or video file that’s stored in Amazon S3.
3. You can add features that detect objects, text, and unsafe content, analyze images/videos, and compare faces to your application using the APIs.
4. You can detect, analyze, and compare faces for a wide variety of use cases, including user verification, cataloging, people counting, and public safety.
5. Offers pre-trained and customizable computer vision (CV) capabilities to extract information and insights from your images and videos.
BLEU (Bilingual Evaluation Understudy)
1. It is one of the most widely used 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. This makes it particularly suited for assessing the performance of translation models.
3. 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 1) AWS managed keys or 2) customer-managed keys to protect their data.
2 Encryption at rest
Amazon GuardDuty
A threat detection service that monitors for suspicious activity and unauthorized behavior to protect AWS accounts, workloads, and data.
Shield Advanced
1. Helps protect workloads against Distributed Denial of Service (DDoS) events.
2. Includes AWS WAF and AWS Firewall Manager.
Supervised Learning
Train the model with a set of input data and a corresponding set of paired labeled output data
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. Takes care of the entire ingestion workflow of converting your documents into embeddings (vector) and storing the embeddings in a specialized vector database.
3. 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). If you do not have an existing vector database, Amazon Bedrock creates an OpenSearch Serverless vector store for you
Amazon Forecast
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,
Provides state-of-the-art algorithms to predict future time-series data based on historical data and requires no machine learning experience.
Here are some common use cases
1. Retail demand planning – Predict product demand, allowing you to accurately vary inventory and pricing at different store locations.
2. Supply chain planning – Predict the quantity of raw goods, services, or other inputs required by manufacturing.
3. Resource planning – Predict requirements for staffing, advertising, energy consumption, and server capacity.
4. 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. 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.
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. 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.
3. 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.
4. 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 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 It is 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. Pricing model offered by AWS for EC2 compute instances, which allows you to bid for spare EC2 capacity at reduced rates.
2. Can be interrupted by AWS with little notice.
3. This is not applicable as a pricing model for Amazon Bedrock.
SageMaker Canvas
Offers a no-code interface that can be used to create highly accurate machine learning models.
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. 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.
Gen AI Use Case
Generative models such as DALL-E, Midjourney, and Stable Diffusion are designed to transform text prompts into high-quality, photorealistic images. These models use advanced techniques like Generative Adversarial Networks (GANs) or diffusion models to generate novel visual content based on the input description.
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.
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 role personas 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. 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.
3. 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.
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. Provide transparency to models that they build and train. They can use it to document and catalog information for the sake of transparency.
3. Provide additional custom information
4. Communicate how a model is intended to support business goals.
Amazon Kendra
1. Highly accurate and easy-to-use enterprise search service that’s powered by machine learning (ML).
2. 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. 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 Goes beyond optical character recognition (OCR) to also identify the contents of fields in forms and information stored in tables.
3 Is a machine learning (ML) service that automatically extracts text, handwriting, layout elements, and data from scanned documents. It goes beyond simple optical character recognition (OCR) to identify, understand, and extract specific data from documents.
4 Not a search service.
SageMaker Data Wrangler
1. Balance your data in cases of any imbalances. Offers three balancing operators: 1) random undersampling, 2) random oversampling, and 3) Synthetic Minority Oversampling Technique (SMOTE) to rebalance data in your unbalanced datasets.
2. Reduces the time it takes to aggregate and prepare tabular and image data for ML from weeks to minutes.
3. 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.
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.
Trusted Advisor
1. Helps you optimize costs, increase performance, improve security and resilience, 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 or different responses for the same prompt on Amazon Bedrock.
Supervised Learning Types
1. Classification
2. Linear Regression
3. Neural Network
Unsupervised Learning Types
1. Clustering
2. Dimensionality Reduction
Prompt Engineering
1. Instructions – a task for the model to do (description, how the model should perform)
2. Context – external information to guide the model
3. Input data – the input for which you want a response
4. Output Indicator – the output type or format
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. 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.
3. 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
Create new data by iteratively making controlled random changes to an initial data sample. They 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. 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. Is a local interpretability method that explains individual predictions by assigning each feature a contribution score based on its marginal effect on the prediction.
2. This method is useful for understanding the impact of each feature on a specific instance's prediction.
PDP (Partial Dependence Plots)
Explain ability :
1 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.
2 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 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. Designed to capture the contextual meaning of words by looking at both the words that come before and after them (bidirectional context).
2. 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.
3. It makes ideal for tasks that require understanding the nuances and subtleties of language.
Foundation Model
1. Designed to have a broad scope, capable of handling multiple data types like text, images, and audio
2. 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.
3. 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. 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. 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. Features are used repeatedly by multiple teams and feature quality is critical to ensure a highly accurate model
Bedrock Agents
1. 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.
2. Software components or entities designed to autonomously or semi-autonomously perform specific actions or tasks based on predefined rules or algorithms.
3. Utilized to manage and execute various multi-step tasks related to infrastructure provisioning, application deployment, and operational activities.
4. For example, you can 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, and other anomalies.
2. Automatically detects and alerts you to inaccurate predictions from deployed models.
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
Bedrock Model Evaluation
1. 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.
2. Helps you 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.
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.