Improving data accessibility and ensuring that data is not just available but also comprehensible to every team member is a challenge many companies can relate to. During the PayFit Hackathon in June 2023, we embarked on a journey to address this hurdle, and what began as a small idea would soon evolve into Sensei, our Data Assistant.

Join us as we recount the adventure of how three PayFiters (Anas, Carla, and Paula) transitioned from conceptualizing an idea to the creation of Sensei, navigating through challenges and discovering solutions along the way.

A Lightbulb Moment

The inception of Sensei was no mere coincidence; it was a response to the rapidly evolving landscape of Large Language Models (LLMs) such as ChatGPT and many others out there (Who could imagine working a year ago without these solutions?).

Our adventure started with a lightbulb moment: we imagined a reality where it was super easy for everyone at PayFit to find the data they needed without having to dig through mountains of information. And just like that, the idea of Sensei, a conversational data assistant, was born. The vision presented at the end of the Hackdays undeniably captivated both the jury and the public, propelling us to win first place.

Two Big Quests

The idea of Sensei was born from our desire to tackle two main issues: making it easy for PayFiters to find the right data in Looker, and saving the Data Team from answering the same questions repeatedly in our #ask-data Slack channel. To effectively address these challenges, focusing on refining our data taxonomy was crucial. Improving how we organize and categorize our data was a key part of the process to make data more accessible, understandable, and usable for AI solutions.

We dreamt up Sensei as a bridge between those in search of data insights and those managing data, ultimately making the data experience more efficient and intuitive for everyone at PayFit.

Figuring out everyone’s needs

Before we started building Sensei, it was important for us to fully grasp what our PayFit colleagues needed from a Data Assistant. We needed to deeply understand how Sensei could help them in their day-to-day work and which features would be useful for them.

So, we rolled up our sleeves and had several chats with our coworkers to gather what would make the perfect solution for them. Did they think Sensei should live in Slack? What kind of questions would they throw at Sensei? How could Sensei make their tasks more efficient?

Listening to our coworkers wasn't just a one-time exercise, it's a journey we're on together. We’ve kept the conversation going, continuously asking for feedback and paying close attention to the questions employees throw at Sensei. This way, we ensure that Sensei will grow and evolve in tune with what our team really needs.

Under the hood

Our journey was - is - not without its ups and downs. We had to understand and investigate new tech, figure out how to make it work for us, and keep evolving based on feedback from our colleagues whose support and enthusiasm have been crucial to pushing us forward.

In our research, we confirmed users showed a clear preference for Slack as an interface so we deployed Sensei on PayFit's Slack workspace, as close to our users as possible. Integrating with Slack was an important aspect for us, as we wanted to offer our users a seamless experience without switching platforms. 

How does Sensei work?

Sensei is structured around two core functionalities: Sensei Navigate and Sensei DataChat.

Sensei Navigate focuses specifically on helping PayFiters find the right data assets.
It offers a natural language interface for PayFiters to locate relevant data assets, understand their applications, and identify the data owners, by simply asking their questions.

To achieve this we rely on GPT-4 capabilities in:

  • Understanding user questions and requests
  • Finding the relevant answer from our documentation knowledge base

We then prompt the LLM with the following elements:

  • Instructions: This is where we set the tone and general guidelines on how to respond. We iterated many times over our instruction prompt to improve the quality of our responses (staying on topic, understanding ambiguities, formatting correctly, etc.), continuing to deploy improvements.
  • Knowledge Base: The knowledge base is crucial for Sensei Navigate. It is meticulously curated with links to certified assets, detailed descriptions, and contact points for further assistance. We leverage the large context size from GPT-4 to send the full knowledge base in the context.
  • User question: The Slack message sent by the user to our chatbot.

Relying on best practices for prompt engineering was key to achieving the best results, such as providing examples, being specific, and using affirmative and imperative sentences.

The Sensei DataChat feature aims to facilitate access to our data in Snowflake. For our MVP we have deployed a solution using query templates and form-based input directly through Slack.

We are currently investigating more advanced capabilities such as Text2SQL to allow our users to get relevant answers from the data simply by asking questions in their language.

Technical architecture

The solution is deployed as a Slack application hosted on our AWS environment. 

We use AWS Lambda to host the Slack App, this allows us to scale seamlessly with usage, so we can be cost-efficient while also responding to eventual peaks of usage for example during demos of Sensei in front of hundreds of curious PayFiters.

The Lambda function connects to:

  • The Azure OpenAI API, where we have a dedicated and compliant GPT-4 deployment.
  • Our Snowflake instance, where we expose only the necessary tables to the Slack application so that it can query them.

We also have a dedicated AWS Aurora instance where we track usage of the different features.
This allows us to better understand our users' needs and questions, drive our roadmap, and fix any observed issues proactively.

The magic of PayFit

One of the pivotal reasons behind Sensei’s successful inception was the environment provided by PayFit. We were given the space, support, and resources needed to turn our hackathon win into something real. It's this kind of environment that lets bold and innovative ideas like Sensei not just grow but flourish.

Sensei today

Now, Sensei has been live for almost four months, and it’s been quite the journey! Living in Slack, everyone in the company can chat with Sensei just like they do with their teammates.

Leveraging advanced natural language processing, Sensei is helping PayFiters with a wide range of data-related queries: be it pinpointing the right Looker Dashboard for Customer Satisfaction or Monthly Recurring Revenue analysis, identifying the relevant data sources for customer ticket insights, fetching crucial billing details of a customer, or offering easy access to a client’s Salesforce account.

Sensei is not just a tool but is becoming a trusted colleague that's making data more accessible and actionable for everyone at PayFit.

What's Next

The creation of Sensei is evidence of the spirit of innovation that thrives within PayFit. Creating Sensei has been an epic chapter in our PayFit story, showing what's possible when a team dreams big and gets the support to make those dreams come true. We're excited to keep improving Sensei, ensuring it's always there to make data easy and accessible for everyone at PayFit.

Overall, Sensei isn't just about making data easier to find. It's a symbol of our journey towards being the best we can be, using technology to tackle challenges head-on. Sensei is more than just a Slack data assistant; it’s a milestone in our continuous journey toward operational excellence and innovation.