+ {/* {renderHitResults(generalResultData)} */}
{submitLoading
- ?
-
-
-
+ ?
: (
(() => {
if (!hitResult?.records.length && !externalHitResult?.records.length)
return renderEmptyState()
if (hitResult?.records.length)
- return renderHitResults(hitResult.records, onClickCard)
+ return renderHitResults(hitResult.records)
- return renderHitResults(externalHitResult?.records || [], onClickExternalCard)
+ return renderHitResults(externalHitResult?.records || [])
})()
)
}
diff --git a/web/app/components/datasets/hit-testing/style.module.css b/web/app/components/datasets/hit-testing/style.module.css
index 1e90902a70..7d83b8abb6 100644
--- a/web/app/components/datasets/hit-testing/style.module.css
+++ b/web/app/components/datasets/hit-testing/style.module.css
@@ -5,7 +5,7 @@
@apply flex-1 h-full;
}
.leftDiv {
- @apply border-r border-gray-100 px-6 py-3 flex flex-col;
+ @apply px-6 py-3 flex flex-col;
}
.rightDiv {
@apply flex flex-col;
diff --git a/web/i18n/en-US/dataset-creation.ts b/web/i18n/en-US/dataset-creation.ts
index 014f9a1a93..514738e9da 100644
--- a/web/i18n/en-US/dataset-creation.ts
+++ b/web/i18n/en-US/dataset-creation.ts
@@ -166,6 +166,11 @@ const translation = {
datasetSettingLink: 'Knowledge settings.',
previewChunkTip: 'Click the \'Preview Chunk\' button on the left to load the preview',
previewChunkCount: '{{count}} Estimated chunks',
+ switch: 'Switch',
+ qaSwitchHighQualityTipTitle: 'Q&A Format Requires High-quality Indexing Method',
+ qaSwitchHighQualityTipContent: 'Currently, only high-quality index method supports Q&A format chunking. Would you like to switch to high-quality mode?',
+ notAvailableForParentChild: 'Not available for Parent-child Index',
+ notAvailableForQA: 'Not available for Q&A Index',
},
stepThree: {
creationTitle: '🎉 Knowledge created',
diff --git a/web/i18n/en-US/dataset-hit-testing.ts b/web/i18n/en-US/dataset-hit-testing.ts
index 6dbfa47fee..8b8629e90a 100644
--- a/web/i18n/en-US/dataset-hit-testing.ts
+++ b/web/i18n/en-US/dataset-hit-testing.ts
@@ -19,12 +19,16 @@ const translation = {
testing: 'Testing',
},
hit: {
- title: 'RETRIEVAL PARAGRAPHS',
+ title: '{{num}} Retrieved Chunks',
emptyTip: 'Retrieval Testing results will show here',
},
noRecentTip: 'No recent query results here',
viewChart: 'View VECTOR CHART',
viewDetail: 'View Detail',
+ chunkDetail: 'Chunk Detail',
+ hitChunks: 'Hit {{num}} child chunks',
+ open: 'Open',
+ keyword: 'Keywords',
}
export default translation
diff --git a/web/i18n/zh-Hans/dataset-creation.ts b/web/i18n/zh-Hans/dataset-creation.ts
index c8f64777fb..48e1b4e7f2 100644
--- a/web/i18n/zh-Hans/dataset-creation.ts
+++ b/web/i18n/zh-Hans/dataset-creation.ts
@@ -166,6 +166,11 @@ const translation = {
datasetSettingLink: '知识库设置。',
previewChunkTip: '点击左侧的“预览块”按钮来加载预览',
previewChunkCount: '{{count}} 预估块',
+ switch: '切换',
+ qaSwitchHighQualityTipTitle: 'Q&A 格式需要高质量的索引方法',
+ qaSwitchHighQualityTipContent: '目前,只有高质量的索引方法支持 Q&A 格式分块。您要切换到高质量模式吗?',
+ notAvailableForParentChild: '不支持父子索引',
+ notAvailableForQA: '不支持 Q&A 索引',
},
stepThree: {
creationTitle: '🎉 知识库已创建',
diff --git a/web/i18n/zh-Hans/dataset-hit-testing.ts b/web/i18n/zh-Hans/dataset-hit-testing.ts
index 09cfdc2824..caf88acc76 100644
--- a/web/i18n/zh-Hans/dataset-hit-testing.ts
+++ b/web/i18n/zh-Hans/dataset-hit-testing.ts
@@ -19,12 +19,16 @@ const translation = {
testing: '测试',
},
hit: {
- title: '召回段落',
+ title: '{{num}} 个召回段落',
emptyTip: '召回测试结果将展示在这里',
},
noRecentTip: '最近无查询结果',
viewChart: '查看向量图表',
viewDetail: '查看详情',
+ chunkDetail: '段落详情',
+ hitChunks: '命中 {{num}} 个子段落',
+ open: '打开',
+ keyword: '关键词',
}
export default translation
diff --git a/web/models/datasets.ts b/web/models/datasets.ts
index 921b72b545..ac2484ef79 100644
--- a/web/models/datasets.ts
+++ b/web/models/datasets.ts
@@ -479,10 +479,16 @@ export type HitTestingRecord = {
created_at: number
}
+export type HitTestingChildChunk = {
+ id: string
+ content: string
+ score: number
+}
export type HitTesting = {
segment: Segment
score: number
tsne_position: TsnePosition
+ child_chunks?: HitTestingChildChunk[] | null
}
export type ExternalKnowledgeBaseHitTesting = {