中文
← All work

AIGC Marketing Image Factory

Cutting the time it takes to produce a campaign image, so business teams can ship placement-ready assets consistently.

Nanfu Battery
Period
Feb 2026 – Jun 2026
  • LangChain
  • Multi-agent
  • Multimodal QC
  • Prompt engineering
  • Docker / Tencent Cloud
  • ~70% of image production handled by the agent
  • 5 QC dimensions scored automatically
  • 2 brand rule sets and channel rubrics

01 The problem

The e-commerce and marketing teams produce campaign images for a large SKU catalogue every day, spanning Tmall and Taobao hero and detail images plus placements on Douyin and Xiaohongshu. All of it was previously built from scratch in Photoshop — sourcing references, cutting out, compositing, colour grading — a long chain with limited throughput that simply could not keep up during peak sales periods.

The team had tried off-the-shelf AI image tools without much gain. It is not that business users cannot write a prompt; it is that writing one good enough on the first try is hard. Getting a model to reliably produce on-brand output takes round after round of trial and adjustment, and the time goes right back into the process.

So the problem this agent solves is time. Both heavy stretches — designing an image from zero, and iterating on prompts — move inside the pipeline. Business users fill in a few planning keywords and an output ratio, and the output is built against commercial placement standards from the start.

Under the hood: channels are not one template. Hero and detail images serve conversion, paid media serves attention, so each gets its own creative direction rules and its own QC rubric.

02 Capability boundaries

Four kinds of work I deliberately kept away from the model.

Text inside the image — image models misrender characters, break strokes, and even invent fake brand marks. In a commercial asset that is a serious failure, so text is rendered as a separate deterministic layer.

The real battery — polarity, model number and brand printing have to be exact. The model only generates a scene with space left open; the actual battery is composited in from a real product photo in the asset library.

Edit decisions — the model reads the image and proposes options; a person chooses.

Final compliance review and retouching — stays with human judgment.

Under the hood: models are assigned per step. Text reasoning such as creative direction runs on Qwen (qwen3.7-max); the three image-producing steps — background generation, edit rendering and component compositing — all run on OpenAI gpt-image-2; the image-reading steps (the pre-edit proposal pass and QC scoring) use the Qwen3.5-Omni multimodal model. Each task type keeps its own ranked list of fallback models and downgrades automatically on rate limits or outages, with every call routed through the company gateway.

03 The workflow

Users fill in business language, not a prompt: brand, channel (hero/detail or paid media), target audience, use scenario, key appliances, selling points and output ratio, plus two switches — include a person and leave an empty battery compartment.

A real input looks roughly like: audience “parents with young children”, scene “household stock-up”, key appliances “remote control, toys”, selling points “long-lasting, leak-proof”, ratio 1:1.

The background generation form: brand, audience, use scenario, key appliances, output ratio and a few switches
Everything the user provides: brand, audience, use scenario, key appliances, output settings and three switches. Nothing here is a prompt.

Step 1 · Creative directions. The model expands those keywords into several structured creative directions. Each one must fill a fixed set of fields: visual theme, primary palette, scene elements, composition, reserved space, suitable channel, risk points. Because the fields are fixed, the system assembles the image prompt from them automatically — the user never touches a prompt.

Step 2 · Background generation. Candidate backgrounds are produced for the chosen direction. At this stage the frame holds only the scene: no text, no logo, no real battery. Those come later, from deterministic steps.

Step 3 · Editing, human in the loop. Three sub-steps: the model reads the image and interprets the user’s plain-language complaint against what is actually changeable; it returns several concrete edit options; only after the user picks one does the system render the edit. The model looks and proposes, the user decides.

Step 4 · Component compositing. Battery bodies, logos, copy and packaging are composited into the frame. The point is that these come from real assets in the library rather than being drawn by the model — brand marks, packaging text, battery model and polarity all follow the real asset, so nothing gets abstracted, deformed or invented, and components cannot be misused or misplaced.

The four steps are orchestrated into a single LangChain pipeline with state carried throughout, making image production repeatable and traceable.

Under the hood: ranked model candidates per task type (text, vision, generation, editing) with automatic downgrade on rate limits or outages; every step’s artifacts are persisted for replay.

04 Prompt engineering

There are two system prompts: one for Nanfu alkaline batteries, one for the Chuanying button-cell line. The two sub-brands have almost nothing in common. Nanfu serves household appliances — remotes, toys, blood-pressure monitors — and needs a warm domestic feel, with black-gold and tech aesthetics explicitly banned. Chuanying’s graphene button cells live in car keys, trackers, glucose meters and night-fishing floats, where black-gold and a technical finish are exactly right. A single shared prompt would inevitably bleed one into the other, so the brand field switches to an entirely separate rule set.

