SYSTEM NOTICE

Auto translation by AI. Be sure, accuracy, nuances and authorial intent may not be fully reflected.
見出し画像

Which prompt format should I use: TEXT, YAML, or JSON? #200

Conclusion: There is no single correct answer. Switch them based on the situation.

In this article, I've organized the prompt formats used in image generation.
If you're feeling confused, give this a read!

Lately, terms like TEXT / YAML / JSON have been flying around the prompt community, right?

And the first thing you get stuck on is this.

The "Which one should I actually use?" problem

I'll give you the answer first.

There is no single correct answer. It's easiest to switch based on your purpose.
That's how tools work. If you try to do everything with just a kitchen knife, it's going to be tough (e.g., fish bones).


1. Just remember the roles: This is all you need to memorize

Don't overthink the differences between the three.

  • TEXT: For throwing in as-is (testing, chatting, fast)

  • YAML: A blueprint easy for humans to edit (strong for swap-out operations)

  • JSON: A ledger easy for machines to handle (strong for saving, automation, and verification)

In other words, it's like this.

TEXT = Get it out there for now
YAML = Make it easy to fix later
JSON = Hand it to a machine to solidify


2. If you're lost, decide with just these 3 questions

Here's how to use them. It's super simple.

Q1: Are you just trying to "test" or "hit the mark" right now?

👉 TEXT

Q2: Do you want to use it in a way where you "change just this part" later?

👉 YAML

Q3: Do you want to automate it / turn it into a log-based asset / ensure the team doesn't break it?

👉 JSON

Yes, that's it.
(*People who say "I want to do all of them" usually don't do it the next day.)


3. Write the same content in three formats

By writing the same instructions in three ways, you can see their "strengths and weaknesses" at a glance.

3-1) TEXT (Throw it in as-is)

Purpose: Try it out first (speed)

dark fantasy warrior, close-up portrait, black smoke, dramatic lighting, sharp focus, --ar 16:9

✅ Fast, can be iterated immediately
⚠️ Tends to make you wonder "where should I fix this?" when trying to edit later


3-2) YAML (Blueprint for humans)

Purpose: Replacement operations (easy to edit)

subject: "dark fantasy warrior"
framing: "close-up portrait"
effects: "black smoke"
lighting: "dramatic"
quality: "sharp focus"
params: "--ar 16:9"

✅ Changing just the subject or just the composition is instant
Example: You can turn it into a different character just by swapping the subject


3-3) JSON (Ledger for machines)

Purpose: Saving, automation, and verification (turning into assets)

{
  "subject": "dark fantasy warrior",
  "framing": "close-up portrait",
  "effects": ["black smoke"],
  "lighting": "dramatic",
  "quality": "sharp focus",
  "params": "--ar 16:9"
}

✅ Easy to handle with programs (good at saving, searching, and automatic generation)
✅ Easy to perform checks like "are there any required fields?"
⚠️ A bit rigid if written by hand (not meant for humans)


4. My recommendation

Doing everything at once is tiring, so it's fine to start with this flow.

Step 1: Hit the mark with TEXT first

  • Run it 5-10 times to grasp the "direction"
    (*Just go with the flow here. It's the process of picking up the "hits".)

Step 2: Break down the hits into YAML

Keep the containers minimal. This is enough.

  • subject (who)

  • framing (composition)

  • mood / lighting (atmosphere/light)

  • effects (smoke, etc.)

  • params (ratios, etc.)

Once you've done this much, you've basically won at 'how to use it'.

Step 3 (if needed): Save as JSON

  • 'I want to search later'

  • 'I want to automate'

  • 'I want to improve reproducibility'
    —the moment you think this, switch to JSON. No need to rush.


5. Point: Watch out for this ⚠️

The YAML pitfall

  • YAML has strict whitespace rules (if it's misaligned, the structure breaks)

👉 Solution: Start by using a 'shallow structure (minimal nesting)'.
Keep the number of containers low. Don't be greedy.

The JSON pitfall

  • JSON is tiring to write by hand

👉 Solution:
Edit in YAML, save in JSON
. This division of labor is actually quite powerful.


Summary: Formats aren't a religion. Just switch them based on your 'purpose'.

  • TEXT: Prototyping, conversation, speed-focused

  • YAML: Replacement, blueprints, human-managed

  • JSON: Storage, automation, validation, assetization

Ultimately, this is it.

If you choose your tool based on 'what do I want to do right now?', you won't get lost.


Finally

If you read this article and
thought, 'This is useful'—

please click 'Like' and follow. I'm the type of creature that builds the next system based on everyone's likes (lol).
I also love comments. Especially feedback like 'give me a template' or 'I don't understand this part'—that's the best fuel for me.

I also love comments.
Especially feedback like 'give me a template' or 'I don't understand this part'—that's the best fuel for me.

See you later!

#GenerativeAI #Prompt #PromptEngineering #YAML #JSON #AIGeneratedImages #Midjourney #StableDiffusion #DALL_E #LLM #PromptManagement #LogUtilization #Schema #Validation #TeamOperations #Documentation #DesignThinking #OperationalImprovement #Introduction #Comparison #TemplateDistribution #VersionControl #Git #DataOrganization #Checklist


いいなと思ったら応援しよう!

KITAcore|キタコレ@ログプレイヤー よろしければ応援お願いします! いただいたチップはクリエイターとしての活動費に使わせていただきます!