Skip to content
← back to writing
6 min read

An outreach engine that won't claim more than it knows

How the Conversion Engine researches a company from public data, grades its own evidence, and writes emails whose confidence matches that evidence, plus the review queue, sending limits, and deterministic evals that keep it honest.

#llm#ai-agents#python#fastapi#evals

The worst AI sales email isn’t the generic one. It’s the confident one that’s wrong. “Congrats on the Series B!” to a company that never raised one. “Saw you’re scaling the data team” based on a single stale job post. The recipient knows instantly that nobody did any research, and now you’ve burned the contact.

Most outbound tools personalise with mail-merge fields. The Conversion Engine personalises with evidence, and it keeps track of how strong that evidence is. That second part is the whole project.

From a challenge brief to a product#

The first version was a one-week 10 Academy brief: prospect research and outreach for one specific consulting company, benchmarked on τ²-Bench retail. It worked for that company. Everything about who was selling, how they sounded, and who they sold to was baked in.

The rewrite moves all of that into a playbook: a directory with a playbook.yaml, a style guide, and knowledge files. The engine is the same for everyone. The repo ships two fictional playbooks, an engineering-services firm and a recruitment firm, and everything else in playbooks/ is gitignored so real sales material stays out of the repo.

Pipeline

1
Enrich
Signal brief + confidence
↓
2
Classify
Playbook segments or abstain
↓
3
Draft
SCAP + tone check
↓
4
Review
A person approves
↓
5
Deliver
Email, booking, CRM

Every signal carries a confidence level#

Enrichment builds a HiringSignalBrief from public data: Crunchbase firmographics, layoffs.fyi, public job posts and careers pages, leadership changes, and an AI-maturity score from 0 to 3. Every signal in the brief has a confidence level and its sources, so each later stage knows how much weight that signal can bear, and anyone reading a draft’s trace can see where a claim came from.

That confidence is what the rest of the pipeline runs on.

A classifier that’s allowed to say “I don’t know”#

The brief is scored against the playbook’s segments. A segment is a pitch for a type of company, with weighted criteria:

segments:                    # priority order: first wins a tie
  - id: recently_funded
    label: Recently funded startup
    pitch: Frame around shipping faster than hiring alone allows.
    criteria:
      - when: {funding_rounds: [series a, series b]}
        weight: 3
      - when: {employees: {min: 15, max: 80}}
        weight: 1
    exclude:
      - layoffs: true

A segment is out if any exclude matches or any required criterion fails. Otherwise the highest score wins. And if nothing scores, or the signals behind the score are low-confidence, the classifier abstains. An abstained prospect gets a general exploratory email instead of a targeted pitch the evidence can’t support.

That abstain path is where the evals found the biggest problem. Before the eval suite existed, classification was right on 22 of 30 cases. Two rule changes took it to 30 of 30: segments now require their core signal, and low-confidence evidence can rule a segment out but never qualify it.

SCAP: wording that follows the evidence#

Even with the right segment, the model writing the email will happily state a medium-confidence guess as fact. Telling it “be careful with uncertain information” in the prompt doesn’t reliably work. So the brief is rewritten before the model ever sees it.

SCAP stands for Signal-Confidence-Aware Phrasing. It’s a pure function: brief in, transformed brief out, no LLM calls, no I/O. It applies three rules:

Signal confidenceWhat the drafter seesHow it reads in the email
HighThe signal, as isStated plainly
MediumThe signal, flagged SOFT-ASSERTHedged: “looking at the public signal, it seems…”
LowNothing. An ASK directive replaces itTurned into a question, or left out

Low-confidence competitor-gap entries get filtered out too. If none survive, the “lead with the gap” instruction is removed entirely, and the drafter falls back to segment language.

Brief passed straight to the model
  1. Low-confidence funding round stated as fact
  2. Model decides on its own what to hedge
  3. Weak competitor gap becomes the opening line
  4. No record of what the model was told
Brief passed through SCAP
  1. Low-confidence round removed, asked as a question
  2. Medium signals arrive pre-flagged for hedging
  3. Weak gaps filtered before drafting
  4. Every transform recorded in the draft's trace

Each of the three rules has its own flag, so its contribution can be measured on its own. After drafting, a second LLM call scores the email’s tone against the playbook’s style guide and triggers one regeneration if it drifts.

Safe by default, and hard to make unsafe#

