Urgent.News

What's breaking now, across thousands of outlets.

AI

Treat image prompts like functions: what 1,446 shared prompts say about templates

Most people write an AI image prompt the way they'd write a search query: once, for one result, then throw it away. The prompts that get shared and reused look different. We went through 1,446 popular image prompts in an openly licensed dataset, and a lot of them are written more like code than like sentences. Two patterns that stood out About 22% are templates. 323 of the 1,446 prompts contain…

When it comes to crafting prompts for AI image generation, most people approach it like searching for a single result - a one-off query that is then discarded. However, the prompts that are shared and reused look quite different. A dataset containing 1,446 popular image prompts was analyzed, and several patterns emerged.

Around 22% of these prompts are templates, meaning they are written more like code than sentences. These templates contain placeholders enclosed in square brackets, such as [OBJECT], [COLOR], [COUNTRY], or [BRAND NAME]. Essentially, the author writes the structure once and leaves slots for the parts that vary. Similarly, about 21% of the prompts are written in JSON format, structured as objects with keys for elements like scene, lighting, and camera. These prompts tend to be longer, with a median length of about 1,000 characters.

The reason templates are superior to one-off prompts is illustrated by the top-ranked prompt in the dataset. Shared by TechieSA, this prompt starts with "Create a technical infographic of [OBJECT] with a 45-degree isometric 3D perspective..." The rest of the prompt, including the angle, annotation style, and color-coded arrows, remains constant.

Only the [OBJECT] changes. By swapping in different objects like a phone, camera, or coffee machine, a series of consistent images is generated, rather than unrelated ones. This concept mirrors the principle of writing functions in coding - a single definition applies to multiple calls, with a change in one place affecting all instances.

To create your own template, write it once for a real case and iterate until satisfied. Identify what would change between uses, such as the subject, color, place, or brand, and convert these into explicit placeholders. Name the slots clearly, like [PRODUCT] instead of [X], so that future you can easily recognize what each placeholder represents.

Keep the style, lighting, and camera words fixed to maintain consistency across the series. When generating many images, copy the template into code and replace the placeholders with different items.

JSON prompts can also be useful, particularly when each part of the image is an explicit field that a script can fill in or when you want to modify one property while keeping the rest unchanged. However, models still read JSON prompts as text, so there's nothing inherently special about the braces. If a plain paragraph with clear placeholders suffices, it may be easier to read and edit.

The data for these findings comes from the nanobanana-trending-prompts dataset, published by MeiGen.ai under a CC BY 4.0 license. The prompts belong to the creators who shared them, and a free gallery called Prompt House allows you to browse trending AI image prompts and see templates in action by looking for square brackets.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

OpenAI CEO Says 'Bad Things' Part of AI Trade-Off

OpenAI's Sam Altman says that AI's benefits outweigh its risks, drawing a sharp contrast with Anthropic's safety push.

  • OpenAI CEO Sam Altman says public must accept AI's potential harm.
  • OpenAI's approach to regulation differs from Anthropic's push for stronger safeguards.
  • Altman argues benefits of AI outweigh risks, despite bad actors' misuse.

Pi Pod's Sandbox Architecture: Self-Hosted Agent Execution with Network and Secret Isolation

Pi Pod wraps the Pi coding agent framework in isolated sandboxes that run on your own server. Pi is a minimal, customizable agent harness (its configuration and tool integration layer) designed for…

  • Pi Pod wraps Pi coding agent framework in isolated sandboxes
  • Provides self-hosted agent execution with network and secret isolation
  • Offers composable environments, RBAC session sharing, and automation

How much of your ML workflow is still held together manually?

I've been working on a DataOps/MLOps product called Datryc, and before we go much further with it, I want to challenge some of the assumptions we're making.

  • Manual processes persist in moving from raw data to running models.
  • Datryc team experiments with common API/CLI to integrate workflows.
  • Author seeks insights on labor-intensive or unnecessary manual tasks.

More from Monday 5 October →