Communication is important for the success of financial advisors. Advisors communicate with many different customers daily and each customer has different needs and to-dos. Some kind of prioritization is needed to help organize and structure the advisors' tasks. But prioritizing customers is often done manually today.
In the GenAI Hackathon 2024 our team explored how generative AI could be used to help financial advisors prioritize their customers and speed-up communication tasks like writing emails.
The basic idea is to provide a dashboard of customers. The dashboard contains a list of customers and a short description of the action required to be done by the advisor for that customer. These actions are prioritized automatically according to urgency and emotionality as expressed by the customer. This information is extracted from the advisors' inboxes which saves the advisors from having to scan their inboxes manually. The additional time can then be spent with the customers to ensure that their goals are reached.
We've used the Hilla framework to build our frontend and backend faster. The frontend is using React and the backend is using Spring Boot. These two are established technologies brought together very nicely by Hilla. The AI is integrated using Spring AI. And last but not least: We used OpenAI as the generative AI and DALL-E to generate images.
export SPRING_AI_OPENAI_API_KEY=<INSERT KEY HERE>mvnThe customer dashboard should open automatically in your browser when you run mvn inside the project directory (the dashboard's address is http://localhost:8080).
The application will read a pre-defined set of mocked emails which we have asked the AI to generate for us. These emails will be analyzed by the AI to generate the to-dos for each email and each customer upon startup. The three most urgent actions are at the top of the list and include an image to the left of the required action. These images represent a customer's gender and emotional state as identified by the AI. The images and the text might vary with each run because they are generated "live" by the AI. The list of actions is ordered by urgency and emotional state. This is what the dashboard looks like:
You can click on Open to see the original message sent by the customer. The priority, the action title and the action's description as well as the customer's image are based on this message:
When you click on Respond then a form will open with a pre-generated text. You can edit this suggestion or hit Regenerate to generate a new suggestion. Click on Send in order to send this suggested and, optionally, edited text to the customer. This message will currently not be sent but instead a little animation is shown. In theory though this could be used to send an actual email to the customer.
Clicking on Regenerate will ask the AI to generate a new response. This response does respect the "politeness level" which can be set right under the Regenerate button. You can move the slider to the left to ask the AI to generate a response in a way a pirate would talk. Move the slider to the right to ask it to regenerate the response like a queen would talk:
We implemented this feature to fool around with the AI. But it could be used to fine-tune the response generation in other ways too. It shows how adaptable and how personizable generative AI can be.
The application allows to provide a custom prompt which will be added to each request made to the AI when responses are generated. This allows financial advisors to tweak the generation by providing some personal details: They can provide personal details or a description of their personal style. You can set the custom prompt when clicking Settings in the upper right corner.
Why do we generate images representing the customers' emotional states for the most urgent customers? We didn't in the first iteration of our application:
We, of course, sorted the to-dos by their priorities but displayed the priorities directly:
Nothing really stand out in that draft. We changed that early during development to make it easier to see the urgency (and therefore priority) easily at first glance. We humans evolved to identify and interpret faces quickly and easily. So this is the approach we decided to implement: Let the AI generate faces which represent a customer's gender and emotional state. The result is much more intuitive and faster to understand:
The application uses a detailed prompt which asks the AI to extract all relevant information from a provided email text and an email address. This information includes:
The action and name are displayed in the dashboard. The priority is used to sort the dashboard and the gender and the emotional state are used to generate the customer's image / avatar.
If the email address starts with "jon.clueless@" and the email text is the following:
"Hi, this does not work. I hate it! How can I update my financial data?"
Then the AI's response might look like this: