feat: enrich question insights classification

This commit is contained in:
2026-07-31 16:40:13 +08:00
parent 99e23b33ec
commit 6c03faf10c
6 changed files with 122 additions and 2 deletions

View File

@@ -1584,8 +1584,13 @@ function formatRecordDateTime(value: string, boundary: "start" | "end") {
</div>
</header>
<div class="question-insight-tags">
<el-tag size="small" effect="plain">{{ cluster.categoryLabel }}</el-tag>
<el-tag v-if="cluster.needsKnowledgeFollowUp" size="small" type="warning" effect="plain">需补知识/查召回</el-tag>
<el-tag v-if="cluster.noHitCount" size="small" type="danger" effect="plain">无命中 {{ cluster.noHitCount }}</el-tag>
<el-tag v-if="cluster.failedCount" size="small" type="danger" effect="dark">失败 {{ cluster.failedCount }}</el-tag>
<el-tag v-for="term in cluster.topTerms" :key="term" size="small" type="success" effect="plain">{{ term }}</el-tag>
</div>
<p class="question-insight-action">{{ cluster.suggestedAction }}</p>
<el-collapse>
<el-collapse-item title="查看相似问法和原始样例" :name="cluster.normalized">
<div class="question-variants">

View File

@@ -1956,6 +1956,16 @@ textarea {
margin: 12px 0;
}
.question-insight-action {
margin: 0 0 12px;
padding: 10px 12px;
border-radius: 10px;
background: #f6faf8;
color: #50655e;
font-size: 13px;
line-height: 1.6;
}
.question-variants {
display: flex;
flex-wrap: wrap;

View File

@@ -567,9 +567,16 @@ export interface QuestionInsightCluster {
rank: number;
title: string;
normalized: string;
category: string;
categoryLabel: string;
count: number;
userCount: number;
sessionCount: number;
aiRequestCount: number;
noHitCount: number;
failedCount: number;
needsKnowledgeFollowUp: boolean;
suggestedAction: string;
firstSeenAt: string;
lastSeenAt: string;
topTerms: string[];