2026-05-11 03:51:24 +00:00
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
|
<html lang="zh-CN">
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
<title>Day 3 - 语义本体 MVP</title>
|
|
|
|
|
|
<link rel="stylesheet" href="./styles.css">
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
|
|
|
|
<div class="shell">
|
|
|
|
|
|
<div class="topbar">
|
|
|
|
|
|
<a class="brand" href="./index.html"><span class="brand-mark">D3</span><span>Day 3 View</span></a>
|
|
|
|
|
|
<div class="quick-links">
|
|
|
|
|
|
<a class="pill" href="./index.html">返回总览</a>
|
|
|
|
|
|
<a class="pill" href="../agent%20week%20plan/day_3_semantic_ontology_mvp.md">周计划原文</a>
|
2026-05-12 01:23:33 +00:00
|
|
|
|
<a class="pill" href="../agent%20week%20plan/day_3_semantic_ontology_mvp.md">合并文档原文</a>
|
2026-05-11 03:51:24 +00:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="day-nav">
|
|
|
|
|
|
<a class="pill" href="./day-1.html">Day 1</a>
|
|
|
|
|
|
<a class="pill" href="./day-2.html">Day 2</a>
|
|
|
|
|
|
<a class="pill active" href="./day-3.html">Day 3</a>
|
|
|
|
|
|
<a class="pill" href="./day-4.html">Day 4</a>
|
|
|
|
|
|
<a class="pill" href="./day-5.html">Day 5</a>
|
|
|
|
|
|
<a class="pill" href="./day-6.html">Day 6</a>
|
|
|
|
|
|
<a class="pill" href="./day-7.html">Day 7</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<section class="hero">
|
|
|
|
|
|
<div class="hero-badge">Ontology</div>
|
|
|
|
|
|
<h1>Day 3 语义本体 MVP</h1>
|
|
|
|
|
|
<p>这一天把自然语言问题统一切成 8 个核心字段。Day 3 不是追求大模型多聪明,而是先让结构稳定、可落日志、可被 Orchestrator、User Agent 和 Hermes 共用。</p>
|
|
|
|
|
|
<div class="hero-meta">
|
|
|
|
|
|
<div class="meta-card"><div class="meta-label">上游依赖</div><div class="meta-value">Day 1 的 <code>SemanticParseLog</code> / <code>AgentRun</code>,Day 2 的资产 API。</div></div>
|
|
|
|
|
|
<div class="meta-card"><div class="meta-label">下游交接</div><div class="meta-value">Day 4 路由、Day 5 查询解释、Day 6 风险巡检都直接消费这 8 字段。</div></div>
|
|
|
|
|
|
<div class="meta-card"><div class="meta-label">当天关键</div><div class="meta-value">名字统一、类型统一、日志统一、低置信度有澄清问题。</div></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section-kicker">Three-Layer Mapping</div>
|
|
|
|
|
|
<h2 class="section-title">三层文档映射</h2>
|
|
|
|
|
|
<div class="grid three">
|
|
|
|
|
|
<section class="card tone-warm">
|
|
|
|
|
|
<h3>路线图</h3>
|
|
|
|
|
|
<p>周计划要求建立用户问题的统一语义解析层,覆盖场景、意图、对象、时间、指标、约束、风险、权限 8 字段。</p>
|
|
|
|
|
|
<div class="card-links"><a class="link-chip" href="../agent%20week%20plan/day_3_semantic_ontology_mvp.md">day_3_semantic_ontology_mvp.md</a></div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
<section class="card tone-teal">
|
|
|
|
|
|
<h3>执行细则</h3>
|
|
|
|
|
|
<p>执行层拆成 8 字段定义、字段枚举、Schema、解析服务、对象提取、时间范围、指标约束、风险权限、API、前端调试入口和评测集。</p>
|
2026-05-12 01:23:33 +00:00
|
|
|
|
<div class="card-links"><a class="link-chip" href="../agent%20week%20plan/day_3_semantic_ontology_mvp.md">agent week plan/day_3</a></div>
|
2026-05-11 03:51:24 +00:00
|
|
|
|
</section>
|
|
|
|
|
|
<section class="card tone-olive">
|
|
|
|
|
|
<h3>架构依据</h3>
|
|
|
|
|
|
<p>主要受语义本体、财务标准模型和数据治理约束。应收、应付、报销的对象语义必须能回到最小业务表和标准对象。</p>
|
|
|
|
|
|
<div class="card-links">
|
|
|
|
|
|
<a class="link-chip" href="../agent%20plan/02_semantic_ontology.md">02</a>
|
|
|
|
|
|
<a class="link-chip" href="../agent%20plan/14_financial_document_canonical_model.md">14</a>
|
|
|
|
|
|
<a class="link-chip" href="../agent%20plan/06_data_contracts_and_governance.md">06</a>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section-kicker">Build Order</div>
|
|
|
|
|
|
<h2 class="section-title">推荐开发顺序</h2>
|
|
|
|
|
|
<div class="timeline">
|
|
|
|
|
|
<div class="timeline-step"><strong>Step 1</strong>先固定 8 个字段名字、类型、默认值和示例。</div>
|
|
|
|
|
|
<div class="timeline-step"><strong>Step 2</strong>把 <code>scenario</code>、<code>intent</code>、<code>permission.level</code> 的枚举定死。</div>
|
|
|
|
|
|
<div class="timeline-step"><strong>Step 3</strong>做请求/响应 Schema,再写解析服务。</div>
|
|
|
|
|
|
<div class="timeline-step"><strong>Step 4</strong>补对象提取、时间范围、指标约束、风险和权限映射。</div>
|
|
|
|
|
|
<div class="timeline-step"><strong>Step 5</strong>接 API、日志、调试入口和最小评测集。</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section-kicker">Must Deliver</div>
|
|
|
|
|
|
<h2 class="section-title">今天必须产出的东西</h2>
|
|
|
|
|
|
<div class="grid two">
|
|
|
|
|
|
<section class="card">
|
|
|
|
|
|
<h3>8 字段统一结构</h3>
|
|
|
|
|
|
<ul class="list">
|
|
|
|
|
|
<li><code>scenario</code>、<code>intent</code>、<code>entities</code>、<code>time_range</code></li>
|
|
|
|
|
|
<li><code>metrics</code>、<code>constraints</code>、<code>risk_flags</code>、<code>permission</code></li>
|
|
|
|
|
|
<li>附带 <code>confidence</code>、<code>clarification_required</code>、<code>run_id</code></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
<section class="card">
|
|
|
|
|
|
<h3>规则解析优先版</h3>
|
|
|
|
|
|
<ul class="list">
|
|
|
|
|
|
<li>先用关键词和规则解析打底。</li>
|
|
|
|
|
|
<li>报销 / 应收 / 应付 / 知识 / unknown 场景都能落到结构。</li>
|
|
|
|
|
|
<li>越权动作能识别为 <code>approval_required</code> 或 <code>forbidden</code>。</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
<section class="card">
|
|
|
|
|
|
<h3>日志和调试入口</h3>
|
|
|
|
|
|
<ul class="list">
|
|
|
|
|
|
<li>每次解析都要落 <code>SemanticParseLog</code>。</li>
|
|
|
|
|
|
<li>前端可直接输入一句话看 8 字段结果。</li>
|
|
|
|
|
|
<li>低置信度问题必须给澄清问题。</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
<section class="card">
|
|
|
|
|
|
<h3>最小评测集</h3>
|
|
|
|
|
|
<ul class="list">
|
|
|
|
|
|
<li>至少覆盖报销、应收、应付、知识、越权动作。</li>
|
|
|
|
|
|
<li>每条样例要写期望 <code>scenario</code>、<code>intent</code> 和权限级别。</li>
|
|
|
|
|
|
<li>当天目标是可评测,而不是追求完美准确率。</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section-kicker">Acceptance Snapshot</div>
|
|
|
|
|
|
<h2 class="section-title">验收快照</h2>
|
|
|
|
|
|
<div class="table-like">
|
|
|
|
|
|
<div class="row"><div class="row-label">语义结构</div><div class="row-value">8 字段在 Schema、服务层、日志里名字完全一致。</div></div>
|
|
|
|
|
|
<div class="row"><div class="row-label">关键识别</div><div class="row-value">“本周报销超标风险”“客户 A 本月应收”“供应商 B 明天要付多少钱”都能落到正确场景和意图。</div></div>
|
|
|
|
|
|
<div class="row"><div class="row-label">权限结果</div><div class="row-value">“帮我直接付款”不能被识别成可直接执行动作。</div></div>
|
|
|
|
|
|
<div class="row"><div class="row-label">日志与前端</div><div class="row-value">连续调用多次都能在日志中查到,并能通过调试入口观察结果。</div></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="section-kicker">Common Misses</div>
|
|
|
|
|
|
<h2 class="section-title">这一天最容易漏掉的点</h2>
|
|
|
|
|
|
<ul class="list">
|
|
|
|
|
|
<li>字段结构和日志结构各写一套名字,后面 Trace 很难串。</li>
|
|
|
|
|
|
<li>只做 <code>scenario</code> 和 <code>intent</code>,不做 <code>permission</code>,Day 4 会直接失去拦截依据。</li>
|
|
|
|
|
|
<li>只在服务里返回结果,不把解析过程落库或落日志,后续无法复盘误判样例。</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="footer">Day 3 的价值在于把“语义理解”从模糊文本变成稳定协议。后面所有智能能力都站在这层协议上。</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|