Files
RiskAgent/src/domain/knowledge.ts
T
freedakgmail c670b9e454 外包风险评估系统:领域引擎+前端+服务端持久化与生产部署
- 确定性领域引擎(分类/评分/分级/红线/费用/裁决)+LLM(通义千问)语言理解
- 6步评估向导、服务端草稿持久化(跨设备/编辑草稿保护)
- 工作流(草稿→风控→管理层)、RBAC、报告导出、校准、客户/费率/红线/最低工资管理
- 专业图标体系替换全部emoji、看板美化
- 生产化:API_BASE可配置(同源反代)、auth密钥惰性读取修复RBAC
- 444单测+204前端测试+51 e2e
2026-06-13 01:06:39 +08:00

71 lines
1.8 KiB
TypeScript
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.
/**
* 分行业知识库实体(Req 14)。
*
* 按行业标识分区存储;每个行业分区须包含五类必备内容,缺任一类拒绝创建分区。
*/
import type { Industry } from './common.js';
import type { Indicator, Redline, Template } from './model.js';
/**
* 权重模板项:为某指标或维度预设的权重基线。
*/
export interface WeightTemplateEntry {
/** 目标维度或指标标识。 */
targetId: string;
/** 预设权重值(0 至 100)。 */
weight: number;
}
/**
* 典型案例:行业内的参考评估案例。
*/
export interface CaseStudy {
/** 案例唯一标识。 */
id: string;
/** 案例标题。 */
title: string;
/** 案例描述/要点。 */
summary: string;
}
/**
* 追问话术项:行业相关的补全问题文案。
*/
export interface AskPrompt {
/** 关联指标标识。 */
indicatorId: string;
/** 问题文案。 */
prompt: string;
}
/**
* 行业分区(IndustryPartitionReq 14.1, 14.4)。
* 五类必备内容:Indicator、权重模板、Redline、典型案例、追问话术;缺任一类非法。
*/
export interface IndustryPartition {
/** 行业标识。 */
industryId: Industry;
/** 指标集合。 */
indicators: Indicator[];
/** 权重模板集合。 */
weightTemplates: WeightTemplateEntry[];
/** 红线集合。 */
redlines: Redline[];
/** 典型案例集合。 */
cases: CaseStudy[];
/** 追问话术集合。 */
askPrompts: AskPrompt[];
/** 该分区下的模板集合。 */
templates: Template[];
}
/**
* 分行业知识库(KnowledgeBaseReq 14.1)。
* 无匹配行业分区时回退默认分区并标注未匹配(Req 14.5)。
*/
export interface KnowledgeBase {
/** 行业分区集合。 */
partitions: IndustryPartition[];
}