Batch LLM calls per account; add 5 pilot accounts

- Relevance filter: evaluate all of an account's signals in one LLM call
  (keyed array, chunked at 8) instead of one call per signal.
- Synthesizer: produce all of an account's briefs in one call (one object
  per capability) instead of one call per capability. ~2 calls/account.
- llm: wrap JSONDecodeError in LLMError so callers fall back to mock instead
  of crashing; disable Gemini thinking (thinkingBudget=0) to stop thinking
  tokens truncating JSON; add 429 backoff.
- accounts: add Booz Allen, Dominion Energy, Hope Gas, Markel, GW Medical
  Faculty Associates (verified domains; CRM tier captured in crmTier).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-23 18:16:08 -04:00
parent 39a338990f
commit b4e3ed9d9b
4 changed files with 270 additions and 113 deletions

View File

@@ -1,5 +1,5 @@
{
"_note": "Pilot target list (7 accounts; ~200 total to come). REAL fields: accountName, domain, industry. PLACEHOLDER fields to confirm from CRM/install-base: accountTier, assignedRep, currentProducts (drives anti-signal suppression — empty here means nothing is suppressed yet), targetContacts (empty; the LLM/signal authors identify the ideal contact, CRM enrichment fills the rest).",
"_note": "Pilot target list (~200 total to come). REAL fields: accountName, domain, industry, crmTier (verbatim CRM tier where known). crmTier->accountTier mapping used by the 3-band scorer: Tier 1->strategic, Tier 2->enterprise, Tier 3->growth, Tier 4->growth (NOTE: Tier 3 & 4 currently collapse to the same scoring weight — extend scorer to 4 bands to distinguish). PLACEHOLDER fields to confirm from CRM/install-base: assignedRep, currentProducts (drives anti-signal suppression — empty means nothing suppressed yet), targetContacts (empty; LLM/signal authors identify the ideal contact, CRM enrichment fills the rest).",
"accounts": [
{
"accountId": "acct_lowes",
@@ -77,6 +77,66 @@
"currentProducts": [],
"targetContacts": [],
"lastRunAt": null
},
{
"accountId": "acct_booz_allen",
"accountName": "Booz Allen Hamilton",
"domain": "boozallen.com",
"industry": "Consulting & Government Services",
"crmTier": "Tier 3",
"accountTier": "growth",
"assignedRep": { "id": "rep_priya", "name": "Priya R.", "email": "priya.r@yourco.com" },
"currentProducts": [],
"targetContacts": [],
"lastRunAt": null
},
{
"accountId": "acct_dominion",
"accountName": "Dominion Energy",
"domain": "dominionenergy.com",
"industry": "Energy & Utilities",
"crmTier": "Tier 1",
"accountTier": "strategic",
"assignedRep": { "id": "rep_priya", "name": "Priya R.", "email": "priya.r@yourco.com" },
"currentProducts": [],
"targetContacts": [],
"lastRunAt": null
},
{
"accountId": "acct_hope_gas",
"accountName": "Hope Gas Holdings",
"domain": "hopegas.com",
"industry": "Energy & Utilities (Natural Gas)",
"crmTier": "Tier 3",
"accountTier": "growth",
"assignedRep": { "id": "rep_priya", "name": "Priya R.", "email": "priya.r@yourco.com" },
"currentProducts": [],
"targetContacts": [],
"lastRunAt": null
},
{
"accountId": "acct_markel",
"accountName": "Markel",
"domain": "markel.com",
"industry": "Insurance",
"crmTier": "Tier 3",
"accountTier": "growth",
"assignedRep": { "id": "rep_marcus", "name": "Marcus L.", "email": "marcus.l@yourco.com" },
"currentProducts": [],
"targetContacts": [],
"lastRunAt": null
},
{
"accountId": "acct_gw_mfa",
"accountName": "GW Medical Faculty Associates",
"domain": "gwdocs.com",
"industry": "Healthcare",
"crmTier": "Tier 4",
"accountTier": "growth",
"assignedRep": { "id": "rep_marcus", "name": "Marcus L.", "email": "marcus.l@yourco.com" },
"currentProducts": [],
"targetContacts": [],
"lastRunAt": null
}
]
}