Classifying Rows
Outcome: a classification column with a closed value set, a rules layer covering most rows for free, and a measured agreement rate against your own labels.
- Surface
- App and MCP server
- Level
- Intermediate
- Uses
- AI classification · formula columns
- Credits
- ~10 for a tested column
- Prerequisite
- Lesson 03
Why classification is the best AI column
It is cheap, it is checkable, and its output is directly usable. Unlike a research call, the model is not finding anything — it is putting something you already have into a bucket. That is the task models are most reliable at.
Everything downstream — filters, scores, gates, routing, reporting — needs categories. Classification is what produces them.
Design the value set first
Three to six values
Fewer than three and you learn nothing. More than six and nobody uses the distinctions, including you.
Mutually exclusive
If a row can be two values, the set is wrong. Add a Both value rather than allowing overlap.
Collectively exhaustive
Plus Unknown for no evidence, and at most one Other — which you review rather than ignore.
Tied to a decision
For every value, name what you would do differently. A category that changes nothing is not worth the column.
Good: SMB, Mid-market, Enterprise, Mixed, Unknown — five values, exclusive, and each routes differently.
Bad: Small, Medium, Large, Growing, Enterprise-ready, Startup — overlapping, undefined boundaries, and “Growing” is a different axis entirely.
Rules before AI
For most classification tasks, a keyword formula handles 70–90% of rows for free.
function =
contains_any(title, ["CTO","VP Eng","Head of Engineering","Engineering Manager"]) ? "engineering"
: contains_any(title, ["CRO","VP Sales","Head of Sales","Account Executive"]) ? "sales"
: contains_any(title, ["CMO","VP Marketing","Head of Growth","Demand Gen"]) ? "marketing"
: contains_any(title, ["CFO","Controller","Head of Finance"]) ? "finance"
: "unclassified"Then run the AI column only on unclassified, constrained to the same value set.
Two benefits beyond the cost saving: the rules are debuggable — you can see exactly why a row got its value — and they are deterministic, so the same input always classifies the same way.
Use the model to write the rules, then run the rules as a formula. Ask it for 30 title keywords per function based on your own data, review them, and paste them into the formula. Model-quality logic, formula-level cost.
Few-shot for the edge cases
When the AI layer gets specific cases wrong, do not rewrite the whole prompt. Add examples.
Classify the company's primary buyer segment.
Answer with exactly one of: SMB, Mid-market, Enterprise, Mixed, Unknown.
Examples:
- "Trusted by Fortune 500 teams" → Enterprise
- "Perfect for small teams, starting at $12/user" → SMB
- "From startups to global enterprises" → Mixed
- Pricing page with "Contact sales" only → Enterprise
- No pricing or customer information available → Unknown
Return the value only.Three to five examples covering your actual failure cases fixes more than any amount of instruction rewriting. Take the examples from rows you got wrong.
Measuring agreement
Label 30 rows yourself
Before looking at the model’s output. Order matters — seeing the answer first biases your label.
Run the classifier
Compare row by row.
Compute agreement
Above 90% is usable. 80–90% needs a few-shot fix. Below 80% means the value set is ambiguous, not that the model is bad.
Read the disagreements
If you find yourself unsure which label is right, the boundary between two values is not defined well enough. Fix the definitions.
Do this now
- Write the value set. Three to six, exclusive, each tied to a different action.
- Build the rules layer with keyword matching. Measure what percentage it covers.
- Build the AI layer for the remainder, constrained to the same values.
- Label 30 rows by hand before looking at output.
- Compute agreement, and read every disagreement.
- Add three to five few-shot examples drawn from the disagreements. Re-run.
- Add a distinct-value monitor so drift is visible on every future run.
Check your work
- The value set is written, closed, and each value implies a different action
- The rules layer covers most rows for free
- Agreement measured against labels you made first
- Few-shot examples come from real failures
- Distinct value count is monitored per run
Where this breaks
An ambiguous value set produces bad agreement that looks like a model problem and is not. If you and a colleague label the same 30 rows differently, no prompt will fix it — the boundaries are undefined, and the classifier is being asked to make a judgement your team has not made. Write down what separates each pair of adjacent values before touching the prompt again.
Further automation
Classification is what makes routing possible: segment decides which sequence, function decides which message, size band decides which rep. Once the column is trustworthy, the routing rules become free formula columns on top of it — and that is most of what Automated Inbound does.
Next lesson
12 — Scoring and gating, turning classifications into the number that controls your spend.
Reference for this lesson: AI agents, Actions, Tables, GTM Engineering — scoring and gating.