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

Boundary Conditions — What to Do When Information Is Missing

~16 min · instructions, uncertainty, honesty

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

The most common bug: silent confabulation

When information is missing, models default to generating something plausible-sounding. Without an explicit boundary instruction, you will get fabricated quotes, invented statistics, and made-up sources. The fix is not better prompts in general; it's a boundary condition specifically for the missing-information case.

The structure

For every required input, name it explicitly and prescribe the behavior when it's absent. The pattern looks like this:

  1. Enumerate the required inputs.
  2. For each, specify the canonical absence value (null, empty string, missing key).
  3. Specify the response shape when absence is detected.
  4. Forbid generation that would substitute for the missing input.

Why it works

The model is no longer guessing what "missing" means or what to do about it. It has a structured response for the absence case, the same way good code has a structured response for null inputs.

Code

Boundary block (explicit)·markdown
## Required inputs
- {{customer_name}} — string, non-empty
- {{order_id}} — string, must match /^[A-Z]{2}-\d{6}$/
- {{transcript}} — non-empty conversation log

## When inputs are missing
Return JSON only:
{
  "status": "insufficient_context",
  "missing": ["<field name>", ...],
  "hint": "<which earlier step should provide this>"
}
Do not draft a response from partial inputs.

External links

Exercise

Audit one of your prompts for required inputs. Add an explicit boundary block that names absence behavior. Test by running the prompt with each input deliberately removed.

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.