%%{init: {"flowchart": {"wrappingWidth": 680}}}%% flowchart TB %% 依据:lpt-ai src/llm/recall.ts recallHintRules(3 条常量)、recallPrompt()、task-queue.ts#callOptionsFor。 %% 文案为源码原文,仅插入换行。校验与已定位缺陷见 retry 图。 classDef src fill:#ffe1e1,stroke:#c0392b,stroke-width:3.5px,color:#7b1414 classDef api fill:#e8f0fe,stroke:#1a56b0,stroke-width:1.2px,color:#111 classDef take fill:#e7f6ea,stroke:#2e8b57,stroke-width:1.2px,color:#14532d classDef use fill:#f3f0fb,stroke:#6b4fa0,stroke-width:1.2px,color:#3b2a63 classDef origin fill:#fff3cd,stroke:#b8860b,stroke-dasharray:4 3,color:#664d03 classDef note fill:#f7f7f7,stroke:#999,stroke-dasharray:4 3,color:#333 classDef warn fill:#ffe1e1,stroke:#c0392b,stroke-width:2.2px,color:#7b1414 S["「入口」system = 公共 10 条 + recallHintRules 3 条"]:::api H1["1. HINT: kind=HINT,findings=[],analysisStatus=PARTIAL。
assessments可为空数组,只保留实际判定,不为未选单位补全判断;
若提供提示引用单位的判定,必须为ANALYZED,
不能引用EXCLUDED/UNANALYZED或APPLICATION。"]:::use H2["2. hints:[{id,form:"KEYWORD"#124;"QUESTION"#124;"LEAF"#124;"TREE",
clue:string(不超过120字符),anchorNodeId:string|null,
nodes:[{id,parentId:string|null,text:string(不超过80字符)}],
citations:[{unitId,start,end,quote}]}]。"]:::use H3["3. 仅用户选择 hintForm,不逐级解锁、不缩小范围。
最多3项,每项至少1引文。
KEYWORD/QUESTION nodes=[] 且 anchorNodeId=null;
LEAF 恰好1节点且 anchorNodeId 必填;TREE 单根无环小树且 anchorNodeId 必填。
anchorNodeId 必须是本次 expression 中已存在的节点 id(可直接是根节点),
表示提示挂在该节点下,不得新造。
parentId 只能引用同一条提示自己的 nodes 内的节点 id,不得引用 expression 中的节点;
每条提示必须有且只有1个 parentId=null 的根,其余节点沿 parentId 连到该根。
全部nodes最多5,节点与item id稳定非空唯一。
没有可靠线索可返回空hints与限制,不假称成功。"]:::use S --> H1 --> H2 --> H3 --> MSG["「源」user 消息
type=recall-hint,其余字段同公共入参"]:::origin OPT["「说明」chat 调用参数
temperature=0.2、max_tokens=4096
reasoning_effort 按非 system 字符数分档:
<500 none;≥500 low;≥2000 high;≥8000 max"]:::note OPT -.-> S X["「说明」HINT 的「提示结构」校验与失败阶段见 retry 图,
已定位缺陷见 defect 图"]:::note H2 -.-> X