Generative AI

Generative AI in Healthcare to Improve Workflows

Icon of a triangle with an exclimation mark in the middle

Challenge

Inefficiency caused by manually searching through complex documentation

Icon of a location marker with five dashes coming out from the top

Outcome

Developed, launched, and iterated on a generative AI tool to streamline work

A person at a laptop with their hand on the trackpad looking a screen.

Confidential Healthcare Company

Transforming healthcare experiences with AI

The thoughtbot team worked with a client that has stayed relevant and successful through the use of cutting-edge innovations.

By leveraging the latest technological advancements in artificial intelligence and machine learning, this client optimized their internal workflows to provide unique insights and deliverables at lightning speed. As a marketing agency in the healthcare space, they pride themselves on helping their clients create relatable brand experiences powered by generative AI.

Challenge

Make internal knowledge and documentation more accessible to employees

As a large enterprise, the Healthcare Marketing Agency has hundreds of employees who need to create meaningful, accurate marketing content from complex research studies and other scattered, technical documentation. They edit and repurpose the content in various formats and collaborate on it with others across the organization. This process was time consuming.

Leveraging Generative AI for an internal tool

The CTO came to thoughtbot with an idea to improve these workflows. They pictured an internal enterprise ChatGPT tool that would allow their organization to keep their data proprietary while speeding up the workflow for employees.

While our client’s internal development team focused on maintaining their core products, thoughtbot was enlisted to tackle the ambitious new internal tool. This required senior architect support to design a data model and system, expertise in user research and prototyping, and a full-stack engineer who could build an integrated app using both Rails and Python.

Screenshot of the Generative AI user interface showing a "new conversation" button and a text field for typing in an AI prompt.

The thoughtbot team has been great to work with. The workflow from back-end to front-end is productive and overall dev velocity is impressive. They have shipped a ton of features in record time.


CTO, Healthcare Marketing Agency

SOLUTION

Understanding the users and use cases 

The goal of this internal tool was to allow various teams to quickly generate text responses to improve the workflow and productivity of their role.

In order to create an effective solution, we first needed to understand the target users. There were two distinct groups:

Group 1: The data team was a group of tech-savvy users already using ChatGPT who were comfortable with the way it works.

Group 2: The client-facing teams primarily work on creating marketing campaigns for pharmaceutical companies. This group was less tech-savvy.

In addition to understanding the users and their use cases, the thoughtbot team started running unit tests to fully immerse in the project. Running unit tests and understanding the bounds of OpenAI’s ChatGPT capabilities created a foundation from which to build.

Overview of the designs for the generative AI product showing various screens of the application.

Creating a superior, more relevant experience to ChatGPT and manual data analysis

The initial MVP of the internal tool was a wrapper around ChatGPT that focused on common tasks for the marketing team. For example, the common task of creating personas based on large data sets. With the new AI-powered internal tool, the marketer now has access to canned prompts that guide them through uploading a CSV and then prompting OpenAI for next steps such as "split into 5 market segments" then "turn segment 1 into a persona" and so on.

The LLM (Language Learning Model) isn’t hidden from the user but it makes common tasks easier. They have a list of prompts that they can maintain for themselves and that they can share with others on their team.

Screenshots of different states of the navigation component for the Generative AI product.

Designing a custom, simple OpenAI user experience

There were three design priorities:

  1. Make the text input experience as simple as possible. This included how the user interacts with the selection of prompts and inputs the starter text.
  2. Designing a user-friendly prompt experience that is accessible for less tech-savvy team members to navigate. thoughtbot included prompt functionality that streamlined making instant changes and conducting on-the-spot testing.
  3. Creating overall consistency in the internal tool by using shared visual components. This ensured the experience would feel cohesive and established a useful library for future development to maintain standards and develop quickly.

Tooling for both Web developers and data scientists

thoughtbot had to balance technical work between two teams: Rails Web developers and Python data scientists. The main LLM work made use of the LangChain Python library, but the user interacted with a Rails app using the latest Hotwire library.

To make this work we built a simple Python Web API that proxies LangChain functionality. Since this was predominantly network-bound, we made use of the async Python tooling and the Quart Web library. We exposed basic LangChain functions as we needed them, including chains, and then used this API from the Rails app.

Screenshots of the Generative AI product arranged in a flat grid.

Outcome

Streamlined workflows improve team productivity, new opportunities emerge for competitive differentiation

By teaming up with thoughtbot, the Healthcare Marketing Agency was able to create and launch their internal tool vision.

We successfully created a custom solution that takes advantage of OpenAI’s benefits while limiting the downsides of a public tool. Our solution prevented the lack of data protection, created a tailored user experience, and improved workflows to create a transformational outcome for our client.

Because this is an internal tool, our team had direct access to all users and fast, informative feedback cycles. This enabled us to iterate on features week over week to speed up the product roadmap.

Some of the highlights from the first phase of this ongoing project include:

  • Improved testing, test coverage, and test abstractions
  • Cloning conversations, cloning prompts
  • Re-generating ChatGPT output to avoid hallucinations
  • Sanitizing the output to avoid popular AI vulnerabilities
  • Onboarding and setup improvements
  • UX improvements for starting new conversations
  • Easier to understand what effects new prompts will have
  • Project prioritization and project management flow
  • Documentation to help users struggling with the app technicalities (ie liquid templates, and prompt engineering)

Our work on the generative AI project continues with the Healthcare Marketing Agency. As the product has matured and users found value, word spread quickly from team to team about its effectiveness and additional teams continue to adopt it. The power of the solution has also inspired exploration into how it can evolve to become a client-facing product.

What does success look like for your project?