@heyrimsha: How to write JSON prompts to g...
@heyrimsha
21 views
Aug 23, 2025
1
How to write JSON prompts to get shockingly accurate outputs from any chatbot:
2
firstâŚwhat is json prompt writing?
it's just putting your prompt inside a structured format.
like this:
{
"task": "summarize this article",
"audience": "college students",
"length": "100 words",
"tone": "curious"
}
not english.
not vibes.
just instructions, like a form
it's just putting your prompt inside a structured format.
like this:
{
"task": "summarize this article",
"audience": "college students",
"length": "100 words",
"tone": "curious"
}
not english.
not vibes.
just instructions, like a form
3
why does it work so well?
llms donât "understand" language the way we do.
they follow patterns and structure.
and json is ultra-structured.
it leaves no ambiguity.
they donât have to guess what you mean.
youâre telling them exactly what you want.
llms donât "understand" language the way we do.
they follow patterns and structure.
and json is ultra-structured.
it leaves no ambiguity.
they donât have to guess what you mean.
youâre telling them exactly what you want.
5
want even sharper outputs?
you can nest the json.
{
"task": "write a thread",
"platform": "twitter",
"structure": {
"hook": "strong, short, curiosity-driven",
"body": "3 core insights with examples",
"cta": "ask a question to spark replies"
},
"topic": "founder productivity systems"
}
you just turned prompt spaghetti into clean code.
you can nest the json.
{
"task": "write a thread",
"platform": "twitter",
"structure": {
"hook": "strong, short, curiosity-driven",
"body": "3 core insights with examples",
"cta": "ask a question to spark replies"
},
"topic": "founder productivity systems"
}
you just turned prompt spaghetti into clean code.
6
so how do you write json prompts?
3 basic rules:
- use key-value pairs
- be explicit
- use nested objects for structure
example:
{
"task": "generate a list",
"topic": "books that improve thinking",
"audience": "young entrepreneurs",
"output_format": "markdown bullets"
}
3 basic rules:
- use key-value pairs
- be explicit
- use nested objects for structure
example:
{
"task": "generate a list",
"topic": "books that improve thinking",
"audience": "young entrepreneurs",
"output_format": "markdown bullets"
}
7
this works across all major models.
chatgpt? yes.
claude? thrives on it.
gemini? understands structure well.
mistral, gpt-4o, etc? all love structured input.
some even prefer it.
chatgpt? yes.
claude? thrives on it.
gemini? understands structure well.
mistral, gpt-4o, etc? all love structured input.
some even prefer it.
8
a quick comparison to prove it:
normal prompt:
recommend books that help me think clearer
json prompt:
{
"task": "recommend books",
"topic": "thinking clearly",
"audience": "entrepreneurs",
"output_format": "list of 5 with one-sentence summaries"
}
run both.
the second is crisper, clearer, and more relevant.
normal prompt:
recommend books that help me think clearer
json prompt:
{
"task": "recommend books",
"topic": "thinking clearly",
"audience": "entrepreneurs",
"output_format": "list of 5 with one-sentence summaries"
}
run both.
the second is crisper, clearer, and more relevant.
9
here's one you can try in Veo 3 right now:
simple prompt:
show me a product demo style video of a fitness app
simple prompt:
show me a product demo style video of a fitness app
10
json version:
{
"task": "generate a video",
"video_type": "product demo",
"theme": "fitness app",
"duration": "8 seconds",
"tone": "energetic and sleek",
"visual_style": "clean UI, fast transitions"
}
watch how much better the output and exact.
{
"task": "generate a video",
"video_type": "product demo",
"theme": "fitness app",
"duration": "8 seconds",
"tone": "energetic and sleek",
"visual_style": "clean UI, fast transitions"
}
watch how much better the output and exact.
11
examples:
12
13
why this works:
models like gpt are trained on code, docs, apis, and structured data.
json looks like the stuff they were fed.
so they treat it as higher-signal.
the less they have to guess, the better the result.
models like gpt are trained on code, docs, apis, and structured data.
json looks like the stuff they were fed.
so they treat it as higher-signal.
the less they have to guess, the better the result.
14
another example:
bad prompt:
write me a cold email that converts
better (json):
{
"task": "write cold email",
"audience": "SaaS founders",
"product": "ai sales automation tool",
"goal": "book a 15-minute call",
"tone": "friendly but confident"
}
gets straight to the point.
every word earns its place.
bad prompt:
write me a cold email that converts
better (json):
{
"task": "write cold email",
"audience": "SaaS founders",
"product": "ai sales automation tool",
"goal": "book a 15-minute call",
"tone": "friendly but confident"
}
gets straight to the point.
every word earns its place.
15
bonus: you can even write inside the json
like this:
{
"task": "improve writing",
"input": "Our team is proud to announce the next chapter of our journey.",
"goal": "make it more vivid and emotional",
"audience": "customers",
"tone": "authentic and inspiring"
}
clean. surgical. upgradeable.
like this:
{
"task": "improve writing",
"input": "Our team is proud to announce the next chapter of our journey.",
"goal": "make it more vivid and emotional",
"audience": "customers",
"tone": "authentic and inspiring"
}
clean. surgical. upgradeable.
16
want to write content that always hits?
use this json skeleton:
{
"task": "write content",
"platform": "twitter",
"structure": {
"hook": "short, punchy, curiosity-driven",
"point": "3-5 insights, each 2-3 sentences",
"action": "one question to spark replies"
},
"topic": "your topic here",
"tone": "casual and smart"
}
it works for almost anything.
use this json skeleton:
{
"task": "write content",
"platform": "twitter",
"structure": {
"hook": "short, punchy, curiosity-driven",
"point": "3-5 insights, each 2-3 sentences",
"action": "one question to spark replies"
},
"topic": "your topic here",
"tone": "casual and smart"
}
it works for almost anything.
17
here are 5 high-leverage use cases people use AI for daily â with json templates:
you can copy/paste these and just swap out the input.
plug-and-play style.
you can copy/paste these and just swap out the input.
plug-and-play style.
18
1. generate videos with voice (e.g. Veo 3)
{
"task": "generate video",
"platform": "Veo",
"video_type": "explainer",
"topic": "how to start a dropshipping store",
"duration": "60 seconds",
"voiceover": {
"style": "calm and confident",
"accent": "US English"
},
"visual_style": "modern, clean, fast cuts"
}
{
"task": "generate video",
"platform": "Veo",
"video_type": "explainer",
"topic": "how to start a dropshipping store",
"duration": "60 seconds",
"voiceover": {
"style": "calm and confident",
"accent": "US English"
},
"visual_style": "modern, clean, fast cuts"
}
19
2. generate content (for social, blogs, emails, etc)
{
"task": "write content",
"platform": "twitter",
"structure": {
"hook": "short, curiosity-driven",
"body": "3 insights with smooth flow",
"action": "1 strong question"
},
"topic": "how to stay focused as a solo founder",
"tone": "relatable and smart"
}
{
"task": "write content",
"platform": "twitter",
"structure": {
"hook": "short, curiosity-driven",
"body": "3 insights with smooth flow",
"action": "1 strong question"
},
"topic": "how to stay focused as a solo founder",
"tone": "relatable and smart"
}
20
3. write or debug code
{
"task": "write code",
"language": "python",
"goal": "build a script that renames all files in a folder",
"constraints": ["must work on MacOS", "include comments"],
"output_format": "code only, no explanation"
}
{
"task": "write code",
"language": "python",
"goal": "build a script that renames all files in a folder",
"constraints": ["must work on MacOS", "include comments"],
"output_format": "code only, no explanation"
}
21
4. turn raw ideas into a business/brand strategy
{
"task": "act as brand consultant",
"client": "early-stage AI tool",
"goal": "define clear positioning",
"deliverables": ["1-liner", "target audience", "3 key differentiators"],
"tone": "simple and strategic"
}
{
"task": "act as brand consultant",
"client": "early-stage AI tool",
"goal": "define clear positioning",
"deliverables": ["1-liner", "target audience", "3 key differentiators"],
"tone": "simple and strategic"
}
22
5. turn information into consulting deliverables
{
"task": "create consulting doc",
"input": "paste research or notes here",
"client": "retail ecommerce brand",
"deliverables": ["SWOT analysis", "growth roadmap", "3 quick wins"],
"output_format": "markdown",
"tone": "sharp and practical"
}
{
"task": "create consulting doc",
"input": "paste research or notes here",
"client": "retail ecommerce brand",
"deliverables": ["SWOT analysis", "growth roadmap", "3 quick wins"],
"output_format": "markdown",
"tone": "sharp and practical"
}
23
big tip:
json makes prompt chaining easier.
you can pass outputs as inputs to the next task.
llms understand the âstepsâ like an api.
each step has a key, each value is an instruction.
json makes prompt chaining easier.
you can pass outputs as inputs to the next task.
llms understand the âstepsâ like an api.
each step has a key, each value is an instruction.
24
when you donât want json?
if your goal is creativity, chaos, or surprise.
like dream journaling.
storytelling for kids.
or idea generation without constraints.
json = structure
freeform = chaos
choose based on outcome.
if your goal is creativity, chaos, or surprise.
like dream journaling.
storytelling for kids.
or idea generation without constraints.
json = structure
freeform = chaos
choose based on outcome.
25
json works because it speaks machine language
but it also helps you think clearly.
you define the goal, structure, audience, format upfront.
no back-and-forth.
no 5 tries to get it right.
but it also helps you think clearly.
you define the goal, structure, audience, format upfront.
no back-and-forth.
no 5 tries to get it right.
26
he shift is this:
stop âaskingâ the ai for stuff.
start specifying exactly what you want.
like a builder giving a blueprint.
not a poet throwing vibes.
stop âaskingâ the ai for stuff.
start specifying exactly what you want.
like a builder giving a blueprint.
not a poet throwing vibes.
27
remember:
- json is just structured prompting
- it gives clarity to both you and the model
- it works across tools, models, and formats
- it makes you think like an architect
- and itâs shockingly easy to learn
- json is just structured prompting
- it gives clarity to both you and the model
- it works across tools, models, and formats
- it makes you think like an architect
- and itâs shockingly easy to learn
28
everyone talks about "prompt engineering"
but 90% of results come from
clear structure
+
precise intent
json gives you both.
but 90% of results come from
clear structure
+
precise intent
json gives you both.
29
Want to learn how AI works and automate your work?
Subscribe to our free newsletter here to learn AI:
theprohuman.ai/subscribe
Subscribe to our free newsletter here to learn AI:
theprohuman.ai/subscribe
30
I hope you've found this thread helpful.
Follow me @heyrimsha for more.
Like/Repost the quote below if you can:
Follow me @heyrimsha for more.
Like/Repost the quote below if you can:
View Tweet


