Quantcast
Channel: Cloud Training Program
Viewing all articles
Browse latest Browse all 1891

Build and Manage AWS Generative AI: Step-by-Step Hands-on Labs by K21 Academy

$
0
0

Loading

This blog is your guide to mastering Generative AI on AWS through a series of hands-on labs. Follow these detailed activity guides to gain practical skills in Generative AI, from planning a project to deploying advanced AI-driven applications.

List of Modules and Labs Included in Our AWS Generative AI Program:

1.1  AWS Basic Labs

  • Lab 1: Create an AWS Free Trial Account
  • Lab 2: CloudWatch – Create Billing Alarm & Service Limits

1.2 Amazon Bedrock Getting Started

  • Lab 1: Enable Foundation Models (FMs) @ Bedrock

1.3 Prompt Engineering Foundation: Basic/Advanced

  • Lab 1: Mitigating Image Bias with Effective Prompt
  • Lab 2: Advanced Prompt Techniques

1.4 Bedrock Foundation Models

  • Lab 1: Extract Insights from Call Transcripts
  • Lab 2: Building a RAG Knowledge Management System
  • Lab 3: Developing AI-Driven Question-Answer Model
  • Lab 4: Craft Prompts & Summarize Text: Playground
  • Lab 5: Generate Images with Titan ImageGeneratorG1

1.5 LangChain

  • Lab 1: Generating Personalized Service Emails
  • Lab 2: Abstractive Text Summarization
  • Lab 3: Building Intelligent ReAct Agents

1.6 Bonus: Amazon Sagemaker

  • Lab 1: Requesting AWS Service Quota Increases
  • Lab 2: Create SageMaker Studio & Deploy Model
  • Lab 3: Setting Up Jupyter Notebook in SageMaker
  • Lab 4: Text & Vector Embedding with Amazon Titan
  • Lab 5: Automating Python Code Generation

1.1 AWS Basic Labs

Lab 1: Create an AWS Free Trial Account

Embark on your AWS journey by setting up a free trial account. This hands-on lab guides you through the initial steps of creating an AWS account, giving you access to a plethora of cloud services to experiment and build with.

Amazon Web Services (AWS) is providing a free trial account for 12 months to new subscribers to get hands-on experience with all the services that AWS provides. Amazon is giving us a number of different services that we can use, with some limitations, to get hands-on practice and gain more knowledge on AWS Cloud services as well as regular business use.

With the AWS Free Tier account, all the services offered have limited usage limits on what we can use without being charged. Here, we will look at how to register for an AWS FREE Tier Account.

To learn how to create a free AWS account, check our Step-by-step blog, How To Create AWS Free Tier Account

AWS Free Tier

Lab 2: CloudWatch – Create Billing Alarm & Service Limits

Dive into CloudWatch, AWS’s monitoring service. This lab focuses on setting up billing alarms to manage costs effectively and keeping an eye on service limits to ensure your applications run smoothly within defined boundaries.

AWS billing notifications can be enabled using Amazon CloudWatch. CloudWatch is an Amazon Web Services service that monitors all of your AWS account activity. CloudWatch, in addition to billing notifications, provides infrastructure for monitoring apps, logs, metrics collection, and other service metadata, as well as detecting activity in your AWS account usage.

AWS CloudWatch offers a number of metrics through which you can set your alarms. For example, you may set an alarm to warn you when a running instance’s CPU or memory utilisation exceeds 90% or when the invoice amount exceeds $100. We get 10 alarms and 1,000 email notifications each month with an AWS free tier account.

Free-tier-service-limit

To learn About CloudWatch, check our Step-by-step blog, CloudWatch vs. CloudTrail: Comparison, Working & Benefits 

1.2 Amazon Bedrock Getting Started

Lab 1: Enable Foundation Models (FMs) @ Bedrock

Objective: Learn how to enable and manage access to Amazon Bedrock’s Foundation Models (FMs) on your AWS account. This lab provides hands-on experience in setting up and accessing Amazon Bedrock to utilize high-performance foundation models for various AI and ML projects.

In this lab, you will access the Amazon Bedrock console, enable Foundation Models (FMs) for your AWS account, and manage the necessary permissions to ensure proper setup. You will explore the Bedrock Playground to interact with and test different models, and learn how to share your experiences on LinkedIn and the Cloud School Community to build and showcase your professional profile.

By the end of this lab, you will have the skills to enable and manage access to Amazon Bedrock’s Foundation Models, use the Bedrock Playground for experimentation, and effectively showcase your learning experience to enhance your professional presence.

Amazon Bedrock

1.3 Prompt Engineering Foundation: Basic/Advanced

Lab 1: Mitigating Image Bias with Effective Prompt

