How Wellzesta Actions deliver AI

Posted by John M. Robinson MD, PhD on January 3, 2024
Artificial Intelligence

 

This is the first article in a series on how Wellzesta incorporates artificial intelligence (AI) in our products and services.

About

The articles in this series are technical briefs; they are intended for a technical audience like CIOs and Heads of IT. Each article provides a technical overview of how certain functionality is implemented in Wellzesta StrongBand, Wellzesta's cloud-based API. 

Introduction

The purpose of generating an event is typically to allow other systems to easily react to changes in a source that they do not control. The source and action are typically built by different developers. Often the source is a managed service and the action is custom code in a server-less function (such as AWS Lambda or Google Cloud Functions).

Actions do something in response to an event. An event is a specific occurrence from a specific source.

Wellzesta Actions respond to events within Wellzesta's event-driven architecture. 

Wellzesta's event-driven architecture

Figure 1 illustrates Wellzesta's event-driven architecture. The API responds to a Create-Update-or-Delete (C-UD) request by sending an event to a channel on the PubSub message broker. The event is routed to a cloud function that is subscribed to the PubSub channel. 

execution flow

Figure 1. Flow diagram for Change Data Capture (CDC). CDC sends data to the database of the AI-search engine.

Wellzesta's event-driven architecture implements the CloudEvents specification. Figure 2 shows the CloudEvent schema. The "data" field is customized for a specific event type. 

CloudEvent Schema

Figure 2. CloudEvent Schema. 

Wellzesta Actions

Wellzesta Actions are implemented as cloud functions. Cloud functions can be written in just about any programming language, but our preferred language is Python. We like Python because it is "human readable," supports object oriented programming, and has strong support for classic data science and machine learning libraries (e.g., NumPy, SciPy, Pandas, TensorFlow). Python is the preferred language for most new AI tooling (e.g., ChatGPT, Bard).

The cloud functions (v. 2) run on Google's CloudRun platform-as-a-service (PaaS) architecture. CloudRun has a highly scalable, and cost effective, container platform. Recall that Google is the force behind Kubernetes orchestration environment, so we are likely getting Kubernetes-as-a-service without the overhead maintenance.

Example

The action that is performed by cloud function shown in Figure 1 is to update index of a database that is part of a distributed search and analytics engine (AI-search).

The AI-search engine is a search service within Wellzesta StrongBand. AI-search is accessed through its API, which is distinct from the main publicly-accessible GraphQL API. The search API is called directly by Apps such as Wellzesta Life, Wellzesta Elevate, and Wellzesta Thrive.

The Wellzesta Life App calls the search API to perform search queries on behalf of end users who are usually residents at Life Plan Communities. End users can also be @home "members," and "future residents." In Wellzesta Life, end users can search within specific sections of the App or search globally across all sections of the App. Figure 3 shows the results from a search within an organization's documents. 

Document search

Figure 3. Screenshot from the AI-search page on the documents section of Wellzesta Life. [Note: the new AI-search feature is only available residents who are enrolled in the beta tester program. Non beta-testers will see the standard keyword search.]

Diving a bit deeper, Wellzesta Life is a full-stack application that consists of both server-side and client-side components. The server-side component of Wellzesta Life is node.js, a JavaScript runtime. Wellzesta Life calls the search API through the node.js runtime so search queries are server-to-server. Utilizing server-server communication enhances stability and security. 

Conclusions

  • Wellzesta Actions perform AI tasks.
  • Wellzesta Actions are mostly implemented as cloud functions written in Python
  • Wellzesta Actions respond to events within Wellzesta's event-driven architecture
  • One example of a Wellzesta Action, discussed here, is the data ingestion into Wellzesta's AI-search engine that is triggered by C-UD behavior in the Wellzesta API. 
  • Wellzesta's event-driven architecture is part of Wellzesta StrongBand, Wellzesta's cloud-based API.

Next Steps

We transform legacy communication systems into innovative, highly-adopted engagement platforms that support resident well-being and staff efficiency.

To learn more, book a demo.