Skip to main content

Lesson - Structured Prompting and Output Verification

Lesson plan · about 15 min · refs checked 2026-11-07 (reference links and dates only)

Learners ask about the same material freely first and then with a structured prompt, compare field completeness and factual consistency, and remember that valid format does not mean correct content.

Lesson objectives
Write an instruction with four parts: goal, inputs, output fields and prohibitions. Validate structure with a field list or JSON Schema and explain that validation covers format only. Link every factual field back to a source location; leave unsupported fields empty or marked unknown. Explain that few-shot examples enter only the current context and do not retrain the model.
Materials
Microsoft Learn Prompt engineering techniques: official guidance on system messages, few-shot examples and instruction placement. Microsoft Learn How to use structured outputs: structured outputs follow the caller-provided JSON Schema. JSON Schema official site: check how field types and required items are written. A fictional event notice of about 200 words plus a field list: time, place, topic, registration method.
Steps
    3-minute baseline: each group asks freely once, saves the raw output and does not change the instruction. 4-minute rewrite: complete the four parts; prohibitions must be decidable, such as do not add fees absent from the source. 4-minute validation: first check structural validity, then link each field to the source and mark unsupported items. 4-minute comparison: compare field completeness and factual consistency across the two runs and explain which instruction part caused the difference.
Common misconceptions
Treating valid JSON as correct field values; official documentation distinguishes JSON mode from schema-based structured outputs. Treating given examples as the model having learned; examples affect only the current inference. Believing one do not fabricate sentence removes unsupported fields; each field still needs a source link.
Assessment checks
The instruction has all four parts and decidable prohibitions, without uncheckable words such as try to or appropriately. Each output field is marked source-supported or not provided by the source; unsupported fields must not contain guesses. Learners can explain what structural validation and factual checking each catch, and that neither replaces the other.

Example and interpretation

A teaching scenario, not a measured or executed site test.

Class exercise: ask about the same event notice freely, then rewrite with goal, inputs, output fields and prohibitions. If valid JSON contains a fee absent from the source, mark it unsupported and leave it empty.

How to check your practice

Explain the example in your own words, inspect input constraints, then verify against the source. Revisit concepts if you cannot explain why; supply missing dates, fields or permissions; withdraw unsupported conclusions.

For this topic, start with unchecked output · See all six scenarios and their reasoning

Sources
  • Microsoft Learn: Prompt engineering techniques ↗
  • Microsoft Learn: How to use structured outputs ↗
  • JSON Schema official site ↗