Objective
An SDR spends ~70% of pre-call time on research: who is this account, what did we already talk about, what similar customers have we won? In this recipe an account-research agent reads the CRM row, retrieves similar-shape wins from your historical close patterns, and outputs a structured briefing — in one SQL call.
Step 1: CRM accounts + activity + close patterns
CREATE TABLE IF NOT EXISTS recipe_sl_accounts (
account_id INTEGER PRIMARY KEY,
name TEXT,
industry TEXT,
arr_band TEXT, -- '<1M' | '1-10M' | '10-100M' | '100M+'
owner_email TEXT,
notes TEXT
);
CREATE TABLE IF NOT EXISTS recipe_sl_activity (
activity_id INTEGER PRIMARY KEY,
account_id INTEGER,
kind TEXT, -- 'call' | 'email' | 'demo' | 'reply'
summary TEXT,
happened_at TIMESTAMP
);
CREATE TABLE IF NOT EXISTS recipe_sl_wins (
win_id INTEGER PRIMARY KEY,
customer TEXT,
industry TEXT,
acv_usd DOUBLE,
use_case TEXT,
embedding VECTOR(384)
);
Step 2: Seed
INSERT INTO recipe_sl_accounts VALUES
(101,'Northwind Logistics','Logistics','10-100M','jane@yourco.com','Mid-sized 3PL, scaling pain on returns processing'),
(102,'BlueRiver Health', 'Hospital','100M+','sam@yourco.com','Multi-hospital system, RAG-over-policies pain'),
(103,'PixelForge Studios', 'Software','1-10M','jane@yourco.com','30-engineer dev shop, ML team forming');
INSERT INTO recipe_sl_activity VALUES
(1,101,'call', 'CIO: returns auto-triage is the #1 pain. Currently 30min/RMA, 200 RMAs/day.','2026-05-19 10:00:00'),
(2,101,'email','Sent ROI calc spreadsheet. No reply yet.','2026-05-22 14:00:00'),
(3,101,'reply','CIO: numbers look right, what about pilot scope?','2026-05-26 09:15:00'),
(4,102,'demo', 'VP Innovation watched RAG-over-policies demo. Pushback on PHI boundary.','2026-05-21 11:00:00'),
(5,103,'call', 'Founder/CTO: needs in-DB AI, currently glued together Pinecone + LangChain.','2026-05-15 16:00:00');
INSERT INTO recipe_sl_wins (win_id, customer, industry, acv_usd, use_case) VALUES
(1,'Acme 3PL','Logistics', 90000,'Replaced manual returns triage with a SQL agent — 30 min/RMA → 5 min, 200 RMAs/day. Pilot to closed in 5 weeks.'),
(2,'Helios Hospital','Hospital',180000,'In-DB clinical Q&A over policies + EHR — never crossed PHI boundary. Champion: CIO. Procurement took 6 weeks.'),
(3,'Riverbed Devops','Software',62000,'Incident triage agent — replaced a LangChain + Pinecone stack. Champion: VP Eng. Pilot in 2 weeks, closed in 4.'),
(4,'Civic Insurance','Insurance',220000,'Claims triage agent — same shape as Acme 3PL, larger volume. Champion: VP Innovation. Took 10 weeks (board approval).');