Launched in 2021, Amazon SageMaker Canvas is a visual point-and-click service that enables business analysts and citizen data scientists to use out-of-the-box machine learning (ML) models and create custom ML models to generate accurate predictions without need. to write any code. Out-of-the-box models let you get immediate insights from text, image, and document data (such as sentiment analysis, document processing, or object detection in images). Custom models allow you to create predictive models for use cases such as demand forecasting, customer churn, and manufacturing defect detection.
We’re excited to announce that SageMaker Canvas is expanding its support for out-of-the-box models to include base models (FM), allowing you to use generative ai to generate and summarize content. You can use natural language with a conversational chat interface to perform tasks such as creating narratives, reports, and blog posts; answering questions; summarize notes and articles; and explain concepts, without writing a single line of code. Your data is not used to improve base models, is not shared with external model providers, and remains entirely within your secure AWS environment.
SageMaker Canvas allows you to access a variety of FMs including Amazon Bedrock models (such as Anthropic’s Claude 2 and AI21 Labs’ Jurassic-2) and publicly available Amazon SageMaker JumpStart models including Falcon-7B-Instruct, Falcon-40B- Instruction and MPT-7B-Instruction). You can use a single model or up to three models to compare model responses side by side. In SageMaker Canvas, Amazon Bedrock models are always active, allowing you to use them instantly. SageMaker JumpStart models can be started and deployed to your AWS account on demand and automatically shut down after two hours of inactivity.
Let’s explore how to use the generative ai capabilities of SageMaker Canvas. For this post, we worked with a fictional enterprise customer service use case as an example.
Previous requirements
Complete the following preliminary steps:
- Create an AWS account.
- Configure SageMaker Canvas and optionally configure it to use a VPC without Internet access.
- Set up model access in Amazon Bedrock.
- Request service quota increases for g5.12xlarge and g5.2xlarge, if necessary, in your region. These instances are required to host the SageMaker JumpStart model endpoints. Other instances may be selected based on availability.
Handling customer complaints
Let’s say you’re a customer service analyst who handles complaints for a bicycle company. When you receive a complaint from a customer, you can use SageMaker Canvas to analyze the complaint and generate a customized response for the customer. To do so, complete the following steps:
- In the SageMaker console, choose Canvas in the navigation panel.
- Choose your domain and user profile and choose Open canvas to open the SageMaker Canvas application.
SageMaker Canvas can also be accessed using single sign-on or other existing identity providers (IdPs) without first accessing the SageMaker console.
- Choose Generate, extract and summarize content. to open the chat console.
- With the Claude 2 model selected, enter your instructions for retrieving the customer’s sentiment about the complaint provided and press Get into.
- You may want to know the specific problems with the bike, especially if it is a long-standing complaint. So, ask about the problems with the bike. Please note that you do not need to repost the complaint because SageMaker Canvas stores the context of your chat.
Now that we understand the customer’s problem, you can send them a response that includes a link to the company’s feedback form.
- In the input window, request a response to the customer’s complaint.
- If you want to generate another response from the FM, choose the refresh icon in the response section.
The original answer and all new answers are paginated within the answers section. Please note that the new answer is different from the original answer. You can choose the copy icon in the reply section to copy the reply to an email or document as needed.
- You can also modify the model’s response by requesting specific changes. For example, let’s ask the model to add a $50 gift card offer to the email response.
Comparison of model responses
You can compare the model responses of multiple models (up to three). Let’s compare two Amazon Bedrock models (Claude 2 and Jurassic-2 Ultra) with a SageMaker JumpStart model (Falcon-7B-Instruct) to evaluate and find the best model for your use case:
- Choose New conversation to open a chat interface.
- From the model drop-down menu, choose Launch another model.
- About him Foundation models page, below Amazon SageMaker JumpStart Modelschoose Falcon-7B-Instruct and in the right panel, choose start-up model.
The model will take about 10 minutes to start.
- About him Foundation models page, confirm that the Falcon-7B-Instruct model is active before proceeding to the next step.
- Choose New conversation to open a chat interface.
- Choose Compare to display a drop-down menu for the second model, then choose Compare again to show a dropdown menu for the third model.
- Choose the Falcon-7B-Instruct model from the first drop-down menu, Claude 2 from the second drop-down menu, and Jurassic-2 Ultra from the third drop-down menu.
- Enter your instructions in the chat input box and press Get into.
You will see responses from all three models.
Clean
Any SageMaker JumpStart model launched from SageMaker Canvas will automatically shut down after 2 hours of inactivity. If you want to turn off these models sooner to save costs, follow the instructions in this section. Please note that Amazon Bedrock models are not deployed to your account, so there is no need to close them.
- To turn off the Falcon-40B-Instruct SageMaker JumpStart model, you can choose between two methods:
- On the results comparison page, choose the Falcon-7B-Instruct model options menu (three dots), then choose Turn off model.
- Alternatively, choose New conversationand from the model dropdown menu, choose Launch another model. So, in the Foundation models page, below Amazon SageMaker JumpStart Modelschoose Falcon-7B-Instruct and in the right panel, choose Turn off model.
- Choose Sign off in the left pane to log out of the SageMaker Canvas application to stop consuming hours of the SageMaker Canvas workspace instance and release all resources used by the workspace instance.
Conclusion
In this post, you learned how to use SageMaker Canvas to generate text with out-of-the-box models from Amazon Bedrock and SageMaker JumpStart. He used the Claude 2 model to analyze the sentiment of a customer’s complaint, ask questions, and generate a response without a single line of code. He also started a publicly available model and compared the responses of three models.
For Amazon Bedrock models, you are charged based on the volume of input tokens and output tokens according to the Amazon Bedrock pricing page. Because SageMaker JumpStart models are deployed on SageMaker instances, you will be charged for the duration of use based on the instance type according to the Amazon SageMaker pricing page.
SageMaker Canvas continues to democratize ai with an interactive, visual, code-free workspace that enables business analysts to create machine learning models that address a wide variety of use cases. Try the new generative ai capabilities in SageMaker Canvas today! These capabilities are available in all regions where Amazon Bedrock or SageMaker JumpStart is available.
About the authors
Anand Iyer He has been a Principal Solutions Architect at AWS since 2016. Anand has helped global healthcare, financial services, and telecommunications clients design and implement enterprise software solutions using AWS and hybrid cloud technologies. He has a master’s degree in Computer Science from Louisiana State University in Baton Rouge and an MBA from the USC Marshall School of Business, Los Angeles. He is certified by AWS in the areas of Security, Solutions Architecture, and DevOps Engineering.
Gavin Satur He is a Principal Solutions Architect at Amazon Web Services. He works with enterprise clients to create strategic, well-designed solutions and is passionate about automation. Outside of work, he enjoys family time, tennis, cooking, and traveling.
Gunjan Jain is an AWS Solutions Architect in SoCal, working primarily with large financial services companies. He helps with cloud adoption and optimization and adopting best practices for good cloud architecture.
Harpreet Dhanoa, an experienced Senior Solutions Architect at AWS, has strong experience designing and building scalable distributed systems. He is passionate about machine learning, observability and analytics. He enjoys helping large-scale clients develop their enterprise cloud strategy and transform their businesses on AWS. In his free time, Harpreet enjoys playing basketball with his two children and spending time with his family.