Course Content
Agentic AI Patterns
9 sections · 50 lessons
How can AI agents be designed for image generation, art workflows, or synthetic data creation?
What you need to know
The generate-evaluate loop
This is the evaluator-optimizer pattern applied to media and data. Its quality depends on the evaluator:
- Rule checks in code: size, aspect ratio, file format, schema validity, banned words.
- Model checks: a vision model compares the image to the brief; a classifier checks a synthetic record's label.
- Human spot checks on a sample.
Image and art workflows
- Spec — parse the brief into fields: subject, style, colours, text to show, sizes, brand rules.
- Generate — several prompt variants, a few images each.
- Score — vision-model critique against the spec, plus code checks.
- Refine — edit or regenerate the top candidates; cap attempts.
- Post-process — upscale, crop to each channel's size, remove background.
- Record — keep prompt, seed and model version, and attach provenance metadata.
Synthetic data
- Spec, not vibes. Decide class balance, attributes to cover, and the edge cases you are short of.
- Filter hard. Remove near-duplicates by embedding similarity, validate with a schema or classifier, and spot-check.
- Judge by downstream effect. Did the model trained with it improve on a real held-out set? If not, it is expensive noise.
- Avoid collapse. Training repeatedly on your own model's output reduces diversity over generations. Keep real data in the mix.
Responsibility
Respect licences and do not imitate living artists' styles on request for commercial use. Attach provenance metadata (C2PA content credentials are the common standard) and run a content filter before anything is published.
A real-life example
Product images for an e-commerce sale. A fashion marketplace needs 4,000 banner images for a Diwali sale, in three sizes each.
- The agent turns each product brief into a spec: product ID, festive palette, "no text on the product", logo in the top-left corner.
- It generates 4 candidates per banner. A vision model checks that the product matches the catalogue photo; code checks sizes and logo position.
- About 72% pass first time, 20% pass after one refinement, and 8% go to a designer. Attempts are capped at 3 per banner, which keeps image-generation cost within budget.
Synthetic claims data. An insurer's fraud classifier had only 300 real examples of staged-accident claims. The team generated 3,000 synthetic ones from a spec covering 12 known fraud patterns. After deduplication, 2,100 remained. Recall on real held-out fraud cases rose from 0.58 to 0.66. A second batch generated without the spec added no gain and was dropped.
Follow-up questions to expect
- "How do you evaluate image quality automatically?" — Combine rule checks with a vision-model judge scored against a rubric, and calibrate the judge against designer ratings on a sample.
- "What is model collapse?" — Loss of diversity and accuracy when models are trained repeatedly on generated data. Keep real data and measure diversity.
- "How do you stop costs running away?" — Cap candidates and refinements per item, and track cost per accepted asset.