Workflow · Sales
Build an AI Lead Enricher
Take a raw lead list (name + email or company), enrich it with title, company, industry, signals, and personalization hooks — at scale.
Problem
Sales / outreach lists arrive bare — name, email, maybe a company. To send anything personalized you need title, role, company size, recent news, common ground. Doing this manually is hours per 100 leads.
Final output
Run a CSV in, get a CSV out with: title, role function, company industry, headcount, recent news (last 30 days), and a one-sentence personalization hook tied to something specific about the lead or company.
Architecture
Raw CSV (name, email/company)
→ Per row:
Search (lead name + company) — top 5 sources
Search (company news, last 30 days) — top 3 sources
LLM extracts structured: title, function, industry, news, hook
Optional: enrich with API (Apollo, Clearbit)
→ Write enriched CSV / Postgres / CRMStep-by-step
- 01
Parse input + dedupe
Read CSV, normalize emails / company names. Dedupe by domain. Skip invalid rows.
- 02
Search per lead
Tavily / Brave search for '{name} {company}' (top 5 results) + '{company} news last 30 days' (top 3). Cache by query hash.
- 03
Extract with LLM
Send search results to LLM with structured output schema. Require evidence quotes for each field.
- 04
Generate personalization hook
Second LLM pass: given enriched data + recent news, write a 1-sentence hook tied to a specific fact. Reject generic outputs.
- 05
Write enriched output
Append enriched fields to CSV / DB / CRM. Log enrichment confidence + sources for auditing.
Why this works
Generic enrichment APIs give you generic data. The LLM-search hybrid gives you recent and specific data — which is what makes outreach personal.
In 2026, the gap between "decent" and "great" outbound is whether the opening line references something specific from the last 30 days. This pipeline produces that line at $0.06/lead.
Where the value compounds
- Recent context — proprietary databases lag by months on news, role changes, product launches. Search-based enrichment is current.
- Personalization at scale — 1000-lead campaign with 1000 unique opening lines for $60.
- Audit trail — citations let you verify before sending.
Where it falls short
- Firmographics — for accurate headcount, funding, tech stack, dedicated APIs win.
- Email finding — pair with a hunter API.
- Hard-to-find leads — if the lead doesn't have a public footprint, this finds nothing.
Production-grade additions
- Confidence threshold — auto-skip leads below 0.7 confidence; surface for manual review.
- Manual override — UI for sales reps to edit enriched data before send.
- Daily refresh — re-enrich existing leads weekly to catch role changes.
- Webhook integration — pipe enriched data straight into your CRM (HubSpot, Pipedrive, Salesforce).
Reality check
This won't replace a great SDR. It will let one SDR do the work of three. That's the actual ROI — not "AI replaces sales people" but "personalization at scale becomes affordable."
Prompt examples
Copy any of these, replace the placeholders, run.
Enrichment extraction
Extract structured information about this lead from the search results below.
Lead: {{name}} at {{company}}
Search results: {{snippets}}
Output JSON:
{
"title": string | null,
"function": "engineering" | "product" | "marketing" | "sales" | "ops" | "finance" | "exec" | "other",
"company_industry": string | null,
"company_size_estimate": "1-10" | "11-50" | "51-200" | "201-1000" | "1000+" | null,
"recent_news": [{ "headline": string, "date": string, "source_url": string }],
"evidence": { "title_source": "url", "industry_source": "url" },
"confidence": 0-1
}
Rules:
- Cite source URL for every field.
- If a field is unclear, return null. Do NOT guess.
- For recent_news, only include items from the last 30 days, max 3.Personalization hook
You are writing a one-sentence personalization opener for a cold email.
Target: {{name}}, {{title}} at {{company}}
Recent context:
{{enriched_data}}
Rules:
- 1 sentence, max 25 words
- Reference ONE specific recent thing (news, role change, product launch, podcast appearance)
- Avoid: generic compliments, "I came across your work", "your impressive background"
- If no specific hook exists, return null — don't fabricate
Output: { "hook": string | null, "evidence": "url" }Cost estimate
| Line item | Approx. cost |
|---|---|
| Search API (Tavily, ~8 queries/lead) | $0.04 |
| LLM extraction (Sonnet) | $0.015 |
| LLM personalization (Sonnet) | $0.005 |
| Per 100 leads enriched | $6.00 |
| Total per run (approx.) | ~$6.06 |
Costs depend on model choice, content length, and how aggressively you cache.
Optimizations
- Cache search results by domain — many leads share companies.
- Use cheaper model (Haiku / Mini) for extraction; reserve Sonnet for the hook.
- Run leads in parallel — 5–10 concurrent. Watch search API rate limits.
- Dedupe by company first, enrich company once, then enrich leads inside it.
- Combine with Apollo / Clearbit API for fields where they're cheaper / more accurate (firmographics).
Common mistakes
- Skipping evidence citations — quality of enrichment becomes invisible.
- Letting the LLM fabricate when no signal exists — destroys trust.
- Not deduping — same lead enriched 3 times in one batch.
- Generic personalization hooks — worse than no personalization.
- Ignoring rate limits — search API blocks halfway through batch.
Frequently asked questions
Related on AIKnowHub
Workflow
Build an AI Research Assistant
A research agent that takes a question, searches the web, reads sources, and produces a cited briefing.
Concept
Function Calling Explained
Function calling is how LLMs trigger your code. Here's how it actually works under the hood, and how to design tools that the model uses correctly.
Concept
Structured Outputs Explained
Structured outputs make models return valid JSON every time — no more parsing failures, no more 'almost JSON.' Here's how they work and when to use them.
Learning Path
AI Automation Engineer Roadmap
Become the person who turns manual workflows into AI-powered automations. Highly hireable, instantly useful.
Case Study
Case Study: Sales Team Replaces $18k/yr Enrichment with an AI Pipeline
How a 6-person outbound team enriched 2,000 leads/month with search + LLM — matching Apollo quality on hooks, at 1/10th the cost.
Tool Guide
Claude Code Guide
The definitive guide to Anthropic's terminal-native AI coding agent — install, configure, MCP, hooks, skills, sub-agents, plan mode, cost, security, limitations.