Lead pipeline with AI classification
Context
Every lead coming through the site needed manual triage: reading the form, assessing fit, deciding the answer and writing the email. That routine took hours of the founder's time, and hot leads cool off fast. We automated our own inbound sales with the same method we sell.
What the pipeline does
From form to ready reply, in three steps:
- A 4-step form with per-step validation: the lead describes problem, budget and timeline without friction.
- Automatic classification: the AI detects the language, computes a 0-10 fit score with a breakdown across 5 criteria, and flags green, yellow and red signals with reasoning.
- Ready reply: a draft in the lead's language plus a discovery letter, prepared for the founder's review within minutes.
Nothing is sent automatically: the AI classifies and drafts, the founder reviews and sends.
Fit criteria
How the AI evaluates each lead:
- Budget within the track ranges and a concrete, clearly articulated pain.
- Realistic timeline and direct access to the decision maker.
- Clarity about the expected success outcome.
Criteria are adjustable via prompt, no redeploy. And an empty field never penalizes: little information becomes an invitation to a call, not a rejection.
Architecture
Classification in action

Technical decisions
Why doesn't the AI send anything on its own?
The cost of a wrong reply to a hot lead is higher than the cost of reviewing. The AI delivers a ready draft in the lead's language; the founder decides and sends. Reviewing takes minutes. Recovering a badly answered lead is sometimes impossible.
How does the pipeline defend against prompt injection?
Layered defense. All form content reaches the classifier isolated inside external-data tags and is treated as data, never as instructions. On the way out, the model's response passes through a Zod schema before touching the database.
Why fire-and-forget?
The lead gets instant confirmation: classification and integrations run after the HTTP response. An AI, spreadsheet or webhook failure never takes the form down. The worst case degrades to the manual flow, never to a lost lead.
Results so far
- Classified, drafted replies in minutes: manual triage that took hours became a review.
- Zero leads without triage: every form gets a score, signals and a recommendation.
- Serves Portuguese, English and Spanish with the same pipeline: the draft comes out in the lead's language.
Stack
How we executed
The same method we sell as Track 1: locked scope, incremental delivery, automation in production from week one. The difference is that the client was us, and the pipeline runs on our site every day.
“I open my email and the lead has already arrived classified, with a reply ready in their language. I just review and send.”