Objective: Learn how to generate images using Amazon Bedrock’s Image Playground while understanding and mitigating potential biases. This lab provides hands-on experience in identifying biases in AI-generated images and modifying prompts to ensure fair and inclusive content.

In this lab, you will explore Amazon Bedrock’s Image Playground to generate images using the Amazon Titan Image Generator G1 model. You will learn to recognize potential biases related to gender, ethnicity, age, and professional stereotypes in AI-generated images. The lab will also guide you on techniques to mitigate these biases by crafting more inclusive prompts, ensuring diverse representation. Additionally, you’ll be guided on how to share your learnings and showcase your skills on professional platforms like LinkedIn and within the Cloud School Community.

By the end of this lab, you will have a comprehensive understanding of how to use Amazon Bedrock’s Image Playground to generate images while being mindful of potential biases. You will gain practical skills in creating more inclusive and diverse AI-generated images and be prepared to apply bias mitigation techniques in real-world AI applications, thereby promoting fairness and inclusivity in AI-driven content.

Mitigating Image Bias with Amazon Bedrock Using Effective Prompts

Lab 2: Advanced Prompt Techniques

Objective: Learn how to utilize advanced prompt techniques such as Zero-Shot, One-Shot, Few-Shot, and Chain of Thought in Amazon Bedrock’s chat Playground. This lab provides hands-on experience in implementing and comparing these techniques for various text-generation tasks.

In this lab, you will experiment with different prompt engineering techniques using Amazon Bedrock’s foundational models, focusing on text generation capabilities. You will learn how to implement Zero-Shot, One-Shot, Few-Shot, and Chain of Thought prompting within the chat Playground. The lab covers setting up the prompts, running inferences, and analyzing the outcomes for each technique, helping you understand their unique strengths and use cases.

By the end of this lab, you will have a comprehensive understanding of advanced prompt techniques in Amazon Bedrock. You will be able to craft prompts using Zero-Shot, One-Shot, Few-Shot, and Chain of Thought strategies, and effectively apply them to various AI tasks such as language translation, sentiment analysis, and multi-step reasoning. This knowledge will enhance your prompt engineering skills and enable you to design more efficient and contextually accurate AI models.

Prompt engineering

1.4 Bedrock Foundation Models

Lab 1: Extract Insights from Call Transcripts

Objective:  Learn how to leverage Amazon Bedrock’s Titan Text G1 Express and Anthropic Claude V2 models to extract insights and perform sentiment analysis on customer-agent call center transcripts. This lab focuses on improving customer service quality and efficiency by analyzing interactions and providing actionable insights.

In this lab, you will explore using advanced language models in Amazon Bedrock to analyze call centre transcripts. You will work with Amazon Titan Text G1 Express and Anthropic Claude V2 models to perform sentiment analysis, identify key interactions, and ask targeted questions about the transcripts. This lab involves hands-on experience with Amazon Bedrock’s Text Playground, applying AI models to real-world scenarios in customer support.

By the end of this lab, you will have a solid understanding of how to use Amazon Bedrock’s Titan Text G1 Express and Anthropic Claude V2 models for extracting insights and performing sentiment analysis on call center transcripts. You will be able to use these models to analyze customer-agent interactions, detect sentiment, and generate summaries, ultimately enhancing customer support operations with AI-driven insights.

Extracting Insights from Call Center Transcripts using Amazon Titan Text G1 Express and Anthropic Claude V2 in Bedrock

Lab 2: Building a RAG Knowledge Management System

Objective: Learn how to enhance a knowledge management system using Amazon Bedrock Knowledge Bases and Retrieval-Augmented Generation (RAG) to support internal teams and improve customer support. This lab focuses on building a scalable, intelligent knowledge repository capable of providing accurate and quick responses.

In this lab, you will create an Amazon S3 bucket, upload documents, and build a knowledge base in Amazon Bedrock. You will also configure data sources and embed models to integrate with the knowledge base. The lab guides you through querying the knowledge base using advanced AI models and cleaning up resources to manage costs.

By the end of this lab, you will have hands-on experience in building a robust knowledge management system using Amazon Bedrock Knowledge Bases with RAG. You will be capable of creating scalable knowledge repositories, configuring data sources, and applying AI models to enhance information retrieval for both internal and external stakeholders.

Knowledge base

Lab 3: Developing AI-Driven Question-Answer Model

Objective: In this hands-on lab, you’ll set up and utilize Amazon Bedrock to create an AI-driven question-answering system. The objective is to enhance customer interactions by developing a solution that can accurately understand and respond to user queries. You’ll begin by configuring the necessary environment in AWS, followed by selecting and setting up a foundation model in Amazon Bedrock. Once configured, you’ll input various questions to test the system’s performance and retrieve precise answers.

The lab will guide you through fine-tuning the model using parameters like response length and temperature to optimize the quality of the answers.