Software that sends email on your behalf can do real damage: to the people it contacts, to your domain’s reputation, and legally. So the defaults assume you haven’t checked anything yet.

  • Nothing is delivered until LIVE_OUTBOUND_ENABLED is turned on. Until then, everything goes to a log sink.
  • Every draft waits in a review queue at /review, where a person approves, edits, or rejects it. Drafts the engine itself is unsure about, like an unconfirmed leadership change, are marked “Needs attention”.
  • SMS only goes to warm leads. Cold SMS is blocked in code, not by a setting.
  • Follow-ups stop on any reply or opt-out, and timing counts from when an email was actually sent, so time spent in the review queue never shortens the gap.
default emails per UTC day
50
first-week cap on a new domain, doubling weekly
10/day
7-day bounce rate that auto-pauses sending
5%
complaint rate that pauses (the Gmail/Yahoo line)
0.3%

Once an address is on the suppression list, it’s never contacted again. Both senders check it before every send, even in sink mode. Every email carries a signed unsubscribe link and List-Unsubscribe headers. One small detail I like: the unsubscribe page shows a confirm button instead of unsubscribing on load, because mail scanners open links automatically, and a scanner shouldn’t be able to unsubscribe someone.

Evals with no LLM judge#

The usual way to evaluate generated emails is to have another model grade them. I didn’t want the honesty of the drafter to depend on the honesty of a grader. So the eval suite is deterministic.

It runs 30 fictional companies, each with a known signal brief and the segment the classifier should pick. Every case is drafted twice: as a cold email, and as a follow-up to a fixed first email. Then checks computed from the case’s own brief score each draft:

  • Grounding. Every number and amount traces back to the brief, including numbers written as words, like “fifteen roles”. Withheld low-confidence signals stay out. Layoffs are never mentioned. Medium-confidence facts are hedged. No internal scoring terms, invented names, or invented meeting times.
  • Voice. Word limits per email type, banned phrases, subject rules, the signature, and for follow-ups, no chaser phrases like “just following up” or “circling back”.

Drafts are recorded, so scoring is free and repeatable, and CI fails if a case changes without being re-recorded.

ClassificationHaiku coldSonnet coldHaiku follow-upSonnet follow-up
Before the suite22/3026/3030/30not measurednot measured
Now30/3030/3030/3030/3030/30

Two of the four Haiku “failures” before were false positives in the checks themselves, which is its own useful finding: evals need debugging too.

Running it for free#

A free OpenRouter key is enough to run the whole engine with nothing sent. Free accounts get 50 requests a day, and each prospect takes two or three (draft, tone check, sometimes a regeneration), so that’s 15 to 20 prospects a day. Hitting the limit stops the run with a clear error instead of retrying.

Getting this to work turned up some non-obvious problems. The README recommends pinning one free model rather than using a random router, because results are otherwise impossible to compare. And reasoning is turned off by default, because reasoning models on a tight token budget can spend all of it thinking and return nothing.

Known limits#

It’s pre-1.0 and says so:

  • Conversations live in a local SQLite file, so it assumes a single process. A shared Postgres store is planned.
  • The API has a single shared key, with no per-user accounts.
  • Calendly webhooks aren’t handled yet (Cal.com’s are), and inbound email is only handled for Resend.
  • Enrichment is tuned for selling to software companies, because it counts engineering roles.

Try it#

git clone https://github.com/Sanoy24/conversion-engine.git
cd conversion-engine
uv sync
cp .env.example .env                      # add OPENROUTER_API_KEY
uv run python -m scripts.fetch_data       # public datasets into data/
uv run pytest -m "not slow and not live"
uv run uvicorn agent.main:app --reload

Copy playbooks/example, describe your own company, and point PLAYBOOK_DIR at it. Only turn on live sending after you’ve read the drafts and you’re sure you’re allowed to contact the people on your list.

The broader idea travels well beyond sales: if a model is going to make claims, decide how confident each claim is allowed to sound before the model writes it, not after.

2026·wip

Conversion Engine: Signal-Grounded B2B Prospecting

Research a company from public data, decide whether it's worth contacting, write an evidence-backed first email, handle replies, and book the meeting. Configurable for any company through playbooks.

Started as a 10 Academy TRP brief

30/30 on grounding and voice evals with Haiku and Sonnet

PythonFastAPIOpenRouterHubSpotCal.com