|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "title": "ModelProfile", |
| 4 | + "description": "LLM 合成的模型画像(判断层),作为 profile 字段嵌入 models.jsonl 宿主记录。爬取后按 _meta.sourceHash 增量重编译。事实字段(openSource/callModes/familyComparison)由脚本机械注入,LLM 只写判断字段。字段值三态语义:缺失=未知;null=不适用(仅 familyTier/familyComparison 两处允许);有值=已知。", |
| 5 | + "$comment": "生成期校验清单(schema 无法表达,编译脚本必须执行):1) pipelineRole 的 from/to 与宿主 inferenceMetadata 的 request/response_modality 一致;2) 家族 itemCount>=2 时 familyTier/familyComparison 必为非 null,itemCount==1 时必为 null;3) familyComparison 按家族生成一段后扇出到族内全部成员,保证副本一致;4) 事实字段由脚本注入,禁止 LLM 生成。", |
| 6 | + "type": "object", |
| 7 | + "additionalProperties": false, |
| 8 | + "required": ["profileCompleteness", "_meta"], |
| 9 | + "properties": { |
| 10 | + "profileCompleteness": { |
| 11 | + "type": "string", |
| 12 | + "enum": ["full", "partial", "structured-only"], |
| 13 | + "description": "full=判断字段齐备(含负面清单与档位);partial=有定位和场景;structured-only=仅由结构化规格推导,未读过文档" |
| 14 | + }, |
| 15 | + "oneLinePositioning": { |
| 16 | + "type": "string", |
| 17 | + "minLength": 4, |
| 18 | + "maxLength": 50, |
| 19 | + "description": "一句话定位(≤50字),用用户能理解的语言,禁止官方套话" |
| 20 | + }, |
| 21 | + "scenes": { |
| 22 | + "type": "array", |
| 23 | + "minItems": 1, |
| 24 | + "uniqueItems": true, |
| 25 | + "items": { |
| 26 | + "type": "string", |
| 27 | + "enum": [ |
| 28 | + "代码生成", "创意写作", "客服对话", "知识问答", "文档理解", |
| 29 | + "数据分析", "数学推理", "翻译", "图像生成", "图像编辑", |
| 30 | + "视频生成", "视频编辑", "语音合成", "语音识别", "实时对话", |
| 31 | + "Agent编排", "深度研究", "教育辅导", "电商营销", "角色扮演", |
| 32 | + "3D生成", "向量检索", "数字人", |
| 33 | + "音乐生成", "人脸人像", "虚拟试穿", "OCR文字识别", |
| 34 | + "情感分析", "意图识别", "图像修复", "语义重排" |
| 35 | + ] |
| 36 | + }, |
| 37 | + "description": "适用场景标签(受控词表)。通用场景 23 个 + 垂直场景 8 个" |
| 38 | + }, |
| 39 | + "notSuitableFor": { |
| 40 | + "type": "array", |
| 41 | + "uniqueItems": true, |
| 42 | + "items": { "type": "string", "maxLength": 40 }, |
| 43 | + "description": "不适用场景(自由文本负面清单)。空数组 [] 表示「无已知限制」;字段缺失表示「未知」" |
| 44 | + }, |
| 45 | + "styleKeywords": { |
| 46 | + "type": "array", |
| 47 | + "maxItems": 5, |
| 48 | + "uniqueItems": true, |
| 49 | + "items": { "type": "string", "maxLength": 12 }, |
| 50 | + "description": "风格关键词" |
| 51 | + }, |
| 52 | + "familyTier": { |
| 53 | + "enum": ["flagship", "balanced", "lightweight", null], |
| 54 | + "description": "同族内的规模-质量档位。null=单模型家族不适用(≠未知;专用性由 scenes/pipelineRole 承载)。同族 ≥2 个模型时必填非 null 值(生成期校验)" |
| 55 | + }, |
| 56 | + "familyComparison": { |
| 57 | + "type": ["string", "null"], |
| 58 | + "maxLength": 200, |
| 59 | + "description": "同族对比摘要(2-3句)。null=单模型家族不适用(≠未知)。生成纪律:每族生成一段后由脚本扇出到族内全部成员,保证族内副本一致" |
| 60 | + }, |
| 61 | + "openSource": { |
| 62 | + "type": "boolean", |
| 63 | + "description": "是否开源。脚本从 families.jsonl 的 description 检测「开源」关键词机械注入;检测须排除否定表述(如「不开源」「非开源」);description 无明确信号时省略本字段(未知),宁缺勿错。注意该推断是家族级的,族内成员共享同一值" |
| 64 | + }, |
| 65 | + "callModes": { |
| 66 | + "type": "array", |
| 67 | + "minItems": 1, |
| 68 | + "uniqueItems": true, |
| 69 | + "items": { |
| 70 | + "type": "string", |
| 71 | + "enum": ["sync", "async", "streaming", "realtime"] |
| 72 | + }, |
| 73 | + "description": "支持的调用模式(可多值并存)。脚本从 groups/<slug>.json 的 samples 推导" |
| 74 | + }, |
| 75 | + "pipelineRole": { |
| 76 | + "type": "array", |
| 77 | + "uniqueItems": true, |
| 78 | + "items": { |
| 79 | + "type": "object", |
| 80 | + "additionalProperties": false, |
| 81 | + "required": ["from", "to", "role"], |
| 82 | + "properties": { |
| 83 | + "from": { "$ref": "#/$defs/modality" }, |
| 84 | + "to": { "$ref": "#/$defs/modality" }, |
| 85 | + "role": { |
| 86 | + "type": "string", |
| 87 | + "maxLength": 30, |
| 88 | + "description": "语义角色,如「分镜描述生成」「画面转视频」" |
| 89 | + } |
| 90 | + } |
| 91 | + }, |
| 92 | + "description": "流水线角色。from/to 须与宿主记录 inferenceMetadata 的 request/response_modality 一致(生成期校验)" |
| 93 | + }, |
| 94 | + "_meta": { |
| 95 | + "type": "object", |
| 96 | + "additionalProperties": false, |
| 97 | + "required": ["generatedAt"], |
| 98 | + "properties": { |
| 99 | + "generatedAt": { |
| 100 | + "type": "string", |
| 101 | + "format": "date-time", |
| 102 | + "description": "本条 profile 的生成时间(ISO 8601)" |
| 103 | + }, |
| 104 | + "sourceHash": { |
| 105 | + "type": "string", |
| 106 | + "maxLength": 16, |
| 107 | + "description": "全部输入源的内容哈希前 16 位,用于增量重编译判断。哈希输入必须覆盖喂进 profile 的所有来源:family description、wiki excerpts、groups/<slug>.json 的 samples 键名集合(callModes 的输入)、宿主 inferenceMetadata(pipelineRole 校验的输入)。任一来源变化都应触发重编译" |
| 108 | + }, |
| 109 | + "generatorVersion": { |
| 110 | + "type": "string", |
| 111 | + "maxLength": 20, |
| 112 | + "description": "编译脚本版本号,如 1.0.0" |
| 113 | + } |
| 114 | + }, |
| 115 | + "description": "元信息(脚本注入,非 LLM 生成)。用于增量编译判断和画像腐化检测" |
| 116 | + } |
| 117 | + }, |
| 118 | + "allOf": [ |
| 119 | + { |
| 120 | + "if": { |
| 121 | + "properties": { "profileCompleteness": { "const": "full" } } |
| 122 | + }, |
| 123 | + "then": { |
| 124 | + "required": ["oneLinePositioning", "scenes", "notSuitableFor", "familyTier"] |
| 125 | + } |
| 126 | + }, |
| 127 | + { |
| 128 | + "if": { |
| 129 | + "properties": { "profileCompleteness": { "const": "partial" } } |
| 130 | + }, |
| 131 | + "then": { |
| 132 | + "required": ["oneLinePositioning", "scenes"] |
| 133 | + } |
| 134 | + } |
| 135 | + ], |
| 136 | + "$defs": { |
| 137 | + "modality": { |
| 138 | + "type": "string", |
| 139 | + "enum": ["Text", "Image", "Video", "Audio"] |
| 140 | + } |
| 141 | + } |
| 142 | +} |
0 commit comments