automate content moderation and
TRANSCRIPT
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Automate content moderation and compliance with AI
A I M 3 0 5 - R
Kashif Imran
Sr. Solutions Architect, AWS AI
Amazon Web Services
Niranjan Hira
Product SA, AWS AI
Amazon Web Services
Gillian Armstrong
Solutions Engineer
Liberty Mutual
Agenda
Intros & expectations
Access your account
Images & video
Profanity detection with text
Related breakouts
AIM211 – AI document processing for business automation
AIM313 – Add computer vision to your applications
AIM206 – Finding a needle in a haystack: Use AI to transform content management
FRAMEWORKS INTERFACES INFRASTRUCTURE
Broadest and deepest set of capabilities
VISION SPEECH LANGUAGE CHATBOTS FORECASTING RECOMMENDATIONS
A M A Z O N
P O L L Y
A M A Z O N
T R A N S C R I B E
A M A Z O N
T R A N S L A T E
A M A Z O N
C O M P R E H E N D
& C O M P R E H E N D
M E D I C A L
A M A Z O N
L E X
A M A Z O N
F O R E C A S T
A M A Z O N
R E K O G N I T I O N
I M A G E
A M A Z O N
R E K O G N I T I O N
V I D E O
A M A Z O N
T E X T R A C TA M A Z O N
P E R S O N A L I Z E
Amazon SageMaker Ground Truth Notebooks Algorithms + Marketplace Reinforcement Learning Training Optimization Deployment Hosting
F P G A SE C 2 P 3
& P 3 D N
E C 2 G 4
E C 2 C 5
I N F E R E N T I AG R E E N G R A S S E L A S T I C
I N F E R E N C E
D L
C O N T A I N E R S
& A M I s
E L A S T I C
K U B E R N E T E S
S E R V I C E
E L A S T I C
C O N T A I N E R
S E R V I C E
The AWS ML stack
AI Services
ML Services
ML Frameworks + Infrastructure
Amazon Rekognition:Deep Learning-Based Image and Video Analysis
Amazon Rekognition Features
Faces Celebrities Labels
Moderation ScenesActivities Paths
Text
Amazon Rekognition Benefits
Low costYour data is your ownServerless
Rapid integration
State of the art capabilities
Continuous improvement
Amazon Textract
Text extraction Table extraction Form extraction
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Customer-facing instructions to access Event Engine
You can place these slides in your presentation.
You may need to copy/paste the contents of each slide, to keep your theme formatting and copyright footers intact.
Questions? Contact [email protected]
AWS Event Engine
https://dashboard.eventengine.run
The AWS Event Engine was
created to help AWS field teams
run Workshops, GameDays,
Bootcamps, Immersion Days,
and other events that require
hands-on access to AWS
accounts.
https://dashboard.eventengine.run
https://dashboard.eventengine.run
https://dashboard.eventengine.run/dashboard
https://dashboard.eventengine.run/dashboard
https://dashboard.eventengine.run/dashboard
https://dashboard.eventengine.run/dashboard
https://dashboard.eventengine.run/dashboard
Don’t forget to change the
permissions on the pem file.
For example:
chmod 400 ee-default-keypair.pem
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Comprehend
A fully managed and continuously trained service that discovers insights and relationships in text
Amazon Comprehend
Discover insights and relationships
in textEntities
Key Phrases
Language
Sentiment
Amazon
Comprehend
Topic Modeling
Bark & Co uses Amazon Comprehend to analyze
their customers’ comments and feedback,
allowing them to respond faster and improve the
customer experience.
Custom Amazon Comprehend
Custom Classification
• Triage support tickets
• Moderate forums
• Organize customer feedback
• Organize support calls
Classification:
“PRICING”
Classification:
“CANCEL_ACCOUNT”
Classification:
“LOYALTY_PROGRAM”
EXAMPLE
Automated Custom Classifier Training
Create a CSV file
with training data
Train the classifier Classify
TEXT LABEL
I am calling about my
credit card
LOYALTY_PROGRAM
I really need to shut the
service down
CANCEL_ACCOUNT
My points are not being
applied correctly
LOYALTY_PROGRAM
The service is very
expensive compared to
competition
PRICING
I’d subscribe if you had
discounts
PRICING
•Automated algorithm
selection
•Automated tuning and
testing
•SDK or code-free
Console UX
1 2 3
Custom Entities
• Analyze documents for your business and domain terms and
phrases
• Bring your own schema to unstructured text analytics
Hello, my name is John Doe, and thank you for calling
AnyCompany. I understand you are calling about part number
XT2457. We have that part on back order and we are expediting it
for you.
Thank you, but I was expediting it last week. At this point I think
we should go ahead and cancel the order entirely.
We are sorry to hear that sir, would you be willing to complete the
order if we offered a 10% discount?
Yes, thank you.
Person: John Doe
Organization: AnyCompany
Part: XT2457
Account_Action: cancel the order
Automated Custom Entity Recognizer Training
Prepare examples Train the recognizer1 2 3 Analyze
Terms
and
phrases
Documents
containing
terms and
phrases in
text
ENTITY VALUE ENTITY TYPE
XT2457 Part
AnyCompany Organization
John Doe Person
Cancel the order Account_Action •Automated annotation
•Automated algorithm
selection
•Automated tuning and
testing
•SDK or code-free
Console UX
Hello, my name is John Doe, and
thank you for calling
AnyCompany. I understand you
are calling about part number
XT2457. We have that part on
back order and we are expediting
it for you.
Thank you, but I was expediting it
last week. At this point I think we
should go ahead and cancel the
order entirely.
We are sorry to hear that sir,
would you be willing to complete
the order if we offered a 10%
discount?
Yes, thank you.
Amazon Comprehend Structured Output
Person Organization Part Account_
Action
John Doe AnyCompany XT2457 Cancel the
order
Richard Roe SomeCompany SD5578 Renew
subscription
Pre-trained entities Custom entities
Training data for Custom Entity Recognizer Training
Using entity list and
training docs1
Using annotations
and training docs2
• Simple and fast
• Specify entity values that are present in the
training documents
• May have poor accuracy if different entity
types have same values or values in wrong
context are selected for training
• Specify document offset for values
present in the training documents
• Higher annotation effort
• Higher accuracy as only specific values in
the desired context are selected for
training
OR
Let’s build
Offensive language
Hate speech
Profanity
Custom entity recognizer for profanity
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Using this out in the real world…
https://aws.amazon.com/solutions/media-analysis-solution/
Media Analysis Solution:
Web Front End
AI Analytics
Indexed for Searching
Amazon S3
Upload
Media
Search
Trigger
Metadata
Media Analysis Solution
Architecture Overview
AWS Elemental
MediaConvertAmazon
Transcribe
Amazon
Rekognition
Amazon
Comprehend
Amazon
Elasticsearch
Service
Amazon
CloudFront
Amazon
Cognito
Amazon API
GatewayAWS Lambda
AWS Step
FunctionsAmazon S3
(web interface)
Amazon S3
(Media Analysis
bucket)
AWS Lambda
We need to keep inappropriate content out of
our system!
We need to keep inappropriate content out of
our system!
No problem!
We need to keep inappropriate content out of
our system!
No problem!
Cost
Architecture
MonitoringCode
Testing
CI/CD
Security
Scalable
What’s the
Business Need
What’s the
Business Need
• What does inappropriate mean?
• What action will we take
if we find inappropriate
content?
• How accurate do we need it to be?
What’s the
Business Need
What’s the
Business Need
Action?? Monitoring
Human
in the loop
Data
Retention
Retraining
Identification
Amazon
Rekognition
Message shown to
customer advising
that the image
doesn’t meet our
guidelines.
Auto Claim Damage Photos Upload
Upload
Accept
Reject
Amazon
Rekognition
Auto Claim Damage Photos Upload
Upload
Accept
Reject
S3 Bucket
Customer Feedback Form
Amazon
Comprehend
Flag / UnflagAmazon Simple Queue
Service
AWS Lambda
CloudWatch
Event
AWS Step
Functions
Let’s Build…
Amazon
Comprehend
Flag / UnflagAmazon Simple Queue
Service
AWS Lambda
CloudWatch
Event
AWS Step
Functions
Yes
No
Trigger Step Function
Output
We need to keep inappropriate content out of
our system!
Sure! Let’s talk about what you
need.
Go Build
Something
Awesome
Yes
No
Trigger Step Function
Output
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.