Views
No views yet
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2import nltk
3nltk.download('punkt')
4
5tokenizer = AutoTokenizer.from_pretrained("fabiochiu/t5-small-medium-title-generation")
6model = AutoModelForSeq2SeqLM.from_pretrained("fabiochiu/t5-small-medium-title-generation")
7
8text = """
9Many financial institutions started building conversational AI, prior to the Covid19
10pandemic, as part of a digital transformation initiative. These initial solutions
11were high profile, highly personalized virtual assistants — like the Erica chatbot
12from Bank of America. As the pandemic hit, the need changed as contact centers were
13under increased pressures. As Cathal McGloin of ServisBOT explains in “how it started,
14and how it is going,” financial institutions were looking for ways to automate
15solutions to help get back to “normal” levels of customer service. This resulted
16in a change from the “future of conversational AI” to a real tactical assistant
17that can help in customer service. Haritha Dev of Wells Fargo, saw a similar trend.
18Banks were originally looking to conversational AI as part of digital transformation
19to keep up with the times. However, with the pandemic, it has been more about
20customer retention and customer satisfaction. In addition, new use cases came about
21as a result of Covid-19 that accelerated adoption of conversational AI. As Vinita
22Kumar of Deloitte points out, banks were dealing with an influx of calls about new
23concerns, like questions around the Paycheck Protection Program (PPP) loans. This
24resulted in an increase in volume, without enough agents to assist customers, and
25tipped the scale to incorporate conversational AI. When choosing initial use cases
26to support, financial institutions often start with high volume, low complexity
27tasks. For example, password resets, checking account balances, or checking the
28status of a transaction, as Vinita points out. From there, the use cases can evolve
29as the banks get more mature in developing conversational AI, and as the customers
30become more engaged with the solutions. Cathal indicates another good way for banks
31to start is looking at use cases that are a pain point, and also do not require a
32lot of IT support. Some financial institutions may have a multi-year technology
33roadmap, which can make it harder to get a new service started. A simple chatbot
34for document collection in an onboarding process can result in high engagement,
35and a high return on investment. For example, Cathal has a banking customer that
36implemented a chatbot to capture a driver’s license to be used in the verification
37process of adding an additional user to an account — it has over 85% engagement
38with high satisfaction. An interesting use case Haritha discovered involved
39educating customers on financial matters. People feel more comfortable asking a
40chatbot what might be considered a “dumb” question, as the chatbot is less judgmental.
41Users can be more ambiguous with their questions as well, not knowing the right
42words to use, as chatbot can help narrow things down.
43"""
44
45inputs = ["summarize: " + text]
46
47inputs = tokenizer(inputs, max_length=max_input_length, truncation=True, return_tensors="pt")
48output = model.generate(**inputs, num_beams=8, do_sample=True, min_length=10, max_length=64)
49decoded_output = tokenizer.batch_decode(output, skip_special_tokens=True)[0]
50predicted_title = nltk.sent_tokenize(decoded_output.strip())[0]
51
52print(predicted_title)
53# Conversational AI: The Future of Customer Service