-
-
BetterTake AI: (AI Generator + AI Critic) Build Better Ads | Genblaze + Backblaze B2
-
BetterTake-AI Homepage
-
BetterTake-AI History Page
-
Genblaze orchestrates each generation round using Replicate.
-
The Critic approves images scoring 8/10 or higher.
-
Genblaze verifies every provenance manifest before approval.
-
The pipeline automatically stops once the quality score reaches 8/10.
-
Automatically selects the best round and stops when approved.
Inspiration
Every AI image generator can create an advertisement from a prompt. The real challenge begins after the first image comes back.
Marketing teams rarely accept the first result. The lighting feels flat, the composition doesn't match the brand, or the product isn't emphasized enough. The usual workflow is frustrating: rewrite the prompt, generate again from scratch, compare versions yourself, repeat, with no guarantee each new attempt is actually better than the last, and no record of how the final creative was chosen.
I wanted an AI creative workflow that behaves like a real creative team: one person drafts, another gives a specific note, and the draft gets revised toward that note, not thrown out and re-rolled blind.
That's BetterTake AI: a Generator agent and a Critic agent that argue over an ad until it earns its approval, with every attempt along the way preserved, not discarded.
What it does
BetterTake AI is an ad-creative studio built around a Generator/Critic loop.
The user submits a product and a brand direction.
- Genblaze orchestrates the pipeline.
- Replicate FLUX Schnell generates the ad image.
- Groq Vision reviews the actual image, assigns a score, and, if it's below the bar, names exactly one concrete flaw to fix.
The next round doesn't start over. It edits the previous round's real image toward that fix, using it as a visual reference.
The moment a round scores 8/10 or higher, generation stops immediately, no wasted rounds once the ad is genuinely good, and the critic responds with appreciation rather than manufacturing a nitpick.
If no round ever crosses that bar, the highest-scoring round ships, never just whichever one happened to run last.
Every image, its SHA-256 provenance manifest, the critic's full feedback, and a complete session log are uploaded to Backblaze B2 automatically.
Each manifest is checked with Genblaze's own manifest.verify() before it's shown to the user, and a /history page reads every past campaign straight back out of B2, live.
Nothing about a campaign disappears once it's generated, approved or not.
How I built it
Genblaze is the orchestration layer.
Its Pipeline and .step() API chain each round to the one before it with .from_result(), and its ObjectStorageSink writes every generated asset and provenance manifest to Backblaze B2 automatically.
Replicate FLUX Schnell handles image generation.
Each round's reference_image is the actual image from the previous round, not the user's original upload repeated, so revisions are genuine image-guided edits rather than fresh prompt-only generations.
Groq Vision plays the critic.
It returns a structured verdict containing:
- A quality score
- A verdict flag
- One concrete issue to fix
- Or an appreciative note once the score reaches 8+
That verdict becomes the exact instruction for the next generation.
Once a round is approved, I call Genblaze's manifest.verify() on its provenance manifest and surface the result as a ✓ Verified badge, a real integrity check, not just a claim.
Backend
- Python
- Flask
- Server-Sent Events (SSE)
- Docker
- Render
- pytest
Challenges I ran into
A reasoning model silently broke every critique
Midway through development, Groq deprecated the vision model I originally used.
Its replacement was a reasoning model that wrapped every response inside <think>...</think> blocks by default.
My critic silently stopped producing valid JSON, and every generation fell back to a generic default score.
I fixed this by:
- Disabling reasoning mode
- Enabling JSON Mode
- Adding markdown-fence stripping as a second layer of protection
I had to inspect the real storage API instead of trusting assumptions
My first integration assumed a familiar boto3-style API (client.put_object(), etc.).
That assumption was wrong.
I inspected the installed genblaze_s3 package directly, discovered the actual methods (put, get, list, presigned_get_url), and rebuilt every storage operation against the real implementation instead of documentation-shaped guesses.
Free-tier rate limits forced production-minded engineering
Replicate's free tier allows only a very small burst rate.
Naive back-to-back generations immediately triggered failures.
I solved this by:
- Adding spacing between rounds
- Detecting provider failures
- Replacing opaque
IndexErrors with clear, actionable user-facing error messages
Iterative improvement had to be genuinely iterative
Simply regenerating from text prompts caused quality to fluctuate randomly.
Using the previous image as the next round's visual reference, and always remembering the highest-scoring result, turned iterative refinement into a measurable improvement process instead of repeated guessing.
Accomplishments that I'm proud of
- Two AI agents genuinely collaborating instead of one model doing everything
- Real image-to-image refinement rather than prompt-only regeneration
- Automatic stopping the moment quality is good enough
- Genuine appreciation once an image reaches the approval threshold
- Best-scoring generation always ships, even if later rounds regress
- SHA-256 provenance manifests verified using Genblaze's own
verify()API - Every image, manifest, and session log durably stored inside Backblaze B2
- Diagnosed and fixed real production issues:
- Silent JSON parsing failures
- Incorrect storage API assumptions
- Provider rate-limit constraints
What I learned
Generating media is the easy part.
The real engineering happens around:
- Evaluation
- Iteration
- Provenance
- Durable storage
Separating generation and critique into different AI agents consistently produced stronger creative decisions than asking one model to perform both roles.
I also learned not to trust assumptions about SDKs.
Inspecting the real installed API instead of guessing its shape prevented subtle integration bugs.
Finally, free-tier limitations, including model deprecations and provider rate limits, aren't edge cases.
They're exactly the kinds of real-world reliability problems that production systems must handle.
What's next for BetterTake AI
Future plans include:
- Specialized critics for composition, typography, and accessibility
- Video and multimodal advertising workflows
- Brand guideline learning for consistent campaigns
- Side-by-side comparisons across multiple Genblaze-supported providers
- Team review and approval workflows
- Semantic search across campaign history
- Automatic social-media resizing and exports
My goal is to build an AI creative platform that never ships its first draft simply because it's the only draft it has, every asset deliberately improved, cryptographically verified, and permanently preserved.
Log in or sign up for Devpost to join the conversation.