13-minute read
To find a platform that would provide the flexibility to scale project resources and better control costs for an innovative, AI-augmented, DEI digital language assistant
Migrating a natural language processing API project (Python, with Java Server) to the Upsun PaaS
Advantage Group. Deutsche Bahn. Infineon. Publicis Media. Riverside Natural Foods. Swiss Life. Switzerland Federal Department of Defense, Civil Protection, and Sport DDPS. These diverse organizations all have something business-critical in common: the imperative to create and sustain an inclusive workplace culture. To help ensure inclusive language is applied at all organizational levels, they’ve made a decision to integrate Witty—an AI-augmented digital language assistant—into their diversity, equity, and inclusion (DEI) programs.
Developed on Platform.sh and the Upsun PaaS by startup Witty Works, Witty operationalizes organization-wide inclusion by simply and quickly detecting unconscious stereotypes and biases in written communication—giving feedback to users in real time. By enabling staff to consistently apply inclusive language based on corporate language rules, Witty has proven to shift individual behavior and company cultures.
Can’t wait to get to Witty’s technical bits? Here you go.
When Witty Works CEO and Co-founder Nadia Fischer entered the tech industry 12 years ago, she felt energized and elated about the innovation she’d become a part of. But as time went on, she made an observation that gave her pause: her company lacked gender and geographic representation. “Without more diversity, I felt we were lacking perspectives,” muses Fischer. “More broadly, while there were initiatives underway designed to help women and people of color to enter the tech industry, they centered on telling these groups how they should behave differently to get into tech. That problem didn’t belong to them; it belonged to the companies spearheading the initiatives.”
In 2018, Fischer began to consult with and offer workshops to tech companies to further their diversity and inclusion initiatives. The result? “Disappointing,” she says. As companies proceeded to make DEI a box-checking, single-workshop exercise, Fischer dug into workplace research from Harvard Professor Frank Dobbin and from the University of Munich.
With the conviction that inclusive language builds inclusive cultures, Fischer knew there must be a software solution to help women, people of color, LGBTQIA+, persons with disabilities, and other communities gain inclusion parity. To determine just how to approach solving the software challenge, Fischer invited innovative developer and former colleague Lukas Kahwe Smith to join her team.
When Witty Works CTO and Co-founder Smith joined the DEI-championing company in 2019, there weren’t any DevOps engineers. “I’m decent at server maintenance, but am not really an expert,” Smith explains. “Most importantly, I just didn't have the time to deal with it. So we adopted Platform.sh from the get-go.”
With the Platform.sh PaaS managing cloud infrastructure, data services, and security, Smith (flying solo) could focus his engineering energies on building and refining the Witty application. “I was quite happy using Platform.sh dev tools and my own Git workflows and tech stack,” shares Smith.
First, the team built a minimum viable software product that focused on inclusive language in job ads to ascertain if there would be market interest; there was. Then they initiated a financing round, and soon Witty Works was off and running.
That is, until Smith and team hit a bump. When they began to develop Witty’s machine-learning API in Python and Java, they found they couldn’t scale resources as flexibly as they needed to on Platform.sh alone.
“As a startup, resource allocation became an increasing challenge for us because you don’t want to waste money buying resources you’re not using,” Smith says. This conundrum became the catalyst for Smith’s exploration into other options.
Smith and team set out to identify a robust solution to address their resource challenges. But during discovery, he soon learned the alternatives (see below), “would have required much more DevOps work.”
Before Smith made his final decision, he learned about Upsun, a new, fully managed, self-service PaaS powered by Platform.sh (then in alpha). “It sounded like Upsun would solve the resource challenges we were facing and could be a perfect fit for us,” says Smith.
A proof of concept on the Upsun PaaS became the testing ground for Smith and a Witty application, which he got up and running quickly. Smith’s “familiarity with Platform.sh came in handy,” he says.
Upsun offered Smith exactly what he’d been searching for: a platform to meet the resource demands of custom code, microservices, and AI-rich projects. He felt confident migrating the Witty production setup to the Upsun PaaS alpha in the first half of 2023. “The underlying technology was rock solid from day one,” shares Smith.
Witty Works’ natural language processing (NLP) API consists of a Python FastAPI custom application that handles the bulk of the NLP analysis using the spaCy library and the Witty Works’ custom rule engine, and also calls into a Java application—all hosted within a single Upsun project to ensure fast and secure internal network traffic. A custom machine-learning model using PyTorch (hosted on AzureML) is used for false-positive detection.
The rule editor is a custom Python Django Admin application used by Witty Works linguists to maintain the configuration for their NLP API rule engine. This application also handles validating the accuracy of the rules by calling into the NLP API to test if the rule behaves as intended.
DEI activities’ return on investment needs to be measurable and business-relevant. Through the Witty dashboard, staff can configure their individual and team writing highlighting; analytics provide organizations with insights into their teams' writing—and the most prevalent, unconscious team biases—to understand how behavior has shifted toward inclusion and prove how that shift has impacted their businesses.
The Witty browser extension, written in ReactJS, integrates into the browser to enable users to interact with the NLP API. Based on user privacy settings, the NLP API will review the text provided and automatically annotate it based on the personal and team configuration. Users are presented with a short learning bite on the bias underlying the given piece of text and are offered possible alternatives to choose from, along with the option to dive deeper into more learning content.
As one of Upsun’s first adopters, Smith’s experiences and vital feedback helped the Upsun team refine current product features and consider new ones. Here are the features currently most relevant to Witty’s development.
Upsun’s flexible resources enable Witty Works developers to control their resources and users at both project and organizational levels, per application, per environment. Self-service, highly customizable, with no human intervention required, flexible resources address the team’s technology challenge and the financial challenge many startups face: making the most of every investment.
The bulk of Witty’s business customers reside in Europe and North America. Over the course of a day, the load shifts into high gear for 16 hours, then winds down for 8 hours, punctuated by intermittent usage spikes. With this very predictable schedule —and real-time load metrics from the Upsun CLI—the dev team uses cron jobs to automate increases and decreases in the number of app instances according to this usage pattern.
timezone: "Europe/Zurich"
crons:
# "Scale up at 07:30 on every day-of-week from Monday through Friday."
upscale:
spec: '30 7 * * 1-5'
commands:
start: |
if [ -n "${UPSUN_CLI_TOKEN}" ]; then
upsun resources:set -y --count app:${APP_UP_SCALE},java:${LANGUAGE_UP_SCALE}
fi
# "Scale down at 23:30 on every day-of-week from Monday through Friday."
downscale:
spec: '30 23 * * 1-5'
commands:
start: |
if [ -n "${UPSUN_CLI_TOKEN}" ]; then
upsun resources:set -y --count app:${APP_DOWN_SCALE},java:${JAVA_DOWN_SCALE}
fi
With integrated, out-of-the-box Upsun observability tools—including Blackfire support for Python—Smith and team monitor every component of the Witty application, detect any errors and anomalies, then quickly identify and resolve issues before they become major blockers. With continuous profiling in the Upsun console, the dev team can also pinpoint which parts of their application consume the most resources, then make informed decisions about optimizing performance.
Upsun’s high levels of built-in security and compliance (including SOC 2 Type 2, PCI DSS Level 1)—fully automated and managed through the principles of the shared-responsibility model—give Smith’s team more time to focus on application code and innovation. No more server provisioning or security patching.
Through the Witty browser extension, Smith deals with sensitive data. Where that data is processed is paramount to Witty Works customers. “How we secure the data is a key question enterprise customers, in particular, ask during the due-diligence process,” explains Smith. “Business continuity through automated backups and deterministic deployment procedures that would enable us to migrate to a different data center in case of disaster are all things we have—thanks to core Platform.sh design principles.”
The Witty Works team continues to expand Witty’s capabilities and enhance user experience. Soon, an AngularJS-based Word add-in will enable users to highlight content directly in Word, whether working on their desktops or in a browser. A logical extension? Add-ins for company-wide communication channels like Outlook, Teams, and Slack. Available languages will extend beyond English and German to include French and Spanish, so the company can reach new markets. Based on research and trends, linguistic specialists will continue to build vocabularies based on research and trends to support specific communities.
“As the CTO of a still-small startup, I have both development and administrative responsibilities, so my time is limited,” Smith explains. “Moving to a platform that would have required more of my time to maintain the entire setup meant I would have had to reduce my time in other areas or hire someone part-time to take over some of those additional tasks.”
Through an AI-augmented tool staff use daily, Witty Works’ SaaS solution helps organizations build and strengthen diverse, inclusive teams who problem-solve and champion change through language.
Consulting, Financial Services, Global Services, Industrial Products, Insurance, Logistics, Media, Manufacturing, Non-profit, Retail, Technology