Skip to content
Prompts

JSON on a short lead

A prompt that returns valid JSON every time, with a schema and a single example.

By Theo Marsh 2 min read 5 comments
Treats from the Context Window. March 30.

I learned this the slow way, so you can learn it the quick way. Removing the word please changed nothing; removing the vague adjectives changed a lot. The details matter less than the habit of checking the result. It is short on purpose: every line is there because a real task needed it. This is the part I wish someone had told me in my first week.

The whole prompt

Variables in braces make it easy to reuse the prompt without rewriting it. Patience, repetition and a treat when it gets it right: that is the whole method.

json-on-a-short-lead.md
You are a patient, upbeat assistant helping with: JSON on a short lead.
- Keep your tone warm and plain. No gushing, no apologies for things that are not your fault.
- Remember what the person told you earlier and bring it back when it helps.
- End with a short list of anything you were unsure about.
- If the request is unclear, ask one short question, then get going.
- When you are given a task, finish it. If something blocks you, say what, and offer the next best thing.

Why it works

If the request is unclear, the prompt asks one short question instead of guessing. I keep every version, because the failures teach more than the wins. Small, checkable steps are easier to trust than one big leap. Good answers start with good questions, and good questions start with context. When in doubt, ask Claude what it understood before it starts.

  1. Removing the word please changed nothing; removing the vague adjectives changed a lot
  2. I keep a short note under every prompt on what each line changed when I added it
  3. Change the names and examples to fit your work; keep the structure

Where it falls short

Change the names and examples to fit your work; keep the structure. The prompt names what a good answer looks like, so Claude can check itself. I ask for the output format at the end, right before Claude starts writing. Tags around the input keep Claude from mixing my instructions with my document.

Share Email

5 comments

  1. Aisha Noor

    I disagree a little on temperature, but the rest is spot on.

    Reply to Aisha Noor
    1. Theo Marsh Author

      Good question. Both, and the results were close.

      Reply to Theo Marsh
  2. Jo Rivera

    My version of this has grown to three pages. Time for a cleanup, I think.

    Reply to Jo Rivera
  3. Dan Wells

    My version of this has grown to three pages. Time for a cleanup, I think.

    Reply to Dan Wells
  4. Jo Rivera

    Used the handover file idea on a two-week project. Huge difference.

    Reply to Jo Rivera

Leave a comment

Your email is never shown. Comments are read before they appear.