@@ -352,6 +357,11 @@ const resultColumns = [
key: 'query',
width: 200
},
+ {
+ title: '生成答案',
+ key: 'generated_answer',
+ width: 250
+ },
{
title: '检索指标',
key: 'retrieval_score',
@@ -611,7 +621,7 @@ const calculateEvaluationStats = (results) => {
const viewResults = async (taskId) => {
try {
resultsLoading.value = true;
- const response = await evaluationApi.getEvaluationResults(taskId);
+ const response = await evaluationApi.getEvaluationResultsByDb(props.databaseId, taskId);
if (response.message === 'success' && response.data) {
// API 返回的是直接的评估结果对象
const resultData = response.data;
@@ -668,7 +678,7 @@ const deleteEvaluationRecord = async (taskId) => {
record.deleting = true;
}
- const response = await evaluationApi.deleteEvaluationResult(taskId);
+ const response = await evaluationApi.deleteEvaluationResultByDb(props.databaseId, taskId);
if (response.message === 'success') {
message.success('删除成功');
// 重新加载评估历史
@@ -934,6 +944,16 @@ onMounted(() => {
line-height: 1.4;
}
+.answer-text {
+ display: inline-block;
+ max-width: 250px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ line-height: 1.4;
+ color: var(--gray-700);
+}
+
.log-time {
color: var(--gray-500);
margin-left: 8px;
@@ -1270,4 +1290,4 @@ onMounted(() => {
}
}
-
\ No newline at end of file
+
diff --git a/web/src/components/modals/BenchmarkGenerateModal.vue b/web/src/components/modals/BenchmarkGenerateModal.vue
index c3713356..9f76b4e8 100644
--- a/web/src/components/modals/BenchmarkGenerateModal.vue
+++ b/web/src/components/modals/BenchmarkGenerateModal.vue
@@ -42,70 +42,42 @@
-
+
-
-
-
-
- 基于检索的文档块生成答案
- 基于LLM的知识理解生成答案
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
+
+
+
+
@@ -160,6 +132,7 @@ import { ref, reactive, computed, watch } from 'vue';
import { message } from 'ant-design-vue';
import { evaluationApi } from '@/apis/knowledge_api';
import ModelSelectorComponent from '@/components/ModelSelectorComponent.vue';
+import EmbeddingModelSelector from '@/components/EmbeddingModelSelector.vue';
const props = defineProps({
visible: {
@@ -182,10 +155,8 @@ const formState = reactive({
name: '',
description: '',
count: 10,
- answers_per_question: 1,
- answer_generation_strategy: 'chunk_based',
- sample_count: 100,
- similarity_threshold: 0.7,
+ neighbors_count: 2,
+ embedding_model_id: '',
llm_model_spec: '',
llm_config: {
model: '',
@@ -223,10 +194,8 @@ const handleGenerate = async () => {
name: formState.name,
description: formState.description,
count: formState.count,
- answers_per_question: formState.answers_per_question,
- answer_generation_strategy: formState.answer_generation_strategy,
- sample_count: formState.sample_count,
- similarity_threshold: formState.similarity_threshold,
+ neighbors_count: formState.neighbors_count,
+ embedding_model_id: formState.embedding_model_id,
llm_config: {
...formState.llm_config,
model_spec: formState.llm_model_spec
@@ -263,10 +232,8 @@ const resetForm = () => {
name: '',
description: '',
count: 10,
- answers_per_question: 1,
- answer_generation_strategy: 'chunk_based',
- sample_count: 100,
- similarity_threshold: 0.7,
+ neighbors_count: 2,
+ embedding_model_id: '',
llm_model_spec: '',
llm_config: {
model: '',
@@ -315,4 +282,4 @@ watch(visible, (val) => {
}
}
}
-
\ No newline at end of file
+