diff --git a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py index 3113848e3e4..6f778c4544c 100644 --- a/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py +++ b/apps/application/flow/step_node/search_dataset_node/impl/base_search_dataset_node.py @@ -62,9 +62,12 @@ def execute(self, dataset_id_list, dataset_setting, question, result = sorted(result, key=lambda p: p.get('similarity'), reverse=True) return NodeResult({'paragraph_list': result, 'is_hit_handling_method_list': [row for row in result if row.get('is_hit_handling_method')], - 'data': '\n'.join([paragraph.get('content') for paragraph in paragraph_list]), - 'directly_return': '\n'.join([paragraph.get('content') for paragraph in result if - paragraph.get('is_hit_handling_method')]), + 'data': '\n'.join( + [f"{paragraph.get('title', '')}:{paragraph.get('content')}" for paragraph in + paragraph_list]), + 'directly_return': '\n'.join( + [f"{paragraph.get('title', '')}:{paragraph.get('content')}" for paragraph in result if + paragraph.get('is_hit_handling_method')]), 'question': question}, {})