成都渤溢云拓科技有限公司 · 技术研究中心 / Boyi Yuntuo Technology Co., Ltd. — Research Center, Chengdu
面向企业经营决策的智能系统,其瓶颈不在单次生成质量,而在跨会话的事实一致性、证据可追溯性与结论可放行性。本文形式化描述 AFCOS(企业连续经营智能系统):以「企业认知账本」为认知基座、以受控智能体循环为编排核心、以多阶段流水线为交付形态。本文给出系统五元组定义、混合召回的加权融合与召回下界、基于 bigram-Jaccard 与阶段谓词的事实冲突判定算子、记忆权重的指数衰减模型、上下文装配的 0-1 背包形式化,以及工具选择的 UCB 决策模型。训练侧描述一条以教师推理链为监督信号的专家思维链蒸馏流水线,包含拒绝采样、软标签蒸馏与 DPO 偏好对齐。最后给出评测集构建、七项可观测指标、四类失败模式与放行门禁。
关键词 企业认知账本 · 连续经营智能系统 · 思维链蒸馏 · 直接偏好优化 · 混合检索 · 智能体编排
参谋能力通常被归因于模型规模。但在企业场景中,决策质量的上界由三个约束共同决定:事实是否现行有效、证据是否可回溯、系统是否敢于在证据不足时拒绝结论。这三者都不是参数量问题。
本文不讨论模型能力本身,而讨论承载模型的结构。我们沿三个层次展开:认知层如何形式化存储事实;编排层如何在预算约束下选择能力;交付层如何将结论转化为可校验的成果。与既有工作相比,本文的差异在于把"企业事实的时效性与作用域"作为一等公民纳入系统设计。
定义 1(系统五元组) 系统状态由记忆集合、企业上下文、知识图谱、编排层与交付层构成:
其中 m 为认知账本条目,c 为企业上下文(行业、规模、阶段),K 为知识图谱,Lc、Lo、Ld 分别为认知、编排、交付三层。
定义 2(认知账本条目) 一条记忆是七元组 m =(k, v, σ, w, src, r, a),分别为事实键、事实值、作用域 σ∈{GLOBAL, COMPANY}、权重 w∈[0,1]、来源标识、引用计数、有效性标志。
定义 3(策略动作) 编排层在时刻 t 的动作由策略 π 给出:
其中 ht 为对话历史,Mt 为可用记忆子集,T 为工具集合。动作空间同时包含能力调用与"终止"两类。
稀疏通道(BM25)对专名、金额、型号敏感;稠密通道(向量)对同义改写鲁棒。二者线性融合:
其中 BM25 的具体形式为:
融合权重取 α=0.4,即稠密通道主导、稀疏通道兜底。该取值适用于记忆条目偏短、语义分布集中的场景。作为对照,倒数排名融合不依赖分数尺度:
RRF 的优点是无量纲、抗分数漂移,缺点是在候选分布陡峭时丢失强度信息。工程上的选择取决于候选池规模与分数校准质量。
更新记忆时的核心风险不是"记不住",而是把新事实误判为冲突,或把冲突误判为等价。文本相似度采用 bigram 集合的 Jaccard 系数:
判定算子要求三个谓词同时成立:槽位一致、阶段一致、数值不一致。设 P(·) 为阶段标记词映射、N(·) 为数值序列抽取算子,则冲突判据为:
冲突(a,b) ⇔ 同一槽位(a,b) ∧ P(a)=P(b) ∧ N(a)≠N(b)
| 情形 | 槽位 | 阶段 | 数值 | 判定 |
|---|---|---|---|---|
| "12 间房" vs "十二间房" | 一致 | 一致 | 等价 | EQUIVALENT(合并) |
| "去年 35%" vs "今年 42%" | 一致 | 不同 | 不同 | NONE(并存) |
| "团队规模 30 人" vs "流失率 30 人" | 不同 | 一致 | 相同 | NONE(不同事实) |
该算子采取保守策略:宁可漏报冲突,也不制造伪冲突。原因是伪冲突会触发频繁人工确认,显著提高用户放弃率。
条目的检索优先级随时间与引用情况变化,采用指数衰减叠加对数增益:
其性质:t→∞ 时 w 收敛于 βln(1+ref),即被反复验证的事实存在非零下限;从未被引用者趋近于 0,在排序中被自然淘汰。
双通道融合的价值不仅是效果提升,更在于错误不同源:稀疏通道错在语义泛化,稠密通道错在专名精确性。若二者错误近似独立,融合召回满足:
当两通道存在正相关(例如索引同源)时需减去修正项 ε,ε 随候选池重叠度上升。工程含义是:让两个通道读不同的数据视图,比在同一视图上更换模型更能提升召回。
嵌入维度直接影响存储、检索延迟与召回质量。我们用归一化维度作为成本指标:
在 1024 维、单机检索的场景下,维度提升带来的召回增益已明显小于延迟代价。因此我们选择"中等维度 + 混合检索 + 重排"的组合,而非单纯堆维度。
上下文窗口是有限预算 B。设片段 i 的效用为 ui、token 开销为 τi,装配即求解:
该问题是 0-1 背包。精确求解无必要(ui 本身为估计值),线上采用按 ui/τi 降序的贪心近似,复杂度 O(n log n)。
第 t 轮的动作选择建模为多臂老虎机,采用 UCB1:
第一项利用历史成功率,第二项为冷门工具保留探索预算。工程约束:工具按场景分组挂载,全局可见工具数受控——经验上超过 20 个后误选率显著上升。
背包模型假设效用随长度线性,与实际不符:片段的信息量随长度边际递减。故改写为凹函数:
含义是:短而准的片段性价比高,长而泛的片段应先截断再评估。这解释了为什么"摘要 + 按需检索"通常优于"整份文档塞入上下文"。
本节回答一个具体问题:专家的推理过程如何被训练进模型。
对每个问题 x,以温度 T 采样 m 条推理链 {ci},由判别器 r(x,c,y)∈{0,1} 过滤。判别依据三条:结论是否可溯源、步骤是否自洽、是否遗漏必要澄清。保留的三元组构成轨迹集 τ。采样预算与成本的关系为:
其中 ce 为单次生成成本、cg 为判别成本、ppass 为通过率。通过率过低时应先修判别器,而不是无脑加大采样量。
式中 c 为推理链,条件项 c<t 表示自回归前缀,使模型学习"先想后答"的生成顺序,而非直接拟合结论。
软标签保留了"次优解也接近正确"的信息,在存在多解的经营问题上尤为关键。
并施加 KL 正则以抑制对齐阶段的语言能力退化:
偏好数据来自真实使用中的"采纳 / 改写 / 弃用"信号,而非人工构造,因此分布与线上一致。
只喂领域数据会导致通用能力塌缩,只喂通用数据则学不到领域判断。训练按配比混合并采用两阶段课程:
第一阶段以通用指令数据为主,保留语言与推理能力;第二阶段提高领域轨迹权重,学习判断方式;两阶段均固定混入约两成通用数据以抑制遗忘。课程顺序对最终效果的影响大于配比本身。
第 6 层(反馈)是分水岭:无反馈时数据集合单调膨胀且陈旧;有反馈时可获得"事实是否仍生效"的一阶信息,进而修正权重与有效性标志。
| 层 | 算法 | 复杂度 |
|---|---|---|
| L1 混合召回 | BM25 + HNSW,线性融合 | O(log n) + O(n log n) |
| L2 冲突判定 | bigram-Jaccard + 三谓词 | O(|V|) |
| L3 权重衰减 | 指数衰减 + 对数增益 | O(1) |
| L4 上下文装配 | 0-1 背包贪心近似 | O(n log n) |
| L5 工具选择 | UCB1 | O(|T|) |
| L6 结构化生成 | Schema 约束 + 重试降级 | O(k·L) |
| L7 事实校验 | 三元门禁 | O(n) |
其中 L1 的主导开销是向量近邻检索;L4 与 L5 在请求内完成,属常数级;L6 的重试上限 k 直接决定尾部延迟(经验值 2–3)。
生成侧另加两层约束:约束解码(输出须满足 Schema)与门禁(证据不足不放行)。健康度与放行条件为:
评测集由三部分构成:回归集(历史问题 + 标准答案,防退化)、标注集(专家逐条标注,评估上限)、线上集(真实流量抽样,监控效果)。标注集须先做一致性检验:
低于阈值(经验值 0.7)的条目退回重标,否则评测结论不可信。检索侧采用排序指标:
认知侧关注 Cr(冲突率)与 Sc(来源覆盖率);交付侧关注 CSR 与门禁通过率。四类指标共同构成回归测试集。
| 失败模式 | 表现 | 检测手段 |
|---|---|---|
| 检索未命中 | 回答流畅但与用户企业无关 | Recall_c 偏低 + 命中日志 |
| 跨作用域污染 | 引用到其他企业的事实 | 作用域断言审计(应为 0) |
| 冲突未识别 | 使用过期口径且语气笃定 | Conflict_r 上升 + 人工抽检 |
| 长任务漂移 | 多阶段报告前后前提不一致 | 阶段间一致性校验 |
四类失败的共同点是不会抛异常,只能靠指标与审计发现。因此系统必须自带观测,而不是依赖用户反馈。
定义 4(可复制性) 设系统能力 C = f(Dtraj, Dpref, E, K),分别为专家轨迹集、偏好数据集、领域评测集与工程知识。若任意三者可公开获得,则系统可复制;否则不可复制。
| 资产 | 来源 | 公开可获得 | 复制难度 |
|---|---|---|---|
| 专家轨迹 | 专家 + 强模型协同、逐条校验 | 否 | 高 |
| 偏好数据 | 真实使用中的采纳/改写/弃用 | 否 | 高(依赖用户规模) |
| 领域评测集 | 长期回归积累 | 否 | 中高 |
| 工程知识 | 架构与调参经验 | 部分 | 中 |
由此可解释:用通用语料做监督微调,只能学到"像专家说话的语气",学不到"像专家思考的步骤"。三个可量化差距为:
Δ 是判断"是否真的训练出来"的唯一客观依据。工程纪律是:任何能力提升必须在固定评测集上给出 Δ,否则不进入对外表述。
第一,权重衰减参数缺乏理论最优解。λ 与 β 依赖经验设定,其最优值应与行业信息半衰期相关,需按行业标定。
第二,伪冲突与漏报不可同时最小化。本文选择保守判定,代价是部分真实变更被当作并存事实处理,长期可能积累冗余条目。
第三,思维链蒸馏的可解释性有限。学生模型的内部表征与显式推理链的一致性尚缺量化手段。
本文提出并形式化描述 AFCOS:以认知账本承载企业事实,以受控循环承载能力编排,以多阶段流水线承载成果交付,以专家思维链蒸馏获得垂域表达能力。核心判断是——能力靠微调,事实靠检索,结论靠门禁。模型可替换,认知结构、方法资产与反馈闭环不可替换。
| 符号 | 含义 |
|---|---|
| m | 认知账本条目(七元组) |
| σ | 作用域 GLOBAL / COMPANY |
| α | 混合召回稀疏通道权重(0.4) |
| J(·,·) | bigram-Jaccard 相似度 |
| P(·), N(·) | 阶段谓词、数值抽取算子 |
| λ, β | 衰减系数、引用增益系数 |
| B, τi | 上下文 token 预算、片段开销 |
| Q(a), na | 动作价值、动作调用次数 |
| Cr, Sc, Rc | 冲突率、来源覆盖率、记忆命中率 |
| 参数 | 取值 | 说明 |
|---|---|---|
| α(稀疏权重) | 0.4 | 语义为主、词法兜底 |
| 嵌入维度 | 1024 | 与嵌入模型一致 |
| k(RRF 常数) | 60 | 工业常用值 |
| λ(衰减) | 0.01–0.1 | 按行业信息半衰期标定 |
| β(引用增益) | 0.2–0.3 | 控制抬升幅度 |
| maxIters | 显式配置 | 不依赖 SDK 默认值 |
| k₁, b(BM25) | 1.2, 0.75 | 经典取值 |
| 单轮提取上限 | 3 条 | 宁缺勿滥 |
Enterprise decision intelligence systems are bounded less by single-turn generation quality than by cross-session factual consistency, evidence traceability, and the admissibility of conclusions. We formalize AFCOS (AFU Continuous Operations Intelligence System): a cognition ledger as the factual substrate, a controlled agent loop as the orchestration core, and a multi-stage pipeline as the delivery form. We give the five-tuple system definition, a dual-channel hybrid retrieval formulation with a reliability bound, a bigram-Jaccard conflict operator with phase predicates, an exponential weight-decay model, a 0-1 knapsack formulation of context packing, and a UCB tool-selection policy. On the training side we describe an expert chain-of-thought pipeline — rejection sampling, supervised fine-tuning with reasoning chains, soft-label distillation, and DPO alignment — together with data mixture and curriculum. We close with evaluation design, seven observable metrics, four failure modes, and an admissibility gate.
Keywords enterprise cognition ledger · continuous decision intelligence · chain-of-thought distillation · direct preference optimization · hybrid retrieval · agent orchestration
Advisory capability is commonly attributed to model scale. In enterprise settings, however, the upper bound of decision quality is set by three constraints: whether facts are currently valid, whether evidence is traceable, and whether the system refuses conclusions when evidence is insufficient. None of these is a parameter-count problem.
This report concerns the structure that carries the model rather than the model itself: how the cognition layer stores facts formally, how the orchestration layer selects capabilities under a budget, and how the delivery layer converts conclusions into verifiable artifacts. Our departure from prior practice is treating the temporal validity and scope of enterprise facts as first-class design objects.
Definition 1 (System five-tuple). The system state comprises the memory set, enterprise context, knowledge graph, and the orchestration and delivery layers:
where m is a ledger entry, c the enterprise context, K the knowledge graph, and L the three layers.
Definition 2 (Ledger entry). A memory item is a seven-tuple m = (k, v, σ, w, src, r, a): fact key, fact value, scope, weight, source, reference count, validity.
Definition 3 (Policy action).
Sparse retrieval (BM25) is sensitive to proper nouns, amounts and model numbers; dense retrieval is robust to paraphrase. We fuse them linearly:
with BM25 expanded as:
We set α = 0.4 so that the dense channel dominates. As a scale-free alternative, reciprocal rank fusion is:
RRF avoids score calibration but discards magnitude information when the candidate distribution is steep.
The main risk in memory updates is not forgetting but misjudging: treating a new fact as a conflict, or a conflict as an equivalent restatement. Text similarity uses bigram Jaccard:
A conflict requires three predicates to hold simultaneously — same slot, same phase, different numeric content:
conflict(a,b) ⇔ sameSlot(a,b) ∧ P(a)=P(b) ∧ N(a)≠N(b)
| Case | Slot | Phase | Numeric | Verdict |
|---|---|---|---|---|
| "12 rooms" vs "twelve rooms" | same | same | equal | EQUIVALENT |
| "35% last year" vs "42% this year" | same | different | different | NONE (coexist) |
| "headcount 30" vs "attrition 30" | different | same | equal | NONE (different facts) |
The operator is deliberately conservative: we prefer missing a conflict to fabricating one, since false conflicts trigger repeated confirmations and raise abandonment.
As t→∞ the weight converges to βln(1+ref): repeatedly validated facts retain a non-zero floor, while never-cited ones fade out of ranking.
Fusion helps because the two channels err differently. Under approximate independence:
Correlated channels require the correction term ε. The engineering implication: reading two different data views matters more than swapping models on one view.
Beyond 1024 dimensions the recall gain no longer offsets the latency cost in single-node retrieval, so we prefer medium dimension, hybrid retrieval, and reranking.
Exact solving is unnecessary since utilities are estimates; we use a greedy approximation ordered by ui/τi, in O(n log n).
Tool sets are mounted per scenario; beyond roughly twenty globally visible tools the mis-selection rate rises noticeably.
Short precise segments are cost-effective; long diffuse ones should be truncated before evaluation — which is why summaries plus on-demand retrieval beat pasting whole documents.
For each question we sample m reasoning chains at temperature T and filter with a judge r(·)∈{0,1} on three criteria: traceability of the conclusion, step-level self-consistency, and whether required clarifications were raised. The sampling budget follows:
A low pass rate should prompt fixing the judge, not brute-force sampling.
with KL regularization against degradation:
Stage one leans on general instruction data; stage two raises the weight of domain trajectories, with about twenty percent general data mixed in throughout to limit forgetting. Curriculum order matters more than the mixture ratio.
The sixth stage is the divide: without feedback the corpus only grows staler; with feedback the system learns whether a fact is still in force.
| Layer | Algorithm | Complexity |
|---|---|---|
| L1 Hybrid recall | BM25 + HNSW, linear fusion | O(log n) + O(n log n) |
| L2 Conflict | bigram-Jaccard + predicates | O(|V|) |
| L3 Decay | exponential + log gain | O(1) |
| L4 Packing | 0-1 knapsack greedy | O(n log n) |
| L5 Tool selection | UCB1 | O(|T|) |
| L6 Structured output | schema-constrained, retry | O(k·L) |
| L7 Verification | three-predicate gate | O(n) |
L1 is dominated by vector search; L4 and L5 are per-request constants; the retry cap k in L6 governs tail latency (empirically 2–3).
The suite has three parts: a regression set (historical questions with gold answers), an annotated set (expert-labelled, measuring the ceiling), and an online sample (monitoring). Annotation quality is checked by:
Items below 0.7 are re-annotated. Ranking quality uses:
Cognition-side metrics are conflict rate Cr and source coverage Sc; delivery-side metrics are CSR and gate pass rate.
| Mode | Symptom | Detection |
|---|---|---|
| Retrieval miss | Fluent but contextually irrelevant | Low Recall_c + hit logs |
| Cross-scope leakage | Facts from another company | Scope assertions (expect 0) |
| Undetected conflict | Stale figures stated confidently | Rising Conflict_r + spot checks |
| Long-task drift | Inconsistent premises across stages | Inter-stage consistency checks |
None of these throws an exception; they are observable only through metrics and audits.
Definition 4 (Reproducibility). Let capability C = f(Dtraj, Dpref, E, K). If three of the four assets are publicly obtainable, the system is reproducible; otherwise not.
| Asset | Source | Public | Cost to replicate |
|---|---|---|---|
| Expert trajectories | Experts + strong model, item-wise review | No | High |
| Preference pairs | Real adopt / rewrite / discard signals | No | High |
| Domain eval set | Long-horizon regression | No | Medium-high |
| Engineering knowledge | Architecture and tuning experience | Partly | Medium |
Hence general-corpus fine-tuning learns the tone of an expert but not the steps. Three measurable gaps:
Δ is the only objective evidence that training actually produced capability; we require it on a fixed suite before any external claim.
First, decay parameters lack a closed-form optimum; they should be calibrated per industry half-life. Second, false conflicts and misses cannot be minimized simultaneously. Third, the internal representations induced by chain distillation are only partially aligned with the explicit reasoning chains, and we lack a quantitative probe.
AFCOS treats enterprise facts, capability orchestration, and artifact delivery as one system, and obtains domain expression through expert chain-of-thought distillation. The core judgement: capability from fine-tuning, facts from retrieval, conclusions from a gate.
| Symbol | Meaning |
|---|---|
| m | ledger entry (seven-tuple) |
| σ | scope: GLOBAL / COMPANY |
| α | sparse-channel weight (0.4) |
| J(·,·) | bigram-Jaccard similarity |
| λ, β | decay coefficient, citation gain |
| B, τi | token budget, segment cost |
| Cr, Sc, Rc | conflict rate, source coverage, recall |
| Parameter | Value | Note |
|---|---|---|
| α (sparse weight) | 0.4 | dense-led, sparse fallback |
| Embedding dim | 1024 | model-consistent |
| k (RRF) | 60 | common industrial value |
| λ (decay) | 0.01–0.1 | calibrated per industry |
| β (gain) | 0.2–0.3 | controls lift |
| maxIters | explicit | no SDK default |
| k₁, b (BM25) | 1.2, 0.75 | classic values |