What this recipe does
LLMs make up numbers. Pricing quotes can't have made-up numbers. This recipe is the only way we know to ship a free-form pricing assistant without a chance of hallucinated discounts: every price the model emits is reconciled against your price-table.json at compile time, and any candidate that fails the reconcile is dropped from the training set.
The model learns the structure of a quote (line items, tier logic, term math, applicable discounts) but is never asked to invent prices. The verifier confirms every output matches the table to the cent.
The spec
{
"output_kind": "json",
"schema": {
"required": ["line_items", "subtotal", "discount", "total", "term_months", "valid_until"],
"properties": {
"line_items": { "type": "array", "items": {
"required": ["sku", "qty", "unit_price", "line_total"],
"properties": {
"sku": { "type": "string" },
"qty": { "type": "integer" },
"unit_price": { "type": "number" },
"line_total": { "type": "number" }
}
} },
"subtotal": { "type": "number" },
"discount": { "type": "number" },
"total": { "type": "number" },
"term_months": { "enum": [12, 24, 36] },
"valid_until": { "type": "string", "format": "date" }
}
},
"verifier": {
"price_table": "price-table.json",
"reconcile_unit_price": true,
"reconcile_line_math": true,
"reconcile_total_math": true,
"discount_tier_must_match_profile": true
}
}
Gold pairs (1 of 120 shown)
{
"company": "Northwind Logistics",
"seats": 45,
"plan": "team",
"term_months": 24,
"region": "us-east",
"discount_tier": "early-renewal"
}
{
"line_items": [
{"sku": "team-seat-monthly", "qty": 1080, "unit_price": 49.00, "line_total": 52920.00}
],
"subtotal": 52920.00,
"discount": 7938.00,
"total": 44982.00,
"term_months": 24,
"valid_until": "2026-06-09"
}
Compile
kolm compile "draft pricing quote, reconcile to price-table" \ --base qwen2.5-coder-7b \ --pairs pairs.jsonl \ --price-table price-table.json \ --verifier reconcile-strict \ --k-floor 0.90 \ --output pricing-quote.kolm ok wrote pricing-quote.kolm k_score=0.94 signature=hmac-sha256
K-score gate
The 100% reconcile rate is by construction: the verifier rejects any candidate output whose unit prices don't appear in price-table.json verbatim. We do not let the model have a "creative" pass on numbers — only on which SKUs apply to which customer profile.
Run-time profile
Deploy
# salesforce flow — runs in the apex action that builds the quote pdf: String profile = JSON.serialize(opportunityProfile); String quote = KolmRuntime.run('pricing-quote.kolm', profile); PriceTable.reconcile(quote, priceTableJson); // belt-and-suspenders QuotePdf.fromJson(quote);