Matrix Agent
The backend agent that turns unstructured text into an objective, weighted 0–100 score. It powers every "evaluate this against my rules" screen in TotalApp.
What Is the Matrix Agent?
The Matrix Agent is one of TotalApp's Core Agents. Its single responsibility is turning unstructured or semi-structured text — a vendor's company profile, a sales lead's notes, a compliance policy document, a CV — into an objective, repeatable score between 0 and 100, plus a written summary explaining why.
It exists to remove human bias and inconsistency from repetitive evaluation work. Instead of two different reviewers scoring the same vendor differently on different days, every item is run through the same deterministic rule set and the same AI evaluation prompt, so the result is reproducible and auditable.
In one sentence
Give the Matrix Agent a chunk of text and a rule set (must-haves, weighted categories, a pass/fail threshold) — it returns a pass/fail gate result, a weighted score, and a category-by-category breakdown with reasoning.
How It Works — the Linter/Critic Pipeline
Every Matrix Agent analysis runs the same three-phase pipeline, regardless of which screen triggered it:
| Phase | What happens |
|---|---|
| 1. Linter — Gatekeeper | Every item on the Must-Have list is checked against the content. If even one required item is missing, passed_gate is set to false and the final score is forced to 0 — the remaining two phases never run. This models a real hiring/vendor/compliance gate: no amount of extra strengths compensates for a missing hard requirement. |
| 2. Critic — Category Scoring | Only runs if the gate passed. Each configured scoring category (e.g. "Price Advantage", "Delivery Speed") is independently scored from 0–100 based strictly on evidence found in the text. No evidence for a category always means a score of 0 for it — the agent is instructed never to assume or infer. |
| 3. Weighted Calculation | Each category's raw score is multiplied by its configured weight (the weights are set per screen and sum to 100%), then summed into a single total_score between 0 and 100. |
Why "Linter/Critic"?
The naming mirrors how a code linter and a code reviewer split responsibilities: the Linter phase is a strict, binary pass/fail check on hard requirements (like a linter rejecting code that doesn't compile), while the Critic phase makes qualitative, weighted judgment calls on everything that passed the gate (like a reviewer scoring code style and design). Splitting the two prevents a strong "Nice-to-Have" from masking a missing "Must-Have".
Input — What Every Screen Configures
Regardless of the domain (vendors, leads, compliance items, or CVs), every Matrix Agent call is configured with the same four pieces of information:
Raw Content
The freeform text to evaluate — a vendor profile, a lead's notes, a policy document, a CV. This is the only field the agent reads as "evidence".
Must-Have Rules
A list of hard requirements. Missing even one forces the total score to 0, regardless of how well everything else scores.
Scoring Weights
A named set of categories, each with a percentage weight, summing to 100%. Every screen defines its own categories — e.g. Vendor Matrix uses "Price Advantage / Delivery Speed / Quality Certificates", Sales Intelligence uses "Budget Fit / Tech Stack / Decision-Maker Access".
Pass Threshold
The minimum total score considered a pass for that screen (e.g. 70 for vendors, 65 for leads, 75 for compliance). Used purely for the UI's colour-coding — pass/borderline/fail — not by the agent's own gate logic.
Output — What You Get Back
Every analysis returns the same result shape, so every screen can render it with the same UI components:
| Field | Meaning |
|---|---|
passed_gate | Boolean — did the item satisfy every Must-Have rule? |
total_score | 0–100 weighted score. Forced to 0 if passed_gate is false. |
summary | A short written executive summary explaining the overall result. |
missing_must_haves | Which specific Must-Have items were not satisfied (empty if the gate passed). |
breakdown | One entry per scoring category: its raw score, its weighted contribution, and a short reasoning note explaining the score. |
Deliberately strict, not generous
The agent is explicitly instructed to never invent evidence or give the benefit of the doubt. If a requirement isn't clearly stated in the content, it is scored as absent. This is a deliberate design choice — the Matrix Agent is meant to catch gaps, not paper over them.
Where the Matrix Agent Is Used
The Matrix Agent is domain-agnostic — the same pipeline and the same shared workstation UI (MatrixWorkstation) power every screen below. Only the rules (weights, must-haves, threshold) and the data shape differ per screen.
| Screen | Module | What gets scored | Example scoring weights |
|---|---|---|---|
| Vendor Matrix (Purchase) | vendor |
Supplier profiles and notes | Price Advantage 40%, Delivery Speed 30%, Quality Certificates 30% |
| Sales Intelligence (Sales) | lead |
Sales lead notes and company info | Budget/Revenue Fit 40%, Technology Stack 30%, Decision-Maker Access 30% |
| Compliance Radar (Security) | compliance |
Policy and control documentation | Data Security 50%, Access Controls 30%, Logging Infrastructure 20% |
| CV Screening (HR) | screening |
Candidate resume text | Skills Match, Experience Level, Education (own dedicated logic) |
Vendor Matrix (Purchase)
Scores supplier profiles and notes against configurable procurement rules. Default weights: Price Advantage 40%, Delivery Speed 30%, Quality Certificates 30%. Default Must-Haves: ISO certificate, reference list. See Purchase.
Sales Intelligence (Sales)
Scores sales lead notes and company information to qualify or disqualify leads. Default weights: Budget/Revenue Fit 40%, Technology Stack 30%, Decision-Maker Access 30%. Default Must-Have: decision-maker contact information. See Sales Intelligence.
Compliance Radar (Security)
Scores policy and control documentation against regulatory/security requirements. Default weights: Data Security 50%, Access Controls 30%, Logging Infrastructure 20%. Default Must-Haves: encryption policy, access control documentation. See Compliance Radar.
CV Screening (HR)
Scores candidate resumes against configurable HR criteria. Default weights: Skills Match 40%, Experience Level 30%, Education 30%. Default Must-Haves: relevant work experience, educational qualifications. See CV Screening.
Where Matrix Scores Surface Elsewhere
Beyond their own screens, Matrix Agent results (vendor scores, lead scores, compliance scores) also appear as summary widgets on the Analytics dashboards, alongside other CRM/sales metrics — giving a single glance at which vendors, leads, and compliance items are trending above or below their pass threshold.