Nanfu (alkaline)Chuanying (button cell)
ScenesHousehold appliancesCar keys / precision devices / outdoor fishing
AudienceFamilies, young parentsDrivers, health trackers, outdoor users
ToneWarm and domesticTechnical and professional
BannedBlack-gold, tech stylingOver-cyber, fake sci-fi effects

Both prompts share the same skeleton: business scope (only that brand’s genuine use scenarios, always naming a specific device, action and audience, never generic “premium background” filler), channel differences (hero and detail images serve conversion and need a clear, credible product; feed placements need scene and emotion; social needs an authentic everyday feel), brand tone (where the two diverge), composition and negative space (background first, always reserving room for the battery, packaging, logo and copy to be composited later), hard bans (no fake logos, text or packaging), and artifact avoidance (deformed structures, garbled screens, implausible battery compartments, fake reflections).

On top of that, a few user-facing switches rewrite the prompt directly: include a person (when off, the prompt explicitly enumerates the banned forms — faces, hands, silhouettes — and substitutes props and lighting to carry the human feel), leave an empty battery compartment (the appliance must show an open, empty, sensibly proportioned compartment for the real battery to be composited into), reserved component space, and output ratio.

The prompt went through several rounds. The through-line was continuously moving anything unreliable out of the model’s hands — image text and the real battery both ended up outside generation, leaving the prompt responsible only for what the model does reliably: scene, composition, mood and negative space.

05 Evaluation

QC dimensions were agreed with the marketing and e-commerce brand teams and settled at five: background, subject, text, lighting, layout. The core design is that every dimension splits its issues into severe and minor, each with its own rejection logic:

Severe fails outright — a single hit drops that dimension straight to Risky. Severe covers the failures that actually cause damage: fake brand marks, a competitor logo in frame, reversed battery polarity, product-logic errors, broken text.

Minor accumulates — one is tolerated; only reaching the threshold downgrades. Three minors in a dimension make it Risky, one or two drop it to Acceptable. These are non-fatal issues such as clutter, excessive empty space, or clashing colour.

Dimension grades map to scores (Excellent 2 / Acceptable 1 / Risky 0), averaged across the five for an overall score: Excellent requires ≥1.5 with no Risky dimension; Risky is triggered below 0.75 or by two or more Risky dimensions. Hero/detail and paid media each get their own rubric, since the same flaw carries different weight per channel.

The asset submitted for QC: a battery on a gaming desk beside a controller and mouse QC output: overall grade Excellent, score 2.0, with a grade and issue tags for each of the five dimensions
Left, the asset submitted for QC. Right, the output: overall grade and score, a grade per dimension, matched issue tags, and a readable explanation. This one is clean across all five dimensions — 2.0, graded Excellent.
An asset submitted for QC: a battery against a sci-fi mechanical background with lightning effects and promotional copy QC output: overall grade Acceptable, score 1.2, with the background dimension graded Risky
A borderline case: the background hits one severe issue — visible AI artifacts — dropping that dimension straight to Risky. Subject and lighting each pick up a single minor and fall to Acceptable, while text and layout are clean. Scores of 0+1+2+1+2 average to 1.2, and with only one Risky dimension the asset lands on Acceptable: usable, with flaws.

Under the hood: a multimodal model reads the image and returns a structured result per dimension (grade, score, matched issue tags); code validates it and defaults anything malformed to Risky. All five dimensions are scored in parallel.

06 Shipping and impact

The platform is integrated with the group’s central asset library, with three flows running end to end:

Fetch — compositing pulls real battery bodies, logos, packaging and headline copy straight from the library, so everything placed into the frame is an approved asset.

Save — the user’s chosen final is written back together with its generation context (audience, scene, channel, key appliances, selling points, ratio) and its QC result, along with the source asset it came from, establishing lineage. Finals only, never intermediates, so the library stays clean.

Iterate — a saved asset can be pulled back in for further editing and written back as a new version rather than overwriting the original.

On the platform side, admin-provisioned accounts, isolated workspaces, asset ownership and audit records let multiple people work in parallel without interfering. The system was containerized and deployed to Tencent Cloud.

The project went live in July and is now in use by both the marketing and e-commerce teams. Per their feedback, roughly 70% of image production is now handled by the agent, substantially cutting their workload. AIGC imagery is expected to move into full external campaign use from Q3.

Under the hood: the asset-library client exchanges an API key for a short-lived token, isolated per user; thumbnails are proxied by the backend so the frontend never talks to the library directly. Accounts, ownership and audit records are persisted, and run artifacts are isolated per user and session.