Jev recipe / sales pipeline
AI Lead Scoring with Jev: Typed Score Schema & Routing
Turn a compact lead record into an ordered priority score, a hot-lead flag, and a CRM segment — with thresholds your team owns in code.
AD
Set up AI lead scoring in six steps
01Keep the lead record small: firmographics (company size, industry), contact role, and intent signals such as the message body and pricing-page visits. Strip PII that never changes priority.
02Design Score criteria as an ordered ICP ladder — 1 (low fit) to 4 (immediate follow-up) — so every tier maps to exactly one sales action.
03Combine questions in a single evaluate call: a priority Score, an is_hot_lead Noul for paging, and a segment Choice for the CRM record.
04Keep thresholds in application code: priority >= 3 with confidence >= 0.85 auto-routes to CRM; everything else lands in the SDR review queue.
05Backtest against closed-won and closed-lost history, then recalibrate tier definitions and thresholds as your ICP shifts.
06Wire the output into your CRM: map priority to lead status, segment to the account field, and sub-threshold confidence to a human follow-up task.
schema / lead scoring decision contract
{
"priority": {
"type": "score",
"instructions": "Score sales priority for this lead",
"criteria": {
"1": "Low fit: wrong segment, no budget signal",
"2": "Possible fit: real problem, needs nurturing",
"3": "Strong fit: matches ICP with active intent",
"4": "Immediate follow-up: high fit and high intent"
}
},
"is_hot_lead": {
"type": "noul",
"instructions": "Should a rep be paged within one business hour?"
},
"segment": {
"type": "choice",
"instructions": "Assign the CRM segment",
"criteria": {
"enterprise": "500+ employees or enterprise domain",
"mid_market": "50-499 employees",
"smb": "Under 50 employees",
"self_serve": "Individual or trial signup"
}
}
} Send a real lead record as state and inspect the priority, hot-lead flag, and segment the model returns.
Interactive demo / lead scoring
Jev AI lead scoring & CRM routing simulator
Pick a sample lead and run it through the Score schema — confidence decides who sees it first:
Calibrated confidence active
priority / is_hot_lead / segment
companyAcme CloudtitleVP Engineering employees800 pricing_page_views_7d6 message“We need SSO and a security review before our Q4 rollout. Can you quote 400 seats?”
Jev decision output
~95ms / $0.00004priority · scoreconfidence
4 / 497.0%
is_hot_lead · noul true
segment · choiceEnterprise
Routing decision (policy in code)
PAGE_REP_NOW
Hot lead: priority 4 with high confidence — notify the owner within one business hour.
Policy in code: priority >= 3 && confidence >= 0.85 → auto-route to CRM (page the rep when is_hot_lead = true) · otherwise → SDR review queue · priority 1 → nurture sequence
Lead scoring benchmark: Jev typed scores vs generative LLM scoring
METRIC
Jev
Generative LLM scoring
Median latency (P50)
~95ms
single forward pass, no generation
1500–3000ms
token-by-token JSON generation
Cost per 1,000 leads
~$0.05
input-only billing, zero output tokens
$0.30–$1.20
input plus generated reasoning tokens
Output determinism
Deterministic
the same lead always lands in the same tier
Stochastic
sampling variance reorders borderline leads between runs
Confidence quality
Calibrated probabilities
thresholds can gate automation directly
Self-reported
uncalibrated without extra logprob plumbing
Format error rate
0%
Score, Noul, and Choice are native outputs
2–8% malformed JSON requiring parse-and-retry loops
Reading free-text intent
Message body and behavior scored in the same forward pass
Possible, but slow and costly at lead volume
Production code: score leads and route them
typescript / jev lead scoring + CRM routing
type LeadState = {
company: string;
employees: number;
title: string;
message: string;
pricing_page_views_7d: number;
};
// Policy lives in application code, not in the prompt
const AUTO_ROUTE_MIN_SCORE = 3;
const AUTO_ROUTE_MIN_CONFIDENCE = 0.85;
export async function scoreLead(lead: LeadState) {
const response = await fetch("https://api.typesafe.ai/v1/jev/evaluate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
state: lead,
questions: {
priority: {
type: "score",
instructions: "Score sales priority",
criteria: {
"1": "Low fit",
"2": "Possible fit",
"3": "Strong fit",
"4": "Immediate follow-up",
},
},
is_hot_lead: {
type: "noul",
instructions: "Page a rep within one business hour?",
},
segment: {
type: "choice",
instructions: "Assign the CRM segment",
criteria: {
enterprise: "500+ employees",
mid_market: "50-499 employees",
smb: "Under 50 employees",
},
},
},
}),
});
if (!response.ok) throw new Error("Jev evaluate failed");
const data = await response.json();
const { priority, is_hot_lead, segment } = data;
const confident = priority.confidence >= AUTO_ROUTE_MIN_CONFIDENCE;
if (priority.answer >= AUTO_ROUTE_MIN_SCORE && confident) {
return {
route: is_hot_lead.answer ? "page_rep_now" : "crm_auto",
priority: priority.answer,
segment: segment.answer,
confidence: priority.confidence,
};
}
// Sub-threshold score or confidence -> SDR review queue
return {
route: "sdr_review",
priority: priority.answer,
segment: segment.answer,
confidence: priority.confidence,
};
}
// Typical path: ~95ms per lead, input tokens only, 0% schema errorspython / jev batch lead scoring
import requests
JEV_ENDPOINT = "https://api.typesafe.ai/v1/jev/evaluate"
AUTO_ROUTE_MIN_SCORE = 3
AUTO_ROUTE_MIN_CONFIDENCE = 0.85
QUESTIONS = {
"priority": {
"type": "score",
"instructions": "Score sales priority",
"criteria": {
"1": "Low fit",
"2": "Possible fit",
"3": "Strong fit",
"4": "Immediate follow-up",
},
},
"is_hot_lead": {
"type": "noul",
"instructions": "Page a rep within one business hour?",
},
}
def score_lead(lead: dict) -> dict:
resp = requests.post(
JEV_ENDPOINT,
json={"state": lead, "questions": QUESTIONS},
timeout=5,
)
resp.raise_for_status()
result = resp.json()
priority = result["priority"]
hot = result["is_hot_lead"]
if (
priority["answer"] >= AUTO_ROUTE_MIN_SCORE
and priority["confidence"] >= AUTO_ROUTE_MIN_CONFIDENCE
):
route = "page_rep_now" if hot["answer"] else "crm_auto"
else:
route = "sdr_review"
return {
"lead_id": lead.get("id"),
"priority": priority["answer"],
"confidence": priority["confidence"],
"route": route,
}
def score_batch(leads: list[dict]) -> list[dict]:
# ~95ms per lead: an overnight sync of 10k leads finishes in ~16 minutes
# and stays well below CRM API rate limits.
return [score_lead(lead) for lead in leads]Operationalize the scoring pipeline
Lead scoring cost calculatorEstimate the cost of scoring 100k leads per month at input-only Jev pricing.Validate scores in PlaygroundRun your own lead state through the schema and inspect priority and confidence.Choose the right output typeSee when Score beats Choice or Noul for ordered sales decisions.