DEV Community

Cover image for ChatGPT vs the Armada of AWS Machine Learning Services
Jon Bonso for AWS Community Builders

Posted on

ChatGPT vs the Armada of AWS Machine Learning Services

ChatGPT has been rumored to give Google and other popular online services a run for their money. This general-purpose chatbot is way more intelligent than any other machine learning tools in the market and can be integrated to your systems to effectively augment your workloads or entirely automate your workflows.

Image description

Amazon Web Services (AWS) has its very own conversational AI and Chatbot called Amazon Lex however, its capabilities pale in comparison with what ChatGPT can do. There's a plethora of machine learning services available in AWS that can be used for your ML workloads but given the popularity of ChatGPT, will AWS still have a chance to compete against this powerful natural language processing tool?

What is ChatGPT?

Unless you are living under a rock, you might have seen or at least heard this powerful AI tool called ChatGPT. The Chat Generative Pre-Trained Transformer, also known as "ChatGPT", is simply a chatbot. It was launched by OpenAI in November 2022 and is built on top of company's GPT-3 family of large language models.

Just input a text-based question or commands into it to leverage on its powerful natural language processing capabilities. ChatGPT is fine-tuned with both supervised and reinforcement learning techniques that enables it to do a wide range of tasks.

ChatGPT is not just a mere chatbot. You can ask it to create a Python program and it can respond with a full source code in a matter of seconds! This functionality is similar with Amazon CodeWhisperer and Github CoPilot. Its coding suggestions work across dozens of programming languages. Not only that, it can produce technical articles and other forms of literature including poems or song lyrics.

Image description

It can also find insights and relationships in the text that you input. ChatGPT can performs text analytics that can automatically extract key phrases, sentiment, language, syntax, topics from unstructured data. AWS has a ML service called Amazon Comprehend which also does the exact same thing. Both ChatGPT and Amazon Comprehend can understand and capture insights from information written in your text input.

ChatGPT vs AWS Machine Learning Services

Based on our quick assessment above, ChatGPT can apparently do the work of at least 3 machine learning services in AWS namely Amazon Lex, Amazon CodeWhisperer and Amazon Comprehend. Another example would be the ability to translate a text from one language to another in real-time. AWS has the Amazon Translate service that do exactly like that which works pretty much like Google Translate. ChatGPT has a powerful engine that's capable of doing tasks that other ML services can in AWS

However, it is still a natural language processing tool that only accept text. It doesn't have optical character recognition (OCR) capability to "see" and process the data from a visual input. ChatGPT's output is also in a text-based format so it cannot do any Text-to-Speech automation tasks necessary for Interactive Voice Response (IVR) systems and other non-text results.

Will there other ML services in AWS that can be partially or totally replaced by OpenAI's ChatGPT? To know the answer for this question, let's check the different Machine Learning services in AWS that is available for you to use

The Armada of AWS Machine Learning Services

The primary machine learning platform in AWS is called Amazon SageMaker, which is followed by a lot of other ML services. Some services in AWS have machine learning features as well, like Amazon Aurora Machine Learning, Redshift ML, Deep Learning AMIs, and so much more. Take note that we won’t cover them here as we will only focus on the dedicated ML services.

Image description

It is easy to get overwhelmed by the sheer number of services in AWS, so we will divide this lecture into several sections. The AWS Machine Learning services can be classified into these use cases: Computer Vision, Language AI, Automated Data Extraction and Analysis, Customer Experience Improvement, Business Metrics, and DevOps.

For Computer Vision, we have:

  • Amazon Rekognition
  • Amazon Lookout for Vision
  • AWS Panorama

For Automated data extraction and analysis, AWS has:

  • Amazon Textract
  • Amazon Augmented AI
  • Amazon Comprehend

For Language AI, you have:

  • Amazon Lex
  • Amazon Transcribe
  • Amazon Polly

For Customer Experience improvement, you can use the following services:

  • Amazon Kendra
  • Amazon Personalize
  • Amazon Translate

For Business metrics, you can use:

  • Amazon Forecast
  • Amazon Fraud Detector
  • Amazon Lookout for Metrics

And lastly, for DevOps, we have:

  • Amazon DevOps Guru
  • Amazon CodeGuru Reviewer
  • Amazon CodeGuru Profiler
  • Amazon CodeWhisperer

Let’s discuss each of these services one by one.

