All work

Smart Web Agency. 2024

An inclusion platform for workplaces, with an AI that checks writing for bias

Kaleidoscope gives an organisation three views of equality, diversity and inclusion: who works there, how that compares with the area around it, and how people feel each month. It also teaches through character stories, and its AI assistant, KAI, flags exclusionary words and suggests better ones. I built it at Smart Web Agency in Laravel 10, and 53 of its 54 commits are mine.

Kinds of bias KAI looks for, from ageism to fixed mindsets
5
Diversity dimensions, with intersectional groups
6
How often the culture survey asks again
Every month

What Kaleidoscope offers

KAI

An AI that checks writing for exclusionary language

KAI, short for Kaleidoscope AI, reads a piece of writing, such as a job ad, and flags words that could shut people out. Its prompt asks it to look for five kinds of bias: ageism, ableism, unconscious gender bias, cultural or regional bias and fixed-mindset language. Each flagged word comes back underlined in red, and hovering over it shows the reason and a word to use instead.

I built the KAI flow on OpenAI. The prompt comes from config, so its wording can change without a code change, and it tells the model the exact JSON shape to send back. The server checks that JSON before anything reaches the page.

Select your story

Character stories, with questions to think about

Select your story shows a row of characters on tall black and white cards. Hover over one and it comes into colour, with a one-line teaser taken from the character’s bio.

Each story page plays the character’s videos in order. Under “What did you think?”, the character’s own answer types itself out. Under “What do you think?”, employees give their view on a four-point scale from disagree to agree.

Our Organisation

Who works here, across six dimensions

Employers add their staff by uploading an Excel sheet. Each row is matched to the platform’s reference values, and every person gets an invitation link that expires after 7 days.

The dashboard charts the workforce by gender, ethnicity, disability, sexual orientation, economic background and religion, with the top five values in each and the full list a click away. Employers can build intersectional groups by picking values across all six, and compare each group with everyone else.

Our Community

The workforce, beside the area it’s in

The platform team sets a benchmark for each area, value by value, across 92 UK counties and areas. An employer picks a dimension and sees their company next to the local community.

One generic code path serves all six dimensions, and the chart turns to horizontal bars when a dimension has more than eight values.

Our Culture

A pulse survey, every month

Employees answer the month’s questions on a six-point scale, from almost every day to never. An answer counts for the month it was given in, so the same questions open again the next month.

The platform team writes the questions in a rich-text editor, and employers see one column chart for each question.

What it offers

Employees

  • KAIPaste in some writing and see which words to change, and why
  • Select your storyCharacter videos, the character’s own answers and a question to weigh in on
  • The monthly pulseQuestions each month, answered on a six-point scale

Employers

  • Staff invited from ExcelOne upload, matched to the reference values, with an invite for every row
  • Our OrganisationSix dimensions, top values first, and intersectional groups
  • Our CommunityThe company beside its county or area, one dimension at a time
  • Our CultureA column chart for every pulse question

The platform team

  • Employer invitesSent by email, with links that expire after 7 days
  • Community benchmarksSet per county or area, from a list of 92, saved value by value
  • ContentCharacters, videos, reflection questions and pulse questions
  • KAI’s promptAn extra instruction box to tune what KAI looks for

How I built it

An AI reply the server checks

The prompt is put together from config. The server rejects a reply that is not valid JSON, strips quotes from each reason so the tooltip stays intact, and wraps each flagged word with a case-insensitive, whole-word match.

One code path for six dimensions

Community benchmarks are stored as area, dimension and value. The dimension’s model is resolved at runtime, so the same code serves gender, religion and the other four.

Intersectional groups as filters

A group is saved once, as lists of values across the six dimensions, and turned into filters over up to six columns to compare the group with everyone else.

Small controllers, shared services

Single-action controllers grouped by area, 48 in all, with the counting kept in two service classes.

The work

Built at
Smart Web Agency, January to May 2024
Who uses it
Three roles: the platform team, employers and their employees
My part
All of the application code, in 53 of its 54 commits. Sign-in and invites, the Excel import, the three dashboards, the story pages and KAI, built on Laravel 10 and the Metronic admin theme
  • Laravel
  • PHP
  • MySQL
  • OpenAI
  • JavaScript
  • jQuery
  • Bootstrap
  • Laravel Fortify
  • Laravel Excel
  • Google Charts