Work · 2026

One orchestrator, fifteen AI attributes

A modular, event-driven pipeline that turns free-text profiles and reviews into structured, AI-generated attributes, where adding a new one means writing one module.

Work case study · 2 min read · event #000030

  • PHP 8.3
  • Laravel
  • MySQL
  • Laravel queues
  • LLM structured outputs
  • Vue 3

The problem

Tutor profiles relied on free-text bios. We wanted structured, readable content built from what we already knew about each tutor: their reviews, subjects, qualifications and bio. The first AI-derived attributes each had their own processor. That made every new attribute slow to add and expensive to run, because each one made its own model call and had its own idea of when to refresh.

What I built

I replaced the one-off processors with a single orchestrator on top of one versioned attribute store. Each attribute is a module that registers itself through a service provider and declares two things: what inputs it needs, and the schema of what it returns.

When a run starts, the orchestrator does the following:

  • skips any module whose output is already current for the prompt version;
  • builds only the inputs the remaining modules actually need;
  • merges their schemas into a single structured-output request to the model;
  • splits the response back out to the right modules for storage.

There are about 15 modules: featured reviews, review themes, subject and level bios and taglines, leadership roles, examiner and classroom experience, second languages, proven results, recent experience and most relevant qualifications among them.

Two rules keep the output trustworthy. Structured data that tutors enter themselves always wins, and the AI only fills gaps. And prompts are versioned through migrations, so changing a prompt is a reviewed change that marks affected attributes as stale rather than a silent edit.

Regeneration is event-driven. Domain events map onto four inputs (bio, subjects, qualifications and reviews), so when a tutor edits one of those, only the attributes that depend on it are regenerated. That keeps the copy stable between edits and keeps token spend proportionate to what changed.

Around the core there is a daily staleness report, a budget-capped command for backfilling the top tutors first, an admin panel for reviewing generated copy, and queued processing when a profile goes live. It has since been extended across curriculum levels.

What it gave us

One extensible pipeline in place of a pile of processors. A new attribute is one module with a declared schema, and it picks up versioning, staleness reporting and event-driven refresh without further work.

What I’d do next

Add per-module quality evaluation, so that a prompt change can be scored against a fixed set of tutors before it goes out, and surface per-module cost in the staleness report so the expensive attributes are easy to spot.

← Back to work