Amazon SageMaker - The Premiere ML AWS Platform

First off, let’s talk about Amazon SageMaker. Think of this as a full-fledged machine learning platform in AWS with tons of services, features, and components. Amazon SageMaker is not just a simple ML service but a fully managed cloud platform with lots of modules that you can use. With this, you can build, train, and deploy ML models for any use case with fully managed infrastructure, tools, and workflows. SageMaker removes the manual tasks from each step of the ML process to make it easier for you to develop high-quality models. This platform has so many modules that you choose from, namely: Amazon SageMaker Canvas, SageMaker Studio Lab, SageMaker Data Wrangler, SageMaker Autopilot, SageMaker JumpStart, SageMaker Clarify, and so much more!

Let’s now discuss the different ML services related to Computer Vision:

Amazon Rekognition

Amazon Rekognition provides pre-trained and customizable computer vision capabilities to extract information and insights from your images and videos. Just as its name implies, it can recognize certain objects, faces, texts, scenes, labels, and other attributes from your media files or streaming videos. This service is perfect for facial recognition, where it can detect the face of a particular person or a well-known celebrity. It can also determine if someone is wearing a piece of Personal Protective Equipment like a mask, a helmet, or gloves. If you upload an image of you holding a guitar while sitting on your sofa, Amazon Rekognition can detect your face, your guitar, and the sofa where you sit. It also has a feature called Amazon Rekognition Custom Labels. With this, you can easily build a machine learning model to classify custom components or products from your dataset.

Amazon Lookout for Vision

Amazon Lookout is a suite of services that is comprised of Amazon Lookout for Equipment, Amazon Lookout for Metrics, and Amazon Lookout for Vision. The last one uses computer vision to detect defects on industrial products at scale. Amazon Lookout for Vision is primarily used in factories and manufacturing lines to quickly and accurately identify defects in each product. The dataset can be in a form of product images that are stored in an Amazon S3 bucket. You can provide a couple of baseline images to Amazon Lookout for Vision containing defect-free products, and this service will be able to automatically build a model for you within a few hours. From there, it can automatically detect anomalies in your product like dents, cracks, and scratches.

Next, let’s talk about the services that you can use to automate text-based extraction and analysis. Let’s start with the Amazon Textract service.

Amazon Textract

The name of this service is a combination of the words ”text” and “extract”. This will give you a hint that it is used to extract texts from scanned documents, notes, and images. Amazon Textract is a service that uses optical character recognition to automatically extract text from scanned files like PDFs, Word documents, hand-written notes, receipts, passports, IDs, and many others. What makes this service great is its capability to generate the results into a table form or a CSV file. It also has a query feature that allows you to extract a particular field using natural language questions. So if you upload your driver’s license to Amazon Textract, you can submit a query like “What’s the first name?” or “What’s the driver’s ID?“ and you’ll get the value you asked for. You can also batch upload your documents to S3 and automate the text analysis process.

Amazon Augmented AI

Amazon Augmented AI or A2I is a service that provides human review workflows for common machine learning use cases. A human review literally means that a human being will review a certain output that your machine learning model generated before it can proceed to the next step of the workflow. This service augments your AI to ensure the accuracy of prediction results and helps provide continuous improvements to your machine learning model. You can directly integrate your workflows from Amazon Rekognition or Amazon Textract to Amazon Augmented AI. For example, you can do a human review of the key-value pairs that are extracted by Amazon Textract or implement image moderation by doing a human review of unsafe content, such as explicit adult or violent content from Amazon Rekognition. It is also possible to run a human review with a custom machine learning workflow of your choice.

Amazon Comprehend

Amazon Comprehend is a natural language processing service in AWS that can find insights and relationships in a text. It performs text analytics that can automatically extract key phrases, sentiment, language, syntax, topics, and even Personally Identifiable Information or PII from unstructured data. In essence, Amazon Comprehend is a service that comprehends or understands the information written in your text documents. This is different from Amazon Textract since Amazon Comprehend cannot read text from scanned documents. You need to have raw text data first in order to use Amazon Comprehend.

Moving on to the Language AI section…

Amazon Lex

Amazon Lex is a machine learning service that allows you to develop chatbots. You can build Voice-based or Text-based chatbots with Amazon Lex easily. This is helpful if your company needs a self-service bot or a virtual agent for your conversational Interactive Voice Response (IVR) system, corporate website, or other customer-facing application. Amazon Lex can significantly reduce the costs of companies in maintaining its contact center.

