When not to build an agent: AI-written A/B test reports
Growganic runs A/B tests for its clients' websites. Every finished test needs a report for the client: what was tested, which variation won, by how much, on which devices, and what to test next. Before this project, analysts built each report by hand from two tools: ClickUp, where the tasks and hypotheses live, and Ablyft, where the experiments run.
The data platform
The first job was not AI at all. It was getting the data into one place.
- ETL: a Python job pulls all experiments, variations, and goals from Ablyft and all tasks from ClickUp. Every experiment has a ClickUp task, and a mapping joins them. Everything lands in BigQuery, with a test mode that writes to a separate dataset.
- API: FastAPI on Cloud Run reads BigQuery, calculates significance per goal, conversion rate and ARPU per variation, and splits by device (desktop, mobile, tablet, all). It also marks the winning variation.
- Frontend: React on Firebase. Dynamic tables with a column per goal, experiment metadata (team, project, hypothesis), pie charts, screenshots, the winner row highlighted, and a PDF download for the client.
That alone removed most of the manual work. What was left was the text: the part where an analyst explains what the numbers mean.
Why a workflow and not an agent
I asked the usual question first: does this need autonomy? The answer was no.
- The inputs are always the same: hypothesis, variations, results per goal and device.
- The steps are always the same: summarise, judge, recommend.
- The output is always the same: three sections of a report.
An agent decides its own next step. Here there is no next step to decide. Giving the model tools and a loop would only add new ways to fail: calling the wrong endpoint, looping, or "finding" numbers somewhere else. So it is a prompt chain with three fixed steps.
The three steps
- Result summary. Input: the API's numbers for every variation and device. Output: a short plain-language summary, the winning variation, and the size of the effect.
- Hypothesis review. Input: the hypothesis from ClickUp plus the summary. Output: confirmed, rejected, or inconclusive, with the reason.
- Recommendation. Input: the review plus the experiment metadata. Output: what to test next and why.
Each step has a typed output schema. If a step fails to parse, it is retried once, then marked for the analyst to write by hand.
Keeping numbers honest
The biggest risk in AI-written reports is a wrong number in a sentence that sounds right. So every number in the generated text is extracted and compared with the API values for that experiment. A mismatch blocks the draft. The model is also told to call a result inconclusive when significance is not reached, and a check enforces that: a "winner" claim without significance is rejected.
Human in the loop
Nothing goes to a client directly. The draft appears in the frontend next to the numbers. The analyst edits it and approves it, and only approved text becomes part of the client report and the PDF. Edits are stored, so the prompts can be improved from what analysts actually change.
Lessons from production
Not everything broke in the AI part. One recurring Slack alert came from the data layer: reports that were not cached read from a combined table while it was being dropped and rebuilt, which took seconds to minutes. The fix was to replace the table in place instead of dropping it first. Boring, but that kind of fix is what makes the whole report trustworthy, including the AI text on top of it.
Takeaway
Knowing when not to build an agent is part of building agents. Here a fixed workflow with typed steps, number checks, and human approval gave the agency what it needed at a fraction of the risk.