The Anatomy of a JSON Prompt

{
"task": "what to do",
"input": "your data",
"output": "desired format"
}

Basic JSON anatomy is:

  1. Keys = labels (always in quotes)
  2. Values = your actual data or instructions
  3. {} = container for objects
  4. [] = container for lists
  5. , = separator between items

Example 1

The prompt to summarize an article in 100 words for a college audience:

{
"task": "summarize",
"text": "[paste article]",
"audience": "college students",
"max_words": 100
}

Example 2

This data extraction prompt pulls out the name, company, issue type, and priority level of bugs.

{
"task": "extract",
"text": "Email from John at Acme Corp about urgent bug in login system",
"extract": {
"name": "string",
"company": "string",
"issue": "string",
"priority": "high/medium/low"
}

Full Tutorial - https://x.com/itsalexvacca/status/1948389413861646458