How we built a chatbot that understands economics

This June, Polly Portfolio launched Polly Chat, the first investment chat-bot, on Facebook Messenger. Polly Chat solicits client opinions on the latest headlines, provides feedback on their economic outlook, and explains how clients can best position themselves for that outlook.

Polly Chat for Facebook Messenger

We’re excited to release Polly Chat to the world, but we also wanted to take a moment to chat about the technology that powers it. In just three weeks, our team rolled out a bot capable of having a personalized and sophisticated conversation about markets and investments. Here’s how we did it.

Facebook Messenger

When Facebook introduced Bots for Messenger, we were quick to sign up. Messenger offered a low-friction way to reach prospective clients — no signups or app downloads required — as well as a new means of interacting with them. It aligned well with our mission to make investment management more, in their words: personal, proactive, and streamlined.

Facebook Messenger’s rapid growth is also exciting: as of April 2016, it counted 900 million active monthly users. We wanted to show that Polly Portfolio could talk to prospective clients on their terms — have the conversations they want to have, where they want to have them.

Building the Bot

Our endeavor began with a distinct advantage: most of the functionality we wanted to provide already existed within our framework.

The key to bringing this project to life was investment logic that lived in digital form. In building Polly Analytics, we had also created an additional layer of back-end technology: API-accessible services leverage our proprietary investment logic to conduct user interviews and synthesize responses, to dynamically create bespoke portfolios and thematic trades, and to generate natural language stories around portfolios and trade ideas.

A service-oriented architecture meant that we could cherry pick functionality while reusing the original code, instead of trying to extract insight from an omnibus application.

Because so much of the business and investment logic was already neatly packaged, we could focus on the problems we cared about: learning the platform and creating the right user experience.

AI and Semantic Knowledge

Polly Chat was our first foray into a new type of client communication, and Facebook Messenger provided a nice jumping-off point. But we hope that the conversation gets better and better.

Here at Polly Portfolio, we’re excited about the prospect of artificial intelligence and look forward to more intuitive, language-based interfaces. Moreover, we believe that Polly Portfolio is uniquely positioned to integrate with new AI technology.

Our enterprise offering for investment research, Sophograph, organizes semantic knowledge about economic relationships so that it can plug in to AI systems. (When we say “semantic knowledge,” we mean information about how different concepts are related, like knowing that inflation reduces near term bond returns and boosts long term bond returns or that China’s trade linkages with Japan are stronger than China’s trade linkages with the U.S. This is in contrast to the data-crunching “syntactic” analysis that AI systems use to recognize faces in pictures and stuff like that.)

Sophograph uses generalized research results from human experts to automatically navigate external inputs and provide meaningful feedback on a variety of client queries and concerns.

However, we don’t think you need to be a Facebook Messenger fan or an AI nerd to appreciate the power of Sophograph. The truth is, nobody knows for sure how technology, client concerns and preferences, or even government regulations, will evolve. And you don’t need to, if you have a flexible framework for automatically (and tirelessly!) making your investment experts’ expertise available to digital services. Sophograph allows enterprise users to rapidly deploy new types of interfaces and conversations, adapting to client needs as they change.

Today, Facebook Messenger. Tomorrow, well, who knows!


Please leave a comment or email us at info@pollyport.com to start a conversation, or subscribe and follow us on Medium for more thinking about the digital investing and wealth business.

And if you enjoyed the piece, let us know by hitting that ♡ below!