By the end of this lab, you’ll have gained practical experience in utilizing Amazon Bedrock for advanced natural language processing applications, equipping you with the skills to improve the efficiency and effectiveness of customer support through AI.

Developing AI-Driven Question Answering Models Using Amazon Bedrock

Lab 4: Craft Prompts & Summarize Text: Playground

Objective: Learn how to craft effective prompts and summarize text using Amazon Titan Text G1 Express and Anthropic Claude V2 models within the AWS Bedrock Text Playground. This lab provides hands-on experience in utilizing these advanced language models to efficiently process and distill information from large text documents, supporting business decision-making, content creation, and improving customer interactions.

In this lab, you will explore the AWS Bedrock Text Playground to work with Amazon Titan Text G1 Express and Anthropic Claude V2. You’ll craft prompts for text summarization, adjust inference parameters to fine-tune model responses, and experiment with different text processing tasks. Additionally, you’ll learn how to share your learnings on LinkedIn and within the Cloud School Community, enhancing your professional profile and demonstrating your practical skills in Generative AI.

By the end of this lab, you will have the expertise to use Amazon Bedrock’s language models for text summarization and prompt creation. You will also gain experience using the Text Playground to experiment with these models and be equipped to showcase your skills in Generative AI effectively on professional platforms.

Crafting promptsLab 5: Generate Images with Titan ImageGeneratorG1

Objective: Learn how to generate images using the Amazon Titan Image Generator G1 in Amazon Bedrock’s Image Playground. This lab provides hands-on experience in creating images from text prompts, allowing you to experiment with generative AI for visual content creation.

In this lab, you will navigate the Image Playground in Amazon Bedrock to use the Titan Image Generator G1 model. You will explore the steps to access the Bedrock console, select an image generation model, and craft prompts to create images. Additionally, you’ll learn how to adjust settings such as the number of images generated and understand the cost implications of using these models. The lab will also guide you on sharing your experience and learnings on professional platforms like LinkedIn and within the Cloud School Community.

By the end of this lab, you will know to use Amazon Bedrock’s Image Playground effectively to generate images based on custom prompts. You will gain practical skills in using generative AI for image creation, understand how to configure model parameters, and be equipped to showcase your skills in AI and ML through professional networking channels.

Screenshot 2024 09 16 121407

1.5 LangChain

Lab 1: Generating Personalized Service Emails

Objective: In this hands-on lab, you will learn how to generate personalized customer service emails using LangChain integrated with Amazon Bedrock. As a Machine Learning Engineer at K21 Academy, your task is to automate customer service responses by leveraging natural language processing (NLP) techniques. This involves setting up your AWS environment, launching SageMaker Studio, and creating a Jupyter lab space. You’ll configure a text generation model using Amazon Bedrock with the Anthropic Claude v2 model, allowing you to craft contextually relevant and tailored email responses.

Throughout the lab, you’ll create personalized email templates, manage token counts to ensure compatibility with language model limits, and generate complete customer service emails.

By the end of this experience, you will have built a system that automates customer communications efficiently, improving customer satisfaction and reducing manual effort in email composition. This hands-on exercise will provide practical skills in integrating LangChain with Amazon Bedrock for advanced NLP applications in customer service automation.

Generating Personalized Customer Service Emails Using LangChain and Amazon BedrockLab 2: Abstractive Text Summarization

Objective: In this lab, the objective is to streamline the summarization of large documents using Amazon Bedrock’s Titan model integrated with LangChain. As a Machine Learning Engineer at K21 Academy, you will focus on transforming extensive texts, like shareholder letters, into concise and insightful summaries. This process aims to reduce manual effort, enhance document processing, and ensure high-quality, accurate outputs.

During this lab, you will set up the environment within Amazon SageMaker Studio, create a JupyterLab workspace, and configure the Titan model for abstractive text summarization. You will also explore how to split large documents into manageable chunks, handle potential errors, and generate comprehensive summaries using LangChain’s capabilities.

By the end of this lab, you will have a fully functional system capable of summarizing complex documents efficiently, gaining hands-on experience with advanced AI-driven text processing techniques.

Abstractive Text Summarization with Amazon Titan Using LangChain

Lab 3: Building Intelligent ReAct Agents

Objective: In this lab, the objective is to develop an intelligent AI system capable of reasoning through tasks and taking appropriate actions using LangChain and Amazon Bedrock. As a Senior Cloud Engineer at K21 Academy, you will focus on building ReAct agents that can answer complex questions, perform calculations, and retrieve information from various sources. By setting up an environment in AWS, launching SageMaker Studio, and creating a Jupyter lab space, you will learn how to configure these agents using Amazon Bedrock and the Anthropic Claude v1 model. During this lab, you will integrate tools such as a Wikipedia query tool, a calculator, and a customer lookup system. By the end of this hands-on experience, you will have developed a fully functional intelligent agent capable of automating information retrieval and enhancing decision-making processes, gaining practical skills in integrating LangChain with Amazon Bedrock for advanced AI applications.

Building Intelligent ReAct Agents with LangChain and AWS Bedrock

1.6 Bonus: Amazon Sagemaker

Lab 1: Requesting AWS Service Quota Increases for EC2 Instance

Objective: Gain hands-on experience in requesting a quota increase for the ml.g5.2xlarge instance type within Amazon SageMaker using the AWS Management Console.

This lab guides you through the process of requesting a service quota increase for the ml.g5.2xlarge instance type. Managing service quotas effectively is crucial for ensuring that your cloud infrastructure can scale to meet the needs of your applications and clients.

By the end of this lab, you’ll understand how to navigate the AWS Management Console to manage and request quota increases, ensuring that your infrastructure can support growing workloads. AIF-C01

Lab 2: Create & Manage SageMaker Studio: Deploy & Test SageMaker JumpStart Foundation Models

Objective: Learn how to create and manage SageMaker Studio, utilize the SageMaker JumpStart Foundation Model Hub, and deploy and test pre-built machine learning models.

This lab provides practical experience in setting up a SageMaker Studio environment, deploying a model from SageMaker JumpStart, and performing inference tests to validate the model’s performance. You’ll explore the process of creating and managing your SageMaker Studio, ensuring that you can effectively deploy and test machine learning models.

By the end of this lab, you’ll have a solid understanding of how to utilize SageMaker Studio and SageMaker JumpStart to deploy and validate machine learning models.

6 29 08 2024 e1724929234558

Lab 3: Setting Up Jupyter Notebook Environment in SageMaker Studio

Objective: Set up the Jupyter Notebook environment in SageMaker Studio for model development.

Overview:
This lab will guide you through setting up a Jupyter Notebook environment within SageMaker Studio. You’ll learn how to configure the environment, import necessary libraries, and prepare for building and testing machine learning models. By the end of this lab, you’ll be equipped to use Jupyter Notebooks for data exploration, model training, and evaluation.

Lab 4: Text & Vector Embedding with Amazon Titan

Objective: Learn how to generate text embeddings and perform similarity testing using Amazon Titan within SageMaker Studio.

In this lab, you’ll set up your environment in AWS, launch SageMaker Studio, and create a Jupyter lab space. After making the necessary settings adjustments, you’ll use Amazon Titan to generate text embeddings and perform similarity testing. This hands-on experience will help you build and utilize text embeddings to support sophisticated NLP applications.

By the end of this lab, you’ll have the skills to create and apply text embeddings in natural language processing tasks.

7 29 08 2024 e1724929279283

Lab 5: Automating Python Code Generation with Amazon Bedrock’s Claude Model

Objective:
Learn how to automate Python code generation using Amazon Bedrock’s Claude model within SageMaker Studio.

In this lab, you’ll set up your environment in AWS, configure Boto3, and launch SageMaker Studio to create a Jupyter lab space. After making the necessary settings adjustments, you’ll use Amazon Bedrock’s Claude model to generate Python scripts for analyzing sales data from a CSV file. This hands-on experience will help you understand and utilize AI-driven code generation to streamline development processes and enhance efficiency.

By the end of this lab, you’ll have the skills to automate Python code generation and apply AI in data analysis tasks.

9 29 08 2024 e1724929348779

Frequently Asked Questions

Q1: How do these labs align with Generative AI on AWS?

These labs provide hands-on experience with Amazon Bedrock, SageMaker, and other AWS services to build, deploy, and manage Generative AI applications effectively.

Q3: How much time should I allocate to complete all labs?

Each lab typically takes 30-60 minutes, with the full program spanning approximately 10-15 hours of learning.

Q4: Can these labs be applied to real-world Generative AI projects?

Yes, the skills learned in these labs are applicable to real-world scenarios, from text summarization to image generation and more.

Q5: How does hands-on experience compare to theoretical learning?

Hands-on experience solidifies theoretical knowledge, preparing you for practical AI implementation and enhancing problem-solving skills.

Related References

Next Task For You

Don’t miss our EXCLUSIVE Free Training on Generative AI on AWS Cloud! This session is perfect for those pursuing the AWS Certified AI Practitioner certification. Explore AI, ML, DL, & Generative AI in this interactive session.

Click the image below to secure your spot!

GenAI on AWS COntent Upgrade

The post Build and Manage AWS Generative AI: Step-by-Step Hands-on Labs by K21 Academy appeared first on Cloud Training Program.


Viewing all articles
Browse latest Browse all 1891

Trending Articles