Use cases

How to qualify inbound leads with an LLM

Most qualification prompts are the RevOps checklist written out in prose. They read well and route badly, because nobody ever tested the checklist against the leads your SDRs actually accepted.

The pain points

How to do it

  1. Build the dataset from dispositions, as of routing time. Store the enrichment snapshot with the lead when it arrives, and train on that snapshot. In production, fetch it live. The model should only ever see what it will see when it is actually routing.
  2. Drop anything written after the decision. Note length, call counts, stage changes, owner. They predict the label very well because the person who assigned the label wrote them.
  3. Pick a metric that prices the mistakes the way you do. Rejecting on fit is usually the biggest class, so plain accuracy rewards a prompt that rejects nearly everyone. Missing a real buyer costs far more than an SDR spending five minutes on a lead that isn't buying. Score balanced accuracy (the mean of per-class recall), or weight each class by what a miss costs you.
  4. Hold rows out and read the per-class table. An aggregate that improved because the prompt now rejects more leads is not an improvement. The hold-out is the number; the per-class table says what moved it.
  5. Let an optimizer rewrite the rules, and read the diff. If your prompt applies its rules in order and the first match wins, a rewrite that appends advice underneath cannot override the rule that is misfiring. The useful change edits that rule: raise the headcount floor, name the industries that are out, count the whole revenue stack instead of the CRM alone.
  6. Measure your label noise first. Have two people label the same sample and compute agreement. No prompt beats the rate at which your own team agrees with itself, so that rate is your ceiling.

Pitfalls worth checking first

PitfallWhat it looks likeHow to check, before spending anything
LeakageOne column predicts the label far better than anything elseWas it written before the decision? If not, drop it.
Live re-fetchThe prompt scores better on refreshed enrichment than on the snapshotScore both versions of the same rows. The gap is how much the refresh knows about the outcome.
Selection biasLabelled rows skew toward demo requests and senior titlesKeep a small random slice of unrouted leads labelled, and weight rows by how likely they were to be labelled.
Redundant columnsCompany and email domain always agreeCheck whether one column determines another. Keep one.
The wrong metricAccuracy rises while recall of real buyers fallsPut balanced accuracy or a cost-weighted score in the objective, and read the per-class table.

References

Tools that run this loop: DSPy and its GEPA optimizer, bpto (ours, open source), and Impromptune, the studio built on it.