Files
group_xinghuo_jinrong/docs/course/jinrong-overview/modules/06-hard-rules.html
T
zhanghongyu_0626 4b8e11c9bd feat(threshold): Implement customer loss threshold configuration and notification system
- Added `ThresholdRepository` for managing customer loss threshold configurations and notifications.
- Introduced `threshold_service` to handle loss threshold alerts based on customer portfolio performance.
- Enhanced `customer_prompts` to include new intent for querying product net values.
- Updated `customer_service` to integrate new threshold alert functionality into existing workflows.
- Implemented `sanitize_postprocess` for improved compliance handling in customer interactions.
- Enhanced course documentation to reflect updates in advisor training modules and interactive elements.

This update significantly improves the customer experience by providing proactive loss threshold notifications and enhancing the overall service framework.
2026-09-10 10:57:40 +08:00

88 lines
5.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<section class="module" id="module-6">
<div class="module-inner">
<p class="eyebrow animate-in">模块 6 · 硬阀门</p>
<h1 class="module-title animate-in">改代码前先念五条<br>踩了就是合规事故</h1>
<p class="module-lead animate-in">
四 Agent 可以各自演进,但有几条是<strong>全项目硬阀门</strong>——不是「最好遵守」,是写进合规文档、测试也会卡住的规则。
指挥 AI 加功能前,先用这张表判断「能不能做」。
</p>
<div class="screen animate-in">
<h2>五条硬阀门(2026-09 快照)</h2>
<div class="pattern-cards">
<div class="pattern-card">
<h3>① Core 正式 C1~C5 不可被画像覆盖</h3>
<p>L0 风评在 <code>jinrong_core</code> 是权威;L1 画像 enrich 只能辅助,不能改正式等级。</p>
</div>
<div class="pattern-card">
<h3>② 审计表只 INSERT</h3>
<p><code>audit_log</code> / <code>input_guard_log</code> 等只追加、不 UPDATE/DELETE——留痕不可篡改。</p>
</div>
<div class="pattern-card">
<h3>③ 仅 R-02 可阻断交易</h3>
<p>适当性不匹配可在网关拦单;R-01/R-03 只生成预警,<strong>不自动冻户</strong>。</p>
</div>
<div class="pattern-card">
<h3>④ 代理人草稿不外发</h3>
<p>顾问 Agent 产出是草稿;没有「一键发给客户」API,须人工复核后才能外用。</p>
</div>
<div class="pattern-card">
<h3>⑤ 四 Agent 不互调 LLM</h3>
<p>跨角色协作走 L1/L2/L3 画像表与 <code>risk_alert</code>,禁止 A 调 B 的 LangGraph。</p>
</div>
</div>
<div class="callout callout-warning">
<strong>还有技术硬阀门:</strong> Core 模拟库除模拟交易网关外<strong>只读</strong>;Streamlit 禁止引入(MEMORY 第 3 节)。
</div>
</div>
<div class="screen animate-in">
<h2>数据流:谁有权改什么</h2>
<div class="flow-animation" data-steps='[
{"highlight":"flow-h-1","label":"客户问持仓 → Core 只读 Tool(core_ro_tool.py)只读 SELECT"},
{"highlight":"flow-h-2","label":"模拟下单 → 仅 gateway_repository 可 INSERT core_trade","packet":true,"from":"1","to":"2"},
{"highlight":"flow-h-3","label":"风控预警 → risk_alert 待人工 pending_review,不自动改账户状态","packet":true,"from":"2","to":"3"},
{"highlight":"flow-h-4","label":"audit_log → 只 INSERT,任何 UPDATE 都是违规","packet":true,"from":"3","to":"4"}
]'>
<div class="flow-actors">
<div class="flow-actor" id="flow-h-1"><span class="flow-actor-icon">📖</span><span>Core 只读</span></div>
<div class="flow-actor" id="flow-h-2"><span class="flow-actor-icon">💳</span><span>模拟网关</span></div>
<div class="flow-actor" id="flow-h-3"><span class="flow-actor-icon">⚠</span><span>预警台账</span></div>
<div class="flow-actor" id="flow-h-4"><span class="flow-actor-icon">📋</span><span>审计总账</span></div>
</div>
<p class="flow-step-label">点击「下一步」看写入边界</p>
<div class="flow-controls">
<button class="btn flow-next-btn">下一步</button>
<button class="btn flow-reset-btn">重来</button>
</div>
</div>
</div>
<div class="screen animate-in">
<div class="quiz-container" id="quiz-overview-m6">
<div class="quiz-question-block"
data-correct="option-b"
data-explanation-right="对。R-01 大额等只生成 pending_review 预警,冻户必须风控专员人工处置,Agent 不能自动冻。"
data-explanation-wrong="只有 R-02 适当性可在交易网关阻断;其他预警不自动冻户。">
<h3 class="quiz-question">AI 建议「大额预警命中就自动冻结账户」,你怎么回复?</h3>
<div class="quiz-options">
<button class="quiz-option" data-value="option-a" onclick="selectOption(this)">
<div class="quiz-option-radio"></div><span>好,在 risk_engine 里加 freeze 分支</span>
</button>
<button class="quiz-option" data-value="option-b" onclick="selectOption(this)">
<div class="quiz-option-radio"></div><span>不行,只生成预警单,处置走 POST /api/risk/alerts/{id}/handle</span>
</button>
<button class="quiz-option" data-value="option-c" onclick="selectOption(this)">
<div class="quiz-option-radio"></div><span>可以,让客服 Agent 调风控 LLM 冻户</span>
</button>
</div>
<div class="quiz-feedback"></div>
</div>
<button class="quiz-check-btn" onclick="checkQuiz('quiz-overview-m6')">检查答案</button>
<button class="quiz-reset-btn" onclick="resetQuiz('quiz-overview-m6')">重做</button>
</div>
<p class="module-footer-note">深潜各模块的硬阀门细节见对应课程 · 下一模块:未实现对照表</p>
</div>
</div>
</section>