Manish Shetty

All systems

Mandate Radar

An AI sales-research pipeline that can't save a made-up fact

Walkthrough2:41
Role
Founder; AI Systems and Automation Lead, Phalanx Labs (2021 to present). Product owner for this build: I set what it must do and must never do, directed the AI agents, and reviewed, tested and signed off every stage.
Built with
Claude Code and Codex (AI coding agents); Python, Anthropic API (Claude Sonnet and Haiku), Serper search, SQLite.

How it works

From a news event to a lead a person can act on. Cheap checks run first, and nothing unsourced can be saved.

  1. News event

    A leadership change appears in the news.

  2. Cheap triage

    A low-cost model classifies it. A gate stops the run unless it's a recent, real change and the daily budget allows it.

  3. Research

    The stronger model researches the company and the new leader, only for events that pass.

  4. Evidence, sourced

    Every verified fact must carry its source and a verbatim quote, or the database refuses to save it.

  5. Score

    Code ranks the lead on a fixed rubric with hard caps. No named owner means it can't rank above "watch".

  6. Draft

    The model fills slots in a fixed template; code assembles the email and checks it against written rules.

  7. A person sends

    The pipeline never looks up addresses and never sends anything.

    A person decides

The outcome

Paste in a news link about a leadership change, and the pipeline returns a ranked sales lead with its evidence, a researched contact and a draft first message. It reaches contact research in under a minute (median), at about USD 0.11 a run. All 290 of the 290 facts it has stored carry a source and a verbatim quote.

The problem

Outbound sales to newly appointed senior leaders depends on timing and accuracy. A new leader is most open to outside help early in the role, so leads have to be found fast. And one wrong fact in the first line of a cold email loses the reader, so a lead with an invented fact is worse than no lead at all.

What I decided

  1. No invented facts. A verified fact must carry its source and a verbatim quote, or it can't be saved.
  2. Spending stops at a hard daily ceiling, checked before every paid AI call.
  3. The model drafts and the code decides. Ranking follows a fixed scoring rubric, and every draft is checked against written rules before a person sees it.
  4. A person sends. The pipeline never looks up email addresses and never sends anything.

How it was built

The agents drafted a written spec from these rules and built the pipeline stage by stage. I reviewed and tested each stage before signing it off.

  • Cheap checks run first. A low-cost model (Haiku) classifies each news event, and a gate stops the run unless it's a recent, real leadership change and the budget allows it. The stronger model (Sonnet) only runs on leads that pass.
  • The fact rule is enforced twice: by a database rule that rejects any "verified fact" without a source and quote, and by a check in the code that covers every other way of saving data. Evidence is labelled as verified fact, supported inference, hypothesis or unknown, and the lead card shows each group separately.
  • Every paid call is logged with its cost. A model missing from the price list stops the run, so nothing is ever costed at zero.
  • Scoring has hard caps. A lead without a named owner can't rank above "watch", however good the rest looks.
  • The model fills slots in a fixed email template, and code assembles the email and checks it.

Results

  • 290 of 290 stored facts are sourced and quoted. All 7 attempts to insert an unsourced fact, through raw database commands and through the code, were rejected.
  • About USD 0.11 per completed run: USD 3.29 across 278 paid calls.
  • Under one minute (median) from news event to contact research.
  • 273 automated tests, with the paid APIs replaced by stand-ins, run in about 31 seconds. The draft checker caught 20 of 20 planted errors.

Screens from the build

Mandate Radar overview: leads awaiting a decision, facts sourced and quoted, spend today against the daily ceiling, leads by band, where runs stop, spend per day and evidence types.
The overview. Every number is counted from the database: leads waiting for a person, how many facts are sourced and quoted, spend against the daily ceiling, and where runs stop (demo data).
Mandate Radar lead queue: a sortable table of leads with company, event and objective, owner, band, score bar, days in seat and decision.
The lead queue. Every lead is ranked by a fixed scoring rubric and waits for a person to decide (demo data).
Top of a lead card: company, the leadership-change event and tiered sources, the mandate it implies, the fit score on a band scale, the named owner, and the decision panel.
Top of a lead card: the news event and its tiered sources, the mandate it implies, the named owner and the fit score. The person decides; the tool never sends (demo data).
Lead card evidence: verified facts, each with a verbatim quote, source and tier, kept apart from supported inferences, hypotheses and unknowns.
Evidence on a lead card. Each verified fact carries its source and a verbatim quote, kept apart from inferences, hypotheses and unknowns (demo data).
Twelve automated checks on a draft email, all passed, with the three short follow-ups and why the opening was chosen.
The draft's automated checks: twelve named rules a draft must pass before a person sees it, plus the follow-ups (demo data).
One pipeline run as a flow of stages from ingest to draft with the gate in between, then each stage with its model, outcome and cost.
One run, stage by stage: cheap checks and a gate before any paid research, with the model, outcome and cost of each stage (demo data).
The cost view: spend today against the daily ceiling, spend per day, spend by model, per run and by stage.
The cost view: today's spend against the hard daily ceiling, and every paid AI and search call broken down by model, run and stage (demo data).