Q Optimizer · Copilot or autopilot
Q does the math.
You keep the keys.
Q is the AI analyst inside TapQuality. It reads your call data, tells you why CPA moved, and drafts bid changes as experiments. A locked scorer grades every result. Run Q as a copilot and nothing changes until you say yes, or put it on autopilot within limits you set.

The idea
“What if the weekly review a senior media buyer runs were waiting for you each morning — the math done, the change drafted, the reasons written down?”
Q borrows Karpathy's autoresearch pattern: an agent proposes, a fixed scorer judges. We changed one thing. This is your ad spend, so a person signs off before any bid moves, and hard limits in code stop the agent from going past the bounds you set.
Ask Q
Ask Q about your calls
Q works over the same report engine you use. It answers in charts and plain English, saves dashboards, and shares links with your team.
You ask
“Why did CPA jump yesterday?”
Q does
Q pulls the funnel — pings, bids, wins, billable calls, sales — by hour, geo and source, and points to the segment that moved.
You ask
“Which sources send calls that never bill?”
Q does
Q reads the call log, where each call carries the reason it didn’t bill, and ranks sources by waste.
You ask
“Lower my overnight bids by 20%.”
Q does
Q drafts the change and shows you what it will touch. As your copilot, it waits for your yes.
The loop
The optimization loop
Each cycle runs observe → plan → experiment → evaluate → decide for every campaign you enroll. Housekeeping checks in code run every 15 minutes. The deeper AI pass runs once a day, on weekdays.
Observe
Q reads segment results — calls, sales and CPA by geo, hour, source and sub-source — and the log of its own past experiments, so it learns what worked and what didn’t.
Live segment data + experiment historyPlan
Q looks for segments that look under- or over-bid and writes down why. For example: “Florida converts above the campaign average. The geo modifier may be too low.”
Reasoning written in plain EnglishExperiment
Q drafts a bid modifier change, such as Florida +20%. Code checks it against your hard limits before it can run. The agent can’t skip them.
e.g. FL geo modifier +20%Evaluate
Once the segment has the minimum number of calls you set, the locked evaluator compares the experiment to its baseline on proxy score and CPA.
Locked scoring — the agent can’t change itDecide
Q recommends keep or revert. The evaluator checks that call on its own and overrules Q if they disagree. Then you accept or dismiss it, and the result lands in History.
Keep the winner or revert to baselineHistory
What Q shows you
Each experiment has a segment, a change, a call count, a CPA before and after, and a reason in plain English. The log below is illustrative: the shape is real, the numbers are made up.
FL converts above the campaign average on 300+ calls. Raising the modifier to win more of them.
Most sales land between 10am and 2pm ET. Testing a higher bid in that window.
Source quality looked worse, so Q cut the bid. The evaluator found no gain, so the change was reverted.
TX conversion is trending up. Testing a small bid increase.
Overnight calls convert poorly. Cutting bids to save budget for peak hours.

Compounding
Small wins, kept
Most experiments fail, and that’s the point. Q reverts what doesn’t work and keeps what does, one tested change at a time.
EXPERIMENT # · CPA
LATEST KEPT
Illustrative — shows how kept changes stack, not a result
Safety
The locked evaluator
Q proposes changes. A separate scoring function, written in code the agent can’t edit, checks every decision before it reaches your campaigns.
The part that plans experiments is kept apart from the part that grades them. The agent can't grade its own work, and the limits hold no matter what it proposes.
- Allowed dimensions — only the segment types you list
- Max change per experiment — a cap on how far a modifier moves
- Bid floor — the effective bid never drops below it
- One test per segment — no overlapping experiments
- Concurrency cap — a limit on live experiments per campaign
- Minimum calls — a segment needs enough calls before it can be tested
- Which segments to test
- How far to move a modifier, within your cap
- Whether to keep or revert a finished test
- Patterns it sees across past experiments
Modes
You decide how much Q does
Start in shadow mode and read what Q would have changed. Move to suggest mode when its calls look right to you. Either way, a person makes the final call on your bids.

Shadow
WatchQ runs the full loop but changes nothing. Read what it would have done, and why, before you let it touch a bid.
- Every proposal logged with its reason
- No modifiers changed
- Compare Q’s calls with your own
- A safe way to judge Q on your data

Suggest
ApproveQ drafts experiments and keep-or-revert calls. You accept or dismiss each one. Accepted changes land in History, where you can roll them back.
- Each change needs your approval
- Keep and revert reasons shown
- Dismiss anything you disagree with
- Change log with point-in-time restore

Guardrails
LimitsEach campaign has its own circuit breaker. If the agent’s spend runs over, the breaker stops it for that campaign. Hard limits in code bound every change it drafts.
- Per-campaign circuit breaker
- Hard limits checked in code
- Full audit trail of every proposal
- Turn Q off for any campaign
Lineage
Autoresearch, adapted for performance marketing
Karpathy’s autoresearch pattern lets an AI agent improve code one tested change at a time. We use the same parts for bids, with limits and a sign-off step built for real ad spend.
Playbook
Autoresearch: Locked operational manual
TapQuality: Campaign optimization policy — your rules, Q’s boundaries
Evaluator
Autoresearch: Locked scoring function
TapQuality: Locked scoring — proxy score and CPA thresholds the agent can’t change
Experiment
Autoresearch: Mutable code changes
TapQuality: Bid modifier adjustments — the levers Q is allowed to pull
History
Autoresearch: Append-only results log
TapQuality: Full experiment audit trail — every proposal, result, and decision
Commit
Autoresearch: Keep what worked
TapQuality: Winner kept — the modifier stays and becomes the new baseline
Revert
Autoresearch: Undo what didn’t
TapQuality: Loser rolled back — the modifier returns to its old value
Approval
Autoresearch: None — the agent decides
TapQuality: You accept or dismiss each change before it applies
| Concept | Autoresearch | TapQuality |
|---|---|---|
| Playbook | Locked operational manual | Campaign optimization policy — your rules, Q’s boundaries |
| Evaluator | Locked scoring function | Locked scoring — proxy score and CPA thresholds the agent can’t change |
| Experiment | Mutable code changes | Bid modifier adjustments — the levers Q is allowed to pull |
| History | Append-only results log | Full experiment audit trail — every proposal, result, and decision |
| Commit | Keep what worked | Winner kept — the modifier stays and becomes the new baseline |
| Revert | Undo what didn’t | Loser rolled back — the modifier returns to its old value |
| Approval | None — the agent decides | You accept or dismiss each change before it applies |
Cadence
How often Q works
15 min
Housekeeping checks in code, all day
1 / weekday
A deeper AI pass on each enrolled campaign
Per campaign
Circuit breaker that stops the agent
Every change
Waits for your yes, with an audit trail

Put Q on your own data
Start in shadow mode. Read what Q would change and why. Accept the changes you agree with.