Recipe catalog / buying-intent
Grade buying intent
buying-intent is a Jev recipe from the jev-recipes TypeScript package. How strong is the purchase intent expressed in message, on a five-level rubric? Use it when you need to rank or route inbound leads and replies by how close the sender is to buying, not just whether they are interested.
Last updated .
Explore this recipe interactively · Source and implementation guide · Markdown version
How do I use buying-intent in TypeScript?
Install with npm install jev-recipes. Requires Node.js 22.9 or newer and ES modules. Set TYPESAFE_API_KEY in your server environment for live calls, which send input to TypeSafe and use API quota. See the installation guide.
import { buyingIntent } from 'jev-recipes/buying-intent';
const result = await buyingIntent({
"message": "We've narrowed it down to you and one other vendor. Can you confirm whether the Team plan includes SSO, and what the annual price would be for 40 seats?",
"context": "Reply from a prospect who attended a product demo last week.",
"minConfidence": 0.8
});
console.log(result);
What input does buying-intent take?
| Field | Type | Needed |
|---|---|---|
| message | string | Required |
| context | string | Optional |
| minConfidence | number | Optional |
Full input and result schemas
{
"input": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"message": {
"type": "string"
},
"context": {
"type": "string"
},
"minConfidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"message"
]
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"model": {
"type": "string"
},
"usage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"output_tokens": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"input_tokens",
"output_tokens"
],
"additionalProperties": false
},
"status": {
"type": "string",
"enum": [
"ready",
"review"
]
},
"score": {
"type": "number",
"minimum": 0
},
"level": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
},
"probabilities": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"intent": {
"type": "string",
"enum": [
"none",
"curious",
"evaluating",
"ready",
"committed"
]
}
},
"required": [
"model",
"usage",
"status",
"score",
"level",
"confidence",
"probabilities",
"intent"
],
"additionalProperties": false
}
}What does a buying-intent result look like?
This hand-authored response demonstrates the contract. It is not a model accuracy measurement. Run it without an API key: npx jev-recipes demo buying-intent.
{
"model": "demo-fixture",
"usage": {
"input_tokens": 0,
"output_tokens": 0
},
"status": "ready",
"score": 2.06,
"level": 2,
"confidence": 0.84,
"probabilities": {
"0": 0.01,
"1": 0.04,
"2": 0.84,
"3": 0.1,
"4": 0.01
},
"intent": "evaluating"
}
Input
See shared options and behavior for client configuration, validation, and errors. Types are inferred from this folder's Zod 4 schemas. context is optional and is omitted from the request when absent.
Result
intent is one of none, curious, evaluating, ready, or committed, taken from the most likely rubric level. level is that level's index from 0 to 4. score is Jev's expected value across the rubric and can fall between levels; use it for ranking leads where a single label loses information.
A result is ready when confidence meets minConfidence. Otherwise it is review and still carries the graded values for inspection. probabilities is keyed by level index.
Reuse and calls
Uses the shared score helper. This folder owns the intent question, the rubric wording, and the review policy. A live invocation makes one logical Jev request.
Limits
The rubric grades what the message expresses about buying. It does not estimate budget, decision authority, or the likelihood that a deal closes, and a polite or enthusiastic message with no purchase signal still lands at none or curious. Explicit disinterest and silence on the topic both score at the lowest level. Routing and follow-up cutoffs belong in application code.
Example input
demo.json contains editable input and a hand-authored response. After installing jev-recipes, npx jev-recipes demo buying-intent shows an offline illustration, not an accuracy measurement. Use npx jev-recipes describe buying-intent to inspect the input and result schemas.
How accurate is buying-intent?
jev-1.13.0 / 2026-10-04 / 75 development cases
Scoring revision 2.
74 ready decisions, with 100% accuracy among those decisions.
95% case-level interval: 95% to 100%. Related synthetic cases are correlated.
This measures the recorded dataset, not general readiness. Label sources: author-synthetic: AI-authored synthetic boundary cases for jev-recipes; labels have not had independent human review.
Use the evaluation guide to measure this decision on your own labeled cases.
What are the limits of buying-intent?
- Grades expressed intent only. It does not estimate budget, authority, or whether the deal will close.
- The score is an expected value over rubric levels. Application code chooses routing cutoffs.
Which recipes are related to buying-intent?
- turn-intent: Use turn-intent to classify the communicative purpose of a message outside a sales context.
- commitment-strength: Use commitment-strength to grade how firmly a message commits to a stated action.