Keep a stable field name across two batches

Use the opposite Shift key for paired punctuation. · 167 words

Structured prompts should normalize names, not merely arrange data. Suppose two store report batches arrive as source details. Batch 1 contains {"source_name":"Harbor Lights","units_sold":120}; batch 2 contains {"title":"City Maps","units_sold":86}. Their source labels differ, but downstream code should receive the same key every time. The prompt asks for one object with top-level keys batch_1 and batch_2. Each value is an array whose items contain exactly book_title and units_sold. It says to map source_name or title to book_title, keep units_sold as a number, and return no extra fields.

The worked output is {"batch_1":[{"book_title":"Harbor Lights","units_sold":120}],"batch_2":[{"book_title":"City Maps","units_sold":86}]}. Validate the two top-level keys, check that both arrays use the same item schema, and confirm both titles land under book_title. A stable name lets one parser handle both batches without a special case for source_name. Teach this pattern by showing each raw batch, naming the canonical field, giving the full schema, and including the expected output. The test should reject batch_2 if it uses title instead of book_title, even though the meaning is correct.

Check your recall

Which canonical title field and which top-level keys should the output use for both batches?

Check your answer

Every title must use the canonical field book_title. The top-level object must contain batch_1 and batch_2, with each value being an array of objects that also includes units_sold.

Sources and credits

Original KeyTouch lesson. Background reading · JSON Schema · Understanding JSON Schema.