b567cca425
子主题目录从 topics/{slug} 移至 topics/qunar-ai-fullstack/{slug}
前端 fetch 路径改用 subtopic.path 字段
Co-Authored-By: Claude Code <noreply@anthropic.com>
218 lines
6.0 KiB
JSON
218 lines
6.0 KiB
JSON
{
|
||
"topic": "ai-structured-output",
|
||
"type": "single_choice",
|
||
"schema_version": "1.0.0",
|
||
"generated": "2026-09-02T00:00:00Z",
|
||
"questions": [
|
||
{
|
||
"id": "sc-001",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "哪种结构化输出方法能 100% 保证符合 Schema?",
|
||
"explanation": "Structured Output 使用受限解码屏蔽非法 token,保证 100% 符合 Schema。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "JSON Mode",
|
||
"B": "Structured Output(受限解码)",
|
||
"C": "后处理 + 重试",
|
||
"D": "分步生成"
|
||
},
|
||
"answer": "B"
|
||
},
|
||
{
|
||
"id": "sc-002",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "哪种 Agent 模式最适合需要全局规划后再执行的复杂任务?",
|
||
"explanation": "Plan-and-Execute 先制定完整计划,再逐步执行,适合需要全局规划的复杂任务。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "ReAct",
|
||
"B": "Reflexion",
|
||
"C": "Plan-and-Execute",
|
||
"D": "Multi-Agent"
|
||
},
|
||
"answer": "C"
|
||
},
|
||
{
|
||
"id": "sc-003",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "哪种 Agent 模式最适合步骤不确定的通用任务?",
|
||
"explanation": "ReAct 交替进行推理和行动,灵活应对步骤不确定的通用任务。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "Plan-and-Execute",
|
||
"B": "Reflexion",
|
||
"C": "Critic/Verifier",
|
||
"D": "ReAct"
|
||
},
|
||
"answer": "D"
|
||
},
|
||
{
|
||
"id": "sc-004",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "哪种结构化输出方法可靠性中等、灵活性高?",
|
||
"explanation": "JSON Mode 可靠性中等(格式对但内容可能错)、灵活性高、延迟低。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "Structured Output",
|
||
"B": "Function Calling",
|
||
"C": "JSON Mode",
|
||
"D": "分步生成"
|
||
},
|
||
"answer": "C"
|
||
},
|
||
{
|
||
"id": "sc-005",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "哪种 Agent 模式包含两个独立的 Agent——一个执行、一个审查?",
|
||
"explanation": "Critic/Verifier 模式使用执行 Agent + 审查 Agent 来实现高可靠性。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "ReAct",
|
||
"B": "Multi-Agent",
|
||
"C": "Critic/Verifier",
|
||
"D": "Reflexion"
|
||
},
|
||
"answer": "C"
|
||
},
|
||
{
|
||
"id": "sc-006",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "以下哪些结构化输出方法的可靠性为「高」?",
|
||
"explanation": "Structured Output、Function Calling 和分步生成可靠性都为「高」。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "JSON Mode 和后处理+重试",
|
||
"B": "Structured Output、Function Calling 和分步生成",
|
||
"C": "仅 Structured Output",
|
||
"D": "所有五种方法"
|
||
},
|
||
"answer": "B"
|
||
},
|
||
{
|
||
"id": "sc-007",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "严格的 JSON Schema 应该包含哪些约束?",
|
||
"explanation": "最佳实践推荐使用 required、enum 约束和 additionalProperties: false。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "additionalProperties: true,无 required 字段",
|
||
"B": "required、enum 和 additionalProperties: false",
|
||
"C": "仅 type 定义,无约束",
|
||
"D": "所有字段使用通配符"
|
||
},
|
||
"answer": "B"
|
||
},
|
||
{
|
||
"id": "sc-008",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "后处理+重试方法的可靠性等级是?",
|
||
"explanation": "后处理+重试可靠性中等——解析失败触发重试,但不能保证正确性,延迟也不确定。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "高",
|
||
"B": "中",
|
||
"C": "低",
|
||
"D": "不确定"
|
||
},
|
||
"answer": "B"
|
||
},
|
||
{
|
||
"id": "sc-009",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "哪种 Agent 模式涉及多个 Agent 协作,各司其职?",
|
||
"explanation": "Multi-Agent 使用多个 Agent 协作,各自承担专门角色,适合复杂系统。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "ReAct",
|
||
"B": "Reflexion",
|
||
"C": "Plan-and-Execute",
|
||
"D": "Multi-Agent"
|
||
},
|
||
"answer": "D"
|
||
},
|
||
{
|
||
"id": "sc-010",
|
||
"type": "single_choice",
|
||
"difficulty": 3,
|
||
"tags": [
|
||
"ai",
|
||
"structured-output",
|
||
"agent"
|
||
],
|
||
"question": "受限解码中,每步 token 生成时会发生什么?",
|
||
"explanation": "每步根据当前状态和 Schema 约束屏蔽非法 token,模型只能从合法 token 中采样。",
|
||
"source": null,
|
||
"related": [],
|
||
"options": {
|
||
"A": "模型生成任意 token 然后验证",
|
||
"B": "根据当前状态和 Schema 约束屏蔽非法 token",
|
||
"C": "模型输出完整 JSON 后校验",
|
||
"D": "独立的验证模型对每个 token 打分"
|
||
},
|
||
"answer": "B"
|
||
}
|
||
]
|
||
} |