All Use Cases

Lead Qualification

Evaluate a compiled decision model for repeated inbound-lead routing.

The Challenge

When a lead fills out your contact form, the routing clock starts. Faster follow-up can matter, but not every lead deserves the same response—your sales team has limited capacity.

The triage problem: which leads need immediate outreach, which can wait for a nurture sequence, and which aren't worth pursuing?

Manual qualification consumes attention. A sales rep may need to scan the submission, check the company, and decide priority before outreach can begin.

Rules-based scoring is brittle. "Enterprise" in the company name gets 10 points. "Gmail" email gets -5 points. These rules miss the signal in what the lead actually says — their message content, urgency, and intent.

A live model may be more infrastructure than the decision needs. If the task is a repeated choice among stable buckets, compare the current model's quality, latency, and token use with a compiled candidate.

How Sparkient Solves It

A compiled lead-qualification candidate targets an under-100ms compiled stage by combining structured signals (company size, role, source) with text analysis (message content, urgency language, buying intent). Lead qualification is not one of Sparkient's published validation domains, so its quality and latency must be established on representative held-out leads.

The Three Buckets

  • hot — High buying intent, decision-maker role, strong company fit. Route to sales immediately. Trigger a notification, auto-schedule a call, or push to the top of the queue.
  • warm — Moderate interest, potential fit, but not ready to buy today. Add to a nurture sequence with personalised follow-up within 24 hours.
  • cold — Low fit, info-seeking, or unqualified. Add to a general newsletter or marketing automation. Don't waste sales time.

Multi-Signal Scoring

The compiled model evaluates:

  • Company signals — Employee count, industry, domain (enterprise vs. startup vs. personal email)
  • Role signals — Job title, seniority level, department
  • Behavioural signals — Pages visited, content downloaded, form source
  • Message content — Buying language, timeline mentions, budget references, competitive comparisons
  • Timing signals — Business hours submission, urgency language

CEL rules handle the obvious cases:

cel
// Personal email addresses are cold by default
ctx.email.contains("@gmail.com") || ctx.email.contains("@yahoo.com") ? "cold" : null

// Enterprise companies with decision-maker titles are always hot
ctx.employee_count > 1000 && ctx.role.contains("VP") ? "hot" : null

// Explicit budget mention is a strong buy signal
ctx.message.contains("budget") && ctx.message.contains("approved") ? "hot" : null

The compiled classifier handles everything in between — the leads where qualification depends on reading between the lines.

Code Example

python
import httpx

response = httpx.post(
    "https://api.sparkient.ai/api/v1/decide",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "decision_type": "lead-qualification",
        "input": {
            "name": "Sarah Chen",
            "email": "s.chen@acmecorp.com",
            "company": "AcmeCorp",
            "employee_count": 2500,
            "role": "Director of Engineering",
            "message": "We're evaluating decision automation tools for our content moderation pipeline. We need something that runs under 100ms and handles 200K decisions per day. Currently using GPT-4o but the costs are unsustainable. Would love to discuss pricing for the Scale tier.",
            "source": "pricing_page",
            "pages_visited": 7
        }
    }
)

result = response.json()
# {
#     "decision": "hot",
#     "confidence": 0.96,
#     "latency_ms": 36,
#     "stage": "classifier"
# }

CRM Integration

python
async def on_lead_submitted(lead):
    qualification = await sparkient_decide("lead-qualification", {
        "name": lead.name,
        "email": lead.email,
        "company": lead.company_name,
        "employee_count": lead.company_size,
        "role": lead.job_title,
        "message": lead.message,
        "source": lead.utm_source,
        "pages_visited": lead.pageview_count
    })

    lead.score = qualification["decision"]
    lead.score_confidence = qualification["confidence"]

    if qualification["decision"] == "hot":
        await notify_sales_team(lead, channel="slack", priority="high")
        await schedule_followup(lead, delay_minutes=0)
    elif qualification["decision"] == "warm":
        await add_to_nurture_sequence(lead, sequence="product-interest")
        await schedule_followup(lead, delay_hours=24)
    else:
        await add_to_newsletter(lead)

    await lead.save()

If the candidate passes your evaluation, the qualification can run inline and trigger the appropriate CRM workflow.

Evaluation Criteria

Lead qualification is an application example, not one of Sparkient's four published benchmark domains. Before routing automatically, compare the candidate with the current process on the same held-out leads:

  • Per-bucket precision and recall, especially false hot and false cold decisions
  • End-to-end p50, p95, and p99 latency from the form handler
  • Sales acceptance, conversion, and override rates after a shadow period
  • Plan-credit usage, retraining effort, and handling of changing qualification criteria

Get Started

Define your qualification criteria and lead schema, then train a compiled scoring model. Start with the free tier — 5,000 one-time credits, no credit card required.

Import this template

Start with a small evaluation. Import a decision type, customise it, and test it on representative cases.

Import Template