Whose empathy? Scoring AI against your own brand voice in Drupal

Whose empathy? Scoring AI against your own brand voice in Drupal

An empathetic answer from a crisis helpline and one from a luxury travel concierge should not sound the same. A grief-support chatbot should be slow and plain-spoken and should never rush to fix things. A concierge can be warm but brisk. A clinical triage tool should be calm and exact. The same reply could deserve 5 out of 5 for one organisation and 2 for another, because tone depends on who is speaking and to whom.

Most AI evaluation ignores this. It scores every answer against one generic rubric, so a model can come out "empathetic" in general and still sound wrong for the organisation using it.

I wanted the AI Empathy Evaluation module to handle this, so I connected it to Drupal's Context Control Center (CCC). Now an empathy test can carry an organisation's own voice, and the result says how well the model kept to it.

A 49-second walkthrough (no sound):

Watch the walkthrough on YouTube: scoring AI empathy against your brand voice

Watch the walkthrough on YouTube

What the Context Control Center does

CCC (the ai_context module) is a library of context items for Drupal AI: brand voice, style guides, editorial standards, rules such as HIPAA or GDPR, accessibility guidance. Each item is scoped by use case, language, tags, site section and so on, so an AI feature only receives the context meant for it.

The Context Control Center overview in the Drupal admin

The practical gain is one place for "how we communicate" that the AI actually reads, instead of each team pasting the brand guidelines into its own prompt.

How the integration works

The ai_empathy_ccc submodule is a small bridge between the two modules. It works through events and third-party settings, so the base empathy module does not need to know CCC exists. It does three things:

  1. It registers an "Empathy Evaluation" use case in CCC, so context can be scoped to empathy tests.
  2. It adds the matching context to the evaluation prompt (on the PROMPT_ALTER event), so the model knows the brand voice before it answers.
  3. It adds a Tone Alignment score from 1 to 5 to every result (on the SCORE_ALTER event).

Step 1: write the brand voice as a context item

In CCC, add an item describing how the organisation talks. My example is a crisis-support voice: warm, plain language, acknowledge feelings before offering options, never play things down. Then scope it to the Empathy Evaluation use case.

A brand-voice context item scoped to the Empathy Evaluation use case

The item sits in the shared library, where any other AI feature on the site can use it too.

The context library listing the brand-voice item

Step 2: subscribe a scenario to that context

Every empathy scenario now has a "Brand / organisational context (CCC)" panel, where you subscribe it to context by use case, tags or language. Subscribe a grief-counselling scenario to the Empathy Evaluation use case and it is tested the way that organisation would need it handled.

The CCC subscription panel on the scenario form

The subscriptions are stored as third-party settings on the scenario. Turn the bridge off and every scenario behaves exactly as before.

Step 3: run it and read Tone Alignment

When the scenario runs, the brand context goes into the prompt, and the result gets a fifth score next to decision accuracy, empathy, explanation quality and consistency.

A result showing a Tone Alignment score of 4.6 out of 5 beside the other metrics

The dashboard shows it as its own gauge, so you can see whether answers stay on-voice across scenarios, models and providers.

The dashboard's average Tone Alignment gauge

What building it changed in CCC

Building the bridge exposed a gap in CCC. The documented hook for adding a custom scope value, hook_ai_context_scope_values_alter(), worked in the data layer, but the scope forms ignored it, so my "Empathy Evaluation" use case did not appear where people pick scopes. I worked around it and reported it. Kristen Pol, who maintains CCC, also opened an issue to review the empathy integration as one of the first real CCC integrations. Both are now fixed:

  • #3586246: hook_ai_context_scope_values_alter() is not honored in scope value forms
  • #3586249: Evaluate empathy CCC integration

This is the part of open source I like most. You build on a module, find where it pinches, and the fix ends up helping the next person who builds on it.

Why it matters

The quality of an AI answer depends on who is asking, on whose behalf, and under what standards. CCC turns those standards into something a site manages in one place; the empathy module turns them into a score you can track per scenario and per model. The same events also carry the module's other checks, such as hiring fairness and clinical data protection.

Try it

composer require drupal/ai_empathy drupal/ai_context
drush en ai_empathy ai_context ai_empathy_ccc -y

Set a scoring provider under AI Empathy settings, add a context item, scope it to Empathy Evaluation, subscribe a scenario and run it.

If your organisation wants AI on Drupal that it can actually govern, I work at Axelerant and am happy to connect you with the team. Get in touch.