Amazon Transcribe

Amazon Transcribe is simply a speech-to-text transcription service. The word transcribe means to make a written record of a speech, a phone call, or any spoken language, and this is exactly what Amazon Transcribe does. It is also helpful in contact centers as it can generate call transcripts and provide conversation insights to help improve customer experience and agent productivity. Amazon Transcribe also offers real-time transcription – where you can just talk to its endpoint, and it will immediately generate transcripts of your speech.

Amazon Polly

The other service relating to Language AI is called Amazon Polly. Essentially, Amazon Polly is the exact opposite of the Amazon Transcribe service. Instead of turning speech into text, it converts text into speech! If you input a text into Amazon Polly, it will generate a lifelike speech in different voices that you specify. So, for example, you typed: “Beautiful Philippine Islands” in the Amazon Polly console. You can hear the phrase: “Beautiful Philippine Islands“ in a male voice, a female voice, a kid’s voice, or in any voice that you prefer. You can also customize the pronunciation of specific words and phrases by uploading your own lexicon files. A lexicon is simply a vocabulary of a particular language, and this is usually used if you have a non-English text that you want to turn into speech.

All right. We are now in the Customer Experience Improvement category.

Amazon Kendra

Amazon Kendra is an intelligent search service in AWS. It is not just a typical search service that simply returns a match to your query from a single data source. Amazon Kendra can search from multiple data sources that can be structured or unstructured, then intelligently analyze the content before it sends a result. This service supports natural language processing, so you can ask questions using a language that you use in your everyday life. For instance, you can ask Amazon Kendra, “Who is the founder of the EdTech startup: Tutorials Dojo?” and it will search all of the documents in your S3 bucket, Amazon FSx file systems, Amazon RDS databases, Github repository, Jira, Slack, Sharepoint and other data sources for the answer. Again, it can search for information from a wide range of sources and not just from a traditional SQL database, then uses machine learning to provide context to your search results.

Amazon Personalize

Amazon Personalize is a service that provides personalized recommendations to your customers based on their past activity and behavior. It’s just like the recommendation feature in Amazon Prime or Netflix, where new movies are automatically recommended for you based on your viewing history. If you watched a lot of Sci-Fi movies on their online streaming platform, they will automatically recommend more Sci-Fi shows on your profile. This is definitely a customer experience improvement since personalizing the user’s content tends to convert more because they align with what the customers actually do and buy.

Amazon Translate

Amazon Translate is a real-time translation service in AWS. It works pretty much like Google Translate, where you input text in one language, and the service will translate it to a language that you choose. You can also create your own custom terminology. This allows you to customize the output of Amazon Translate based on a company-specific and domain-specific vocabulary. For example, I can set the acronym TD as “Tutorials Dojo” in English. The Amazon Translate service can accept input with my custom vocabulary and include it in the translation. In this case, I can enter the Tagalog phrase “Magandang Umaga TD” and Amazon Translate will return “Good morning Tutorials Dojo” as an output. The Filipino phrase “magandang umaga” means “good morning” in English, while “TD” is the custom term for “Tutorials Dojo” which we configured in Amazon Translate. You can also enable the Formality option, which controls whether the translation output uses a formal tone or not. The translation can also mask profane words or phrases, which is a very useful feature for customer-facing applications.

Let’s now hop on to the ML services relating to Business Metrics.

Amazon Forecast

Amazon Forecast is a machine learning service in AWS that helps you forecast a future outcome based on your historical records and other relevant data. You can either import or stream your time-series data to Amazon Forecast, and it can foretell your sales, web traffic, inventory, revenue, cloud resource capacity, or even the actual weather in the coming days or months ahead. It can also predict your future AWS bill! It has a range of built-in datasets too, like the Weather Index and the national holidays for various countries. Amazon Forecast uses a machine learning model called a Predictor. This “Predictor” uses an algorithm to consume all the time-series data that you provide and generate a prediction out of it.

Amazon Fraud Detector

Amazon Fraud Detector is yet another machine learning service that can automate fraud detection, just as its name suggests. It can identify potential fraudulent activity, fake reviews and spam account creation in neal-real-time. For instance, your website recently got a visitor whose IP address has a history of malicious activity such as spamming, hacking attempts, and DDoS attacks. Users with exactly the same IP address are posting spam on your website repeatedly. For this situation, you can use Amazon Fraud Detector to block any visitor who uses an offending IP address, an email domain, or any other attribute that you define.

