Más contenido relacionado La actualidad más candente (20) Similar a Financial Svcs: Mine Actionable Insights from Customer Interactions Using Machine Learning (FSV303) - AWS re:Invent 2018 (20) Más de Amazon Web Services (20) Financial Svcs: Mine Actionable Insights from Customer Interactions Using Machine Learning (FSV303) - AWS re:Invent 20182. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Financial Svcs: Mine Actionable Insights from
Customer Interactions Using Machine Learning
F S V 3 0 3
George Smith
Solution Architect
AWS
Christopher Marsh-Bourdon
Solutions Architect
AWS
Shiv Bhatt
Solutions Architect
AWS
Hanybal Jajoo
Solution Architect
AWS
Kenneth Jackson
Solutions Architect
AWS
3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
• Description of business case
• Propose an architecture to meet the business
requirements
• Describe the workshop challenges & the teams will
work together to build a solution
• Review the teams solutions
4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today’s timeline
o First 15 minutes (12:15 – 3:30)
o Present the problem
o Present the architecture
o Present the solution to steps one & two and describe other options
o Give direction on the the workshop challenges
o Next 105 minutes (12:30 – 2:15)
o Teams work on challenges
o AWS staff assists with any Q&A
o Dashboards are displayed
o Next 15 minutes (2:15 – 2:30)
o Review progress by team
o Review strategies each team utilized
o Q & A
Tuesday, Nov 27,
12:15 p.m. - 2:30 p.m.
Bellagio, Level 1,
Renoir 2, T2
5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scenario
Call center:
Phone
Chat
Email
Twitter
Facebook
Others
7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scenario
Was this interaction good or bad? How do you know?
This was your opportunity to take action on the customer’s behalf
This was your opportunity to earn the customer’s trust
Is this a high-value customer?
Does this customer have a relationship with a high-value customer?
Does this customer have the potential to be a high-value customer?
Without the right analytical tools, you are missing opportunities to insure
your high-value customers are happy
If they are not happy, your high-value customers will leave for your competitors
8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
FSV303 architecture
AWS KMS
Encrypted
data
Corporate data center
AWS cloud
Corporate
HSM
Corporate
client data
10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Encrypting messages for the Kinesis stream
# session for aws_encryption_sdk
def create_cache_crypto_manager (botocore_session):
kms_kwargs = dict(key_ids = [KMS_ALIAS_ONE, KMS_ALIAS_TWO])
kms_kwargs['botocore_session'] = botocore_session
key_provider = aws_encryption_sdk.KMSMasterKeyProvider(**kms_kwargs)
.
.
.
def encrypt_cypher_text (cache_manager, plain_text):
cipher_text, encryptor_header = aws_encryption_sdk.encrypt(source = plain_text, materials_manager =
cache_manager)
return base64.b64encode(cipher_text).decode('utf-8')
.
.
def output_to_kinesis_stream (stream_name, output_record, team_identifier):
try:
kinesis_client.put_record(StreamName = "Team" + str(team_identifier).zfill(2) + "Stream",
Data = json.dumps(output_record),
PartitionKey = output_record['TeamName'])
.
.
print ("Kinesis put:", json.dumps(transmit_dict), "nn")
11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Message placed on the Kinesis stream
Kinesis put: {"TeamId": 1, "EntryTS": "2018-10-12 17:53:37", "CustValue": 4, "Summary":
""Delight" says it all", "CustId": 9, "Ciphertext":
"AYADeIGTBZP6eKGE9F2p3W96pvAAXwABABVhd3MtY3J5cHRvLXB1YmxpYy1rZXkAREFqOWo1bnZwRnNWaUY2U0twcUQ5VkFv
UnAxd0wvd2IzVm85MXJWWDFvODQ3VGxid3R1K1BUVVhMQ3JGK0NPNk1EUT09AAIAB2F3cy1rbXMAS2Fybjphd3M6a21zOnVzL
Xdlc3QtMjoxMTgwOTMxMjU4NTE6a2V5L2IwYTkwYzMyLWQwODgtNDFkYi05NzJlLTZkYjFmNTc3OWY0YgC4AQIBAHhD9y8H6m
DV/KsygCEoPCGvfTfQQFAUm0nlzBrZJoxTkQEvZaHx5K7QOrylCbf8a9FPAAAAfjB8B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UlPhgniPZyHcnxhqdJ6fe4KbKNHKQk9Y9boE
XzNAyuObA7mwrPhetvgvW60AikapxWa0LukzZhaxX17rBnplyGDBV8RhNPTtb80tzoaHPm3V95zd/xrZCIUh7eFMcNj8nDn11
GGRBmMrzB+MzS+9lpteTcwd2cvvgTh/ygTFxPbUZFw7in6V4JaVhsE3zq3WqkyqXIZeSPCFnGdpW9zx+/ogj2RApepzbDVnVW
I4hGlCAwf6mHIEz1XoMAZzBlAjEArmRxMKBT5xgrlDnixLuo7n4CR4W0AA8yXPb952B3JK5C75sJO9wy+qsAknxmAt28AjAnC
bX29SL8G86JCTM4zBbnwWjfJQaIZxl+C9wphEJ5wTRX5mFUu01GIOHQ8XP/2w0=", "TeamName": "t1", "CaseNo": 6}
12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
FSV303 architecture
AWS KMS
Amazon
Kinesis Data
Streams
Lambda
function
Encrypted
data
Amazon
Comprehend
Corporate data center
AWS cloud
Corporate
HSM
Corporate
client data
13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Comprehend
Amazon Comprehend is a natural language processing (NLP) service that
uses machine learning to find insights and relationships in text
You can use the Amazon Comprehend APIs to analyze text and use the
results in a wide range of applications including voice of the customer
analysis
Entities
Key phrases
Language
Sentiment
Amazon Comprehend
14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Comprehend sentiment analysis
{ "Text": " I would like my tax documents please. For
some reason they are not showing as available on the
website and taxes are due in the next week. When
should I expect them? "LanguageCode": "en" }
{ "Sentiment": "NEUTRAL", "SentimentScore":{
"Mixed": 0.06918329000473022,
"Negative": 0.42529943585395813,
"Neutral": 0.4811651408672333,
"Positive": 0.02435220219194889} }
{ "Text": "Where the heck are my tax documents!
I only have a week to go before filing and this is getting
down to the wire. When will they be available?!? This is
ridiculous!", "LanguageCode": "en" }
{ "Sentiment": "NEGATIVE", "SentimentScore":{
"Mixed": 0.023401759564876556,
"Negative": 0.911704421043396,
"Neutral": 0.05554146319627762,
"Positive": 0.009352359920740128 } }
{ "Text": "I love that the tax package is available on the
website. Can you assist me with downloading the
file?", "LanguageCode": "en" }
{ "Sentiment": "POSITIVE", "SentimentScore": {
"Mixed": 0.01834455132484436,
"Negative": 0.007256380748003721,
"Neutral": 0.2650638222694397,
"Positive": 0.7093352675437927 } }
15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Comprehend sentiment analysis
Transcript: {'TeamId': 1, 'EntryTS': '2018-10-12 17:53:37', 'CustValue': 1, 'Summary': '"Delight" says it all',
'CustId': 1, 'Ciphertext':
'AYADeEOQqjIgud1adOp8IzLot44AXwABABVhd3MtY3J5cHRvLXB1YmxpYy1rZXkAREF1MkJMOHQxdDdpTmFUSHdRY3NJMzYyVThKeFdnWGM5eW
pFQmIzN1NLSkJPakRURXF6MXB1L0taUllodlJNYm8xZz09AAIAB2F3cy1rbXMAS2Fybjphd3M6a21zOnVzLXdlc3QtMjoxMTgwOTMxMjU4NTE6a
2V5LzU0NzcwMDBkLWMwY2MtNDMxNC1iZWJiLTU0NzEwYzc5MjEwYgC4AQICAHjZoyG6/23IvTJAzT1dRw6tvXbNUXlIaTLqhTsr/oIcMQGKxdyA
uhBGQZY3a3eHVLZiAAAAfjB8BgkqhkiG9w0BBwagbzBtAgEAMGgGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQMZGFFGUVibx9vlGvHAgEQgDv
biZtQKmiHBJONQdvkX0/xqF/9Ba/udUsP6l5haWPf9dDkmJJIx7LFfEnJLI2515z9HYUjqVieeGMO+QAHYXdzLWttcwBLYXJuOmF3czprbXM6dX
Mtd2VzdC0yOjExODA5MzEyNTg1MTprZXkvYjBhOTBjMzItZDA4OC00MWRiLTk3MmUtNmRiMWY1Nzc5ZjRiALgBAgEAeEP3LwfqYNX8qzKAISg8I
a99N9BAUBSbSeXMGtkmjFORAYzW8SxxBc5l26hpZfEC9kIAAAB+MHwGCSqGSIb3DQEHBqBvMG0CAQAwa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 'CaseNo': 6}
Output: {'TeamId': 1, 'TeamName': 't1', 'CustId': 1, 'CaseNo': 6, 'EntryTS': '2018-10-12 17:53:37', 'Summary':
'"Delight" says it all', 'Sentiment': 'POSITIVE', 'SentimentScore': {'Positive': 0.9837943911552429,
'Negative': 0.0025041757617145777, 'Neutral': 0.010817321948707104, 'Mixed': 0.002884144429117441},
'Processed': 'Fri, 19 Oct 2018 20:04:23 GMT'}
16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
FSV303 architecture
AWS KMS
Amazon
Kinesis Data
Streams
Lambda
function
Encrypted
data
Amazon
Comprehend
Corporate data center
AWS cloud
Corporate
HSM
Corporate
client data
Amazon
Transcribe
17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Transcribe
Time
stamps
Support for
both regular &
telephony audio
Punctuation
&
formatting
Amazon S3
integration
Recognize
multiple
speakers
Custom
dictionaries
? !
Call
centers
Subtitles for
VOD
Transcribe meetingsBroadcast closed
captions
Features
Use cases
18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Remember this?
Output: {'TeamId': 1, 'TeamName': 't1', 'CustId': 1, 'CaseNo': 6, 'EntryTS': '2018-10-12 17:53:37', 'Summary':
'"Delight" says it all', 'Sentiment': 'POSITIVE', 'SentimentScore': {'Positive': 0.9837943911552429,
'Negative': 0.0025041757617145777, 'Neutral': 0.010817321948707104, 'Mixed': 0.002884144429117441},
'Processed': 'Fri, 19 Oct 2018 20:04:23 GMT'}
19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Architecture
AWS KMS
Amazon
Kinesis Data
Streams
Amazon
Kinesis Data
Analytics
Lambda
function
Amazon
S3 BucketEncrypted
data
Amazon
Comprehend
Amazon
Kinesis
Firehose
Real-time
insights,
analysis, and
actions
Corporate data center
AWS cloud
Corporate
HSM
Corporate
client data
1. Get customer information from analytical
stores
2. Send sentiment values and customer
values to AI service
3. Predict next step
4. Take action
5. Follow feedback loop
Amazon
Redshift
Amazon
EMR
Amazon Machine
Learning
AWS Glue Amazon
Athena
1. Catalog the data lake
2. Query the days interactions
3. Find top five negative interactions
4. Insure action taken is effective
5. Create your own analytics
Amazon
Transcribe
20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Architecture – what’s pre-built vs. what you build
AWS KMS
Amazon
Kinesis Data
Streams
Amazon
Kinesis Data
Analytics
Lambda
function
Amazon
S3 BucketEncrypted
data
Amazon
Comprehend
Amazon
Kinesis
Firehose
Real-time
insights,
analysis, and
actions
Corporate data center
AWS cloud
Corporate
HSM
Corporate
client data
1. Get customer information from analytical
stores
2. Send sentiment values and customer
values to AI service
3. Predict next step
4. Take action
5. Follow feedback loop
Amazon
Redshift
Amazon
EMR
Amazon Machine
Learning
AWS Glue Amazon
Athena
1. Catalog the data lake
2. Query the days interactions
3. Find top five negative interactions
4. Insure action taken is effective
5. Create your own analytics
Amazon
Transcribe
22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Workshop challenges
1. Catalog the data lake using AWS Glue
2. Construct and run reports against the
data lake using Amazon Athena
3. Build the real time analytics feed using
Amazon Kinesis Data Analytics
4. Perform real time analytics to flag
actionable transcripts
5. Select actionable negative interactions
and take action to improve the
customers sentiment value
Each team has 400 customer interactions
of which 57 are negative
• Track your sentiment status from the
beginning of the workshop through the
end
• How did you decide to prioritize your
teams actions?
• What technologies did you employ?
23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Workshop instructions
1. Do all work in the Ireland Region
2. Open and read the html files from
S3://fsv303-teamXX-files-bucket-ireland in
your account
1. Readme.html is generic instructions
2. Hints.html has step by step instructions
3. Faq.html has solutions to common problems
3. Review the python code on the ec2 instance
4. Ask questions of the AWS staff. That is why
we are here today
5. Invent, Build, Experiment
1. We will pass out AWS account information for
each team
• Each table is a team
• Each team has an AWS account
• Each team member has an id in that account
2. Sign into your teams AWS console and get the
ec2 instance ip address along with the html
docs
3. Sign on to the ec2 instance:
• pem file will be downloaded from the S3 bucket
• chmod 600 on the pemfile
• ssh –i <pemfile> ec2-user@<ip address>
4. Work together and in parallel. Break up the
tasks into workstreams for team members
24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Workshop steps
1. Do all work in the Ireland Region
2. Sign in to the AWS console with the id
provided and follow the instructions provided
3. Download the .pem file and open all workshop
documentation html files
4. Connect to the ec2 instance in your account
5. Run the producer.py
6. Use the AWS console to see the results. Check
the S3 bucket and Amazon Kinesis dashboard.
If you want to review the Lambda code it is in
the home directory of the ec2 instance
7. Catalog the S3 data lake using AWS Glue
8. Build and run queries using Amazon Athena
9. Build the Amazon Kinesis Data Analytics workflow
10. Catalog the actions table using AWS Glue
11. Use Amazon Kinesis Data Firehose to stream
actionable transcripts to the ”actions” prefix in the
S3 data lake
12. Query the actions table using Amazon Athena to
prioritize transcripts that require follow-up
13. Run the updater.py on the ec2 instance to insert a
follow-up transcript which will be scored by the
sentiment workflow
14. Query the S3 data lake to see if the customer
interaction changed to a positive sentiment score
15. Repeat steps 12 – 14 to address negative customer
sentiment for other interactions
25. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
26. Thank you!
© 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
George Smith
Solution Architect
smgeo@amazon.com
Christopher Marsh-Bourdon
Solutions Architect
cmarshbn@amazon.com
Shiv Bhatt
Solutions Architect
shivbh@amazon.com
Hanybal Jajoo
Solution Architect
hanyba@amazon.com
Kenneth Jackson
Solutions Architect
jaknn@amazon.com
27. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
28. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Related breakouts
Wednesday, November 28
ANT343 - Get the Most out of AWS Glue Data Catalog and Crawlers for Data Lake Analytics
4:00 PM - 5:00 PM | Aria West, Level 3, Starvine 10, Table 1
Wednesday, November 28
SEC362 - Best Practices for Securing Serverless Applications
4:00 PM – 5:00 PM | Aria East, Level 2, Mariposa 3
Tuesday, November 27
SEC329 - AWS Encryption SDK: The Busy Engineer's Guide to Client-Side Encryption
2:30 PM – 4:45 PM | MGM, Level1, Grand Ballroom 124