课堂-结构化提问与输出验证Lesson - Structured Prompting and Output Verification
课堂教案 · 约 15 分钟Lesson plan · about 15 min · 引用核验 2026-11-07(仅引用链接与日期) · 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.
能写出含目标、输入、输出字段、禁止事项四部分的指令。
能用字段清单或 JSON Schema 校验结构,并说明校验只覆盖格式。
能把每个事实字段回连到原文位置,无依据的字段留空或标未知。
能说明少样本示例只进入当次上下文,不等于重新训练模型。
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.
微软 Learn《Prompt engineering techniques》:系统消息、少样本示例与指令位置的官方口径。
微软 Learn《How to use structured outputs》:结构化输出遵循调用方给的 JSON Schema。
JSON Schema 官方站:查字段类型与必填项的写法。
一份虚构活动通知原文(约 200 字)+字段清单:时间、地点、主题、报名方式。
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.
- 3 分钟基线:各组自由提问一次,保存原始输出,不改指令。
- 4 分钟改写:把指令补成四部分,禁止事项要可判定,例如不得添加原文没有的费用。
- 4 分钟校验:先查结构是否合法,再逐字段回连原文,标出无依据项。
- 4 分钟对照:比较两次的字段完整度与事实一致度,说明差异来自哪一部分指令。
- 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.
把「输出是合法 JSON」当成「字段值正确」;官方文档区分 JSON 模式与按 schema 的结构化输出。
把「给了示例」当成「模型学会了」;示例只影响当次推理。
以为加一句「不要编造」就能消除无依据字段;仍要逐字段回连原文。
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.
指令四部分齐全,禁止事项可判定,不含「尽量」「适当」这类无法核对的词。
输出字段逐项标注「原文支持」或「原文未提供」,无依据项不得填猜测值。
能口头说明结构校验与事实核对各自拦住了什么,两者不能互相替代。
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.
课堂练习:对同一份活动通知先自由提问,再用「目标/输入/输出字段/禁止事项」重写。合法 JSON 里若出现原文没有的费用,标为无依据并留空。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
提示词Prompt 系统提示System Prompt 结构化输出Structured Output 上下文学习In-context Learning 幻觉Hallucination
课堂-AI 能力与边界入门Lesson - AI Capabilities and Limits · 怎么向 AI 提问How to Ask AI · 怎么把提示词写结构How to Structure a Prompt · few-shot 示例怎么选How to Pick Few-Shot Examples