Amazon Lookout for Metrics

Amazon Lookout for Metrics is one of the services of the Amazon Lookout family for detecting anomalies in your business metrics. An anomaly can be a sudden nosedive in your sales revenue or an unexpected drop in your customer acquisition rates. It can identify unusual variances in your business metrics and alert you immediately so you can take the proper course of action.

We’ll now cover the different ML services for DevOps as well as for MLOps or Machine Learning Operations. Let’s start by discussing the Amazon DevOps Guru service:

Amazon DevOps Guru service

Amazon DevOps Guru detects abnormal behavior in your application or AWS resources that might cause unexpected downtimes or operational issues in the near future. It can monitor applications and AWS resources within your own account or on all accounts across your AWS Organization. It uses machine learning to identify operational defects long before they impact you and your customers. Amazon DevOps Guru can analyze your RDS databases and automatically determine an unusually high DB load that is more than three times or 5 times its normal value. It can also detect issues in your serverless stack like an extremely high number of invocations in your Lambda function that is beyond the currently provisioned concurrency or an overprovisioned write capacity on your DynamoDB tables.

Amazon CodeGuru

Amazon CodeGuru is a suite of development services in AWS. It contains different tools and features such as Amazon CodeGuru Reviewer, Amazon CodeGuru Profiler, BugBust, and many more. The primary function of Amazon CodeGuru Reviewer is to provide intelligent recommendations for improving your application performance, efficiency, and code quality. It can scan your code and detect a plethora of code defects like bad exception handling, insecure CORS policy, path traversal, hardcoded credentials, and many more. You can also integrate this with your CI/CD workflow so you can run code reviews and recommendations to improve your codebase. The other module for this service is called the Amazon CodeGuru Profiler. A profiler is basically a component that collects your CPU data and analyzes the runtime performance data from your live applications. This is helpful in identifying expensive lines of codes that inefficiently use the CPU, which causes CPU bottlenecks.

Amazon CodeWhisperer

Amazon CodeWhisperer is a coding tool that automatically generates code and functions in real-time. This tool is similar to Github CoPilot, which is an extension that you usually install in your visual studio IDE. The lines of codes are generated right from your IDE editor based on the comments that you write. For example, you can simply write a comment that outlines a specific task in plain English, such as “Upload a file to an Amazon S3 bucket with server-side encryption”. Amazon CodeWhisperer will take your comment as input and generate an entire function in the programming language that you define, which can upload a file to your S3 bucket with the required encryption and many more

Conclusion and ChatGPT-4 Predictions

We have discovered the various ML services available in AWS. Some of these AWS services are quite unique and have a competitive edge over ChatGPT. With a native integration with AWS resources, these ML services can easily be enabled without the hassle of creating a middleware between ChatGPT and your workloads.

For example, Amazon DevOps Guru detects abnormal behavior in your application or AWS resources by monitoring the applications and AWS resources within your own account or on all accounts across your AWS Organization. That level of ability and integration is hard to be surpassed even by its latest ChatGPT-4 iteration.

However, if Amazon won't continue to evolve and offer breakthrough ML services, then it's quite possible that OpenAI's ChatGPT and its collaboration with Microsoft Azure will surpass the might of AWS in terms of its Machine Learning offerings; considering that a much more version of this tool ( called ChatGPT-4 ) looms near.

Top comments (8)

Sloan, the sloth mascot
Comment deleted
jonbonso profile image
Jon Bonso

You're welcome! Always happy to serve the tech community

amielcp profile image
Amiel Palacol

Very insightful

jonbonso profile image
Jon Bonso

Thanks @amielcp !

mohannadhenno profile image
Mohannad Henno

Thanks Jon!

The coming period is going to be full of competition between the big giants. This is healthy and good for technical users as well as normal users.

jonbonso profile image
Jon Bonso

Yes! Exciting times ahead!

tyrionlann62154 profile image
tyrion lannister

great information about chatgpt & aws machine learning services. Thanks for sharing

bismillahkani profile image

Great article! An insightful comparison between ChatGPT and AWS ML services, highlighting their respective strengths and potential impacts on AWS's future.