C.W.K.
Stream
Lesson 08 of 10 · published

Output Shape Description Before Examples

~14 min · instructions, shape, format

Level 0Apprentice
0 XP0/100 lessons0/14 achievements
0/120 XP to next level120 XP to go0% complete

Describe the shape, then show one

Examples are powerful but ambiguous. "Match this shape" with a single example may anchor on the wrong feature — length, tone, content — instead of the structural one you cared about. The fix is to describe the shape in words before showing the example, so the model knows which axis the example is illustrating.

The shape vocabulary

  • Cardinality — exactly N, at most N, between A and B.
  • Type — string, integer, ISO 8601 date, JSON object, markdown.
  • Required vs optional fields — explicit, not implied.
  • Order — sorted by what, ascending or descending.
  • Constraints — ≤ length, regex, enum.

Example after specification

Once the shape is named, the example clarifies any nuance words couldn't reach. The two together are stronger than either alone.

Code

Shape spec then example·markdown
## Output shape
Return JSON only:
{
  "verdict": "approve" | "reject" | "hold",
  "reason_codes": string[]   // 1–3 codes from the enum below
}

Enum: [low_confidence, missing_evidence, policy_block, ok]

## Example
Input: "Customer is asking for a refund on a 2024 order outside the 30-day window."
Output: {"verdict": "reject", "reason_codes": ["policy_block"]}

External links

Exercise

Take an existing prompt with an example but no shape spec. Add a one-paragraph shape specification above the example. Compare outputs on five inputs.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.