










































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











































The information provided in the Cheat Sheet is for educational purposes only; created in our efforts to help aspirants prepare for the AWS AI Practitioner—Beta Exam. Though references have been taken from AWS documentation , it’s not intended to be a substitute for the official docs. The document can be reused, reproduced, and printed in any form; ensure that appropriate sources are credited and required permissions are received.
Fundamentals of AI and ML Artificial Intelligence
● Artificial Intelligence (AI) is a field of computer science focused on developing systems that can exhibit intelligent behavior, such as reasoning, learning, and autonomous action. ● AI functions by combining large amounts of data with intelligent algorithms. These algorithms are trained on the data to learn patterns and make informed decisions. This process enables AI to perform tasks that require human-like intelligence, such as understanding language and driving vehicles. ● AWS offers a range of pre-built AI services, as well as customizable infrastructure options, designed to streamline AI development and reduce costs.
Data Collection: AI systems require vast amounts of data to learn from. This data can be anything from images and text to numerical values. Algorithm Selection: The appropriate algorithm is chosen based on the specific task the AI is designed to perform. Common algorithms include: ● Machine Learning: It involves training algorithms on large datasets to identify patterns and make predictions. ● Deep Learning: A subset of machine learning that uses artificial neural networks to learn from complex patterns. ● Natural Language Processing (NLP): AI can understand and respond to human language. ● Training: The algorithm is trained on the collected data. This involves feeding the data into the algorithm and allowing it to learn from it. ● Testing: The trained algorithm is tested on new data to evaluate its performance. ● Deployment: Once the algorithm has been tested and refined, it can be deployed in real-world applications.
Artificial intelligence architecture consists of three core layers. All the layers run on IT infrastructure that provides the necessary compute and memory resources for the AI to run. Layer 1: Data layer The data layer is the cornerstone of AI. It involves preparing and organizing data for use in machine learning, natural language processing, and image recognition technologies.
Layer 2: Model layer The model layer focuses on the AI system's decision-making capabilities. Organizations often select pre-existing foundation models or large language models and customize them using techniques that incorporate relevant data. Layer 3: Application layer The application layer is the user-facing interface of the AI system. It allows users to interact with the AI, request specific tasks, generate information, or make data-driven decisions.
Chatbots and smart assistants- ● Chatbots and smart assistants powered by AI are increasingly capable of conducting conversations that resemble human interactions. Intelligent document processing- ● Intelligent document processing (IDP) transforms business documents such as emails, images, and PDFs into organized, structured information. IDP leverages AI technologies, including natural language processing (NLP), deep learning, and computer vision, to extract, categorize, and validate data. Application performance monitoring- ● AI-driven APM tools leverage historical data to anticipate potential issues before they arise. Additionally, these tools can address problems in real time by offering developers practical solutions, ensuring smooth application operations, and resolving performance bottlenecks. Predictive maintenance- ● AI-driven predictive maintenance leverages vast amounts of data to detect potential issues that could cause operational, system, or service interruptions. By anticipating problems before they arise, predictive maintenance helps businesses minimize downtime and avoid disruptions. Medical research- ● AI technology in medical research streamlines automates repetitive tasks, and handles large datasets. It can be employed to enhance the entire pharmaceutical discovery and development process, transcribe medical records, and accelerate the time-to-market for new products. Business Analytics- ● Business analytics leverages AI to gather, process, and examine intricate datasets. With AI-driven analytics, you can predict future trends, identify underlying causes within the data, and streamline time-consuming tasks.
Basic AI Terminologies
Machine Learning (ML) is a subset of artificial intelligence (AI) focused on developing algorithms that improve automatically through experience and data. Simply put, machine learning allows computers to learn from data and make decisions or predictions without explicit programming.
Deep learning, a subset of artificial intelligence, enables computers to learn from data like human cognition. By analyzing complex patterns within images, text, audio, and other forms of data, deep learning models can provide accurate insights and predictions. These models can automate tasks that traditionally necessitate human intelligence, such as image description or transcription of audio files into text.
Large language models (LLMs) are sophisticated deep learning models trained on extensive text datasets. These models utilize a transformer architecture, a neural network framework composed of an encoder and decoder. The encoder and decoder leverage self-attention mechanisms to extract contextual meaning from text sequences, comprehending the relationships between words and phrases.
➔ Broader Implications : AI systems have substantial effects on individuals, communities, and the environment. ➔ Ethical Priorities : Organizations should emphasize fairness, transparency, and ethical considerations in AI practices. ➔ Balancing Act : Businesses must balance ethical AI practices with the pursuit of competitive advantage in a fast-evolving field.
Artificial neural networks serve as the foundation for many artificial intelligence systems. Inspired by the human brain's structure and function, these networks employ interconnected computational units, often referred to as artificial neurons or nodes. Similar to biological neurons, these nodes process information through mathematical calculations. By working together in a network, these nodes can collectively solve complex problems and learn from data.
Natural language processing (NLP) employs neural networks to extract meaning from textual data. It leverages computational methods designed to comprehend human language, enabling machines to process words, grammar, and sentence structure. This technology facilitates tasks such as document summarization, chatbot interactions, and sentiment analysis.
Computer vision, powered by deep learning, enables computers to interpret and understand visual information from images and videos. This technology can be applied in various domains, such as content moderation to identify inappropriate images, facial recognition, and image classification. It is also crucial in autonomous vehicles, where it helps to perceive the surrounding environment and make timely decisions.
Speech recognition technology leverages deep learning algorithms to decipher human speech, discern individual words, and comprehend meaning. Neural networks are employed to transcribe spoken language into written text and to gauge the emotional tone of the speaker. Speech recognition finds applications in various domains, such as virtual assistants and call center systems, where it is used to interpret spoken commands and execute corresponding actions.
Generative AI is a type of artificial intelligence that can produce original content, including images, videos, text, and audio, based on textual instructions. Unlike traditional AI, which primarily analyzes data, generative AI utilizes deep learning techniques and vast datasets to create high-quality, human-like creative outputs. While this technology opens up new possibilities for creative expression, there are also concerns regarding bias, harmful content, and intellectual property rights. In conclusion, generative AI marks a significant advancement in AI's ability to generate human-quality language and content.
Understanding Foundation Model
Foundation models (FMs) are large-scale deep-learning neural networks trained on extensive datasets. They have revolutionized the approach data scientists take to machine learning (ML) by providing a starting point that speeds up the development of new AI applications. These models are designed to perform a broad range of general tasks, such as language understanding, text and image generation, and natural language processing (NLP).
Adaptability: Foundation models are uniquely versatile and capable of executing a variety of tasks with high accuracy based on input prompts. This makes them significantly different from traditional ML models, which are typically designed for specific tasks like sentiment analysis, image classification, or trend forecasting. General-Purpose Nature: Due to their large size and broad training, foundation models can serve as base models for more specialized applications. Over the years, these models have grown in complexity and size, with models like BERT and GPT-4 showcasing this evolution.
Language Processing: Foundation models excel in natural language tasks, including answering questions, writing scripts, and translating languages. Visual Comprehension: These models are highly effective in computer vision, identifying images, generating images from text, and editing photos and videos. Code Generation: Foundation models can write and debug code in various programming languages based on natural language instructions. Human-Centered Engagement: They support decision-making processes, such as clinical diagnoses and analytics, by continuously learning from human inputs during inference.
A bidirectional model trained on a vast dataset, capable of analyzing text and predicting sentences. It laid the groundwork for future models like GPT. GPT (Generative Pre-trained Transformer): Released by OpenAI, GPT models have evolved from GPT-1 with 117 million parameters to
GPT-4, which boasts 170 trillion parameters. These models are capable of tasks ranging from text generation to question answering. Amazon Titan: A foundation model from Amazon offers generative and embedding models for tasks like text summarization, information extraction, and personalization.
High Resource Demands: Developing foundation models requires substantial infrastructure, making it costly and time-intensive. Integration Complexity: For practical use, these models must be integrated into software systems, which involves additional development for prompt engineering and fine-tuning. Comprehension and Reliability Issues: While foundation models can generate coherent responses, they may struggle with understanding context and can produce unreliable or biased answers.
Amazon Bedrock: This service simplifies the development and scaling of generative AI applications by offering access to foundation models via an API, allowing users to choose the most suitable model for their needs. Amazon SageMaker JumpStart: A hub for ML models and solutions, SageMaker JumpStart provides access to a wide range of foundation models, including popular ones like Llama 2 and Falcon, supporting the development of diverse AI applications.
https://aws.amazon.com/what-is/foundation-models/
● AWS IoT Greengrass ML Inference : Enables machine learning inference on edge devices, allowing models to be deployed in environments where real-time processing is critical.
● Amazon Neptune ML : Integrates machine learning with graph databases, enabling advanced data analysis and knowledge graph applications.
Machine Learning
● Core Concept : Machine learning revolves around creating algorithms that facilitate decision-making and predictions. These algorithms enhance their performance over time by processing more data. ● Traditional vs. ML Programming : Unlike traditional programming, where a computer follows predefined instructions, machine learning involves providing a set of examples (data) and a task. The computer then figures out how to accomplish the task based on these examples. ● Example : To teach a computer to recognize images of cats, we don’t give it specific instructions. Instead, we provide thousands of cat images and let the machine learning algorithm identify common patterns and features. Over time, the algorithm improves and can recognize cats in new images it hasn’t seen before.
Machine learning can be broadly classified into three types:
Machine learning powers many of today’s technological advancements : ● Voice Assistants : Personal assistants like Siri and Alexa rely on ML to understand and respond to user queries. ● Recommendation Systems : Platforms like Netflix and Amazon use ML to suggest content and products based on user behaviour. ● Self-Driving Cars : Autonomous vehicles use ML to navigate and make real-time decisions. ● Predictive Analytics : Businesses use ML to forecast trends and make data-driven decisions.
● Amazon SageMaker Automatic Model Tuning : Also known as hyperparameter optimization (HPO), this service automatically tunes the model’s hyperparameters to improve performance, using techniques like Bayesian optimization.
● Amazon SageMaker Debugger : Offers insights into the training process by monitoring and profiling training jobs. It helps in identifying issues like overfitting and underfitting by analyzing training metrics. ● Amazon SageMaker Model Monitor : Used post-deployment to track model performance and detect data drift over time, ensuring that the model remains accurate.
● Amazon SageMaker Endpoint : Allows you to deploy your trained models in real-time, making them accessible via API for inference. ● Amazon Elastic Kubernetes Service (EKS) : Supports deploying models in a Kubernetes-managed environment for larger, more complex applications.
● Amazon CloudWatch : Monitors deployed models in real-time, collecting and tracking metrics, logging, and triggering alerts for model performance or infrastructure issues. ● Amazon SageMaker Model Monitor : Continuously monitors deployed models for concept drift, data quality issues, and other anomalies that might affect the model’s accuracy over time.
Fundamentals of ML Operations (MLOps)
streamline the development, deployment, and management of ML models in the Amazon Web Services (AWS) cloud environment.
● Rapid Prototyping : AWS services like Amazon SageMaker allow data scientists to quickly build, test, and iterate on machine learning models using Jupyter notebooks and pre-built algorithms. ● Experiment Tracking : SageMaker Experiments helps in tracking and comparing different model runs, capturing parameters, configurations, and outcomes for better reproducibility and collaboration.
● Pipeline Automation : SageMaker Pipelines automates the entire machine learning workflow, from data preparation to model deployment, ensuring that each step is repeatable and consistent. ● Infrastructure as Code (IaC) : Using AWS CloudFormation or Terraform, you can define and deploy infrastructure in a consistent and repeatable manner, ensuring that environments are identical across different stages.
● Elastic Resources : AWS provides scalable compute resources like EC2 instances and SageMaker-managed instances that can automatically scale up or down based on the workload, ensuring efficient use of resources. ● Distributed Training : SageMaker supports distributed training, allowing large-scale models to be trained faster across multiple GPUs or instances.
● Version Control : Versioning models, datasets, and code ensures that you can track changes, reproduce results, and avoid issues caused by outdated or inconsistent components. ● Model Registry : SageMaker Model Registry helps in managing different versions of models, storing metadata, and promoting models through various stages of development and production.
● Continuous Integration/Continuous Deployment (CI/CD) : Implementing CI/CD pipelines with AWS CodePipeline or Jenkins integrates code changes, tests, and deployments seamlessly, ensuring models are always production-ready.
Amazon SageMaker
● Amazon SageMaker is a comprehensive platform that empowers users to develop, train, and deploy machine learning models efficiently. This fully managed service offers a wide range of tools, including notebooks, debuggers, profilers, pipelines, and MLOps capabilities, to streamline the entire ML lifecycle. ● Amazon SageMaker offers a range of pre-built tools, including algorithms, pre-trained models, and solution templates, to expedite the development and deployment of machine learning models to help data scientists and practitioners.
Problem Type Appropriate Algorithm Binary Classification Logistic Regression, XGBoost, etc. Multiclass Classification XGBoost, Linear Learner, etc. Regression Linear Learner, XGBoost, etc. Object Detection Faster R-CNN, SSD, etc. Anomaly Detection Random Cut Forest, etc. Clustering K-Means, DBSCAN, etc. Topic Modeling Latent Dirichlet Allocation (LDA) Recommender Systems Factorization Machines, etc.
Prepare Data - ● SageMaker Feature Store:- Amazon SageMaker Feature Store is a centralized platform designed to store, share, and manage features used in machine learning models. Features are the data inputs that models rely on during both training and inference. ● SageMaker Data Wrangler:- Amazon SageMaker Data Wrangler selects, understands, and transforms data to prepare it for machine learning (ML) in minutes. reduces data prep time for tabular, image, and text data from weeks to minutes. It enables a rapid assessment of ML model accuracy and helps identify potential problems before deployment.
● Geospatial ML with Amazon SageMaker:- Amazon SageMaker empowers data scientists and ML engineers to build, train, and deploy ML models using geospatial data such as satellite imagery, maps, and location data.
● SageMaker Notebooks:- Amazon SageMaker Notebooks offer a fully managed Jupyter environment, enabling data scientists and ML engineers to explore, analyze, and develop machine learning models efficiently. ● SageMaker Jumpstart:- Amazon SageMaker JumpStart is a machine learning (ML) hub that can help you quickly evaluate, compare, and select Foundation models based on pre-defined quality and responsibility metrics to perform tasks like article summarization and image generation. ● SageMaker Studio Lab:- Amazon SageMaker Studio Lab is a free service based on open-source JupyterLab that allows customers to use AWS compute resources to create and run their Jupyter notebooks.
● SageMaker Model Training:- Amazon SageMaker Model Training streamlines the process of training and tuning machine learning models, significantly reducing time and costs while eliminating the need for infrastructure management. ● SageMaker Experiments:- Amazon SageMaker offers a managed MLflow capability that simplifies machine learning and generative AI experimentation. Data scientists can easily use MLflow within SageMaker for model training, registration, and deployment. Administrators can quickly establish secure and scalable MLflow environments on AWS. ● SageMaker HyperPod:- Amazon SageMaker HyperPod simplifies the process of building and optimizing ML infrastructure for training foundation models, significantly reducing training time by 40%. By automatically distributing training workloads across thousands of accelerators, HyperPod enables parallel processing and accelerates model performance.
SageMaker Model Deployment:- Amazon SageMaker simplifies the deployment of machine learning models, including foundation models, offering optimal cost-effectiveness for inference requests across various applications. ● SageMaker Pipelines:- Amazon SageMaker Pipelines is a serverless workflow orchestration service that automates machine learning (ML) and large language model (LLM) workflows.