
{
    "id": 16,
    "title": {
		"en": "WebSearch Assistant",
		"zh": "网页搜索助手"},
    "description": {
		"en": "A chat assistant template that integrates information extracted from a knowledge base and web searches to respond to queries. Let's start by setting up your knowledge base in 'Retrieval'!",
		"zh": "集成了从知识库和网络搜索中提取的信息回答用户问题。让我们从设置您的知识库开始检索！"},
	"canvas_type": "Other",
    "dsl": {
		"components": {
			"Agent:SmartSchoolsCross": {
				"downstream": [
					"Message:ShaggyRingsCrash"
				],
				"obj": {
					"component_name": "Agent",
					"params": {
						"delay_after_error": 1,
						"description": "",
						"exception_comment": "",
						"exception_default_value": "",
						"exception_goto": [],
						"exception_method": null,
						"frequencyPenaltyEnabled": false,
						"frequency_penalty": 0.7,
						"llm_id": "deepseek-chat@DeepSeek",
						"maxTokensEnabled": false,
						"max_retries": 3,
						"max_rounds": 1,
						"max_tokens": 256,
						"mcp": [],
						"message_history_window_size": 12,
						"outputs": {
							"content": {
								"type": "string",
								"value": ""
							}
						},
						"presencePenaltyEnabled": false,
						"presence_penalty": 0.4,
						"prompts": [
							{
								"content": "User's query:\n{sys.query}\n\nRefined question:\n{Agent:ThreePathsDecide@content}\n\nWeb search result:\n{Agent:WildGoatsRule@content}\n\nRetrieval result:\n{Agent:WildGoatsRule@content}",
								"role": "user"
							}
						],
						"sys_prompt": "Role: You are an Answer Organizer.\nTask: Generate the answer based on the provided content from: User's query, Refined question, Web search result, Retrieval result.\n\nRequirements:\n  - Answer should be in markdown format.\n - Answer should include all \n  - Do not make thing up when there's no relevant information to user's question. \n",
						"temperature": 0.1,
						"temperatureEnabled": true,
						"tools": [],
						"topPEnabled": false,
						"top_p": 0.3,
						"user_prompt": "",
						"visual_files_var": ""
					}
				},
				"upstream": [
					"Agent:WildGoatsRule",
					"Retrieval:WarmTimesRun"
				]
			},
			"Agent:ThreePathsDecide": {
				"downstream": [
					"Agent:WildGoatsRule",
					"Retrieval:WarmTimesRun"
				],
				"obj": {
					"component_name": "Agent",
					"params": {
						"delay_after_error": 1,
						"description": "",
						"exception_comment": "",
						"exception_default_value": "",
						"exception_goto": [],
						"exception_method": null,
						"frequencyPenaltyEnabled": false,
						"frequency_penalty": 0.7,
						"llm_id": "deepseek-chat@DeepSeek",
						"maxTokensEnabled": false,
						"max_retries": 3,
						"max_rounds": 1,
						"max_tokens": 256,
						"mcp": [],
						"message_history_window_size": 12,
						"outputs": {
							"content": {
								"type": "string",
								"value": ""
							}
						},
						"presencePenaltyEnabled": false,
						"presence_penalty": 0.4,
						"prompts": [
							{
								"content": "{sys.query}",
								"role": "user"
							}
						],
						"sys_prompt": "Role: You are a Question Refinement Agent. Rewrite ambiguous or incomplete user questions to align with knowledge base terminology using conversation history.\n\nExample：\n\nUser: What's RAGFlow?\nAssistant: RAGFlow is xxx.\n\nUser: How to deloy it?\nRefine it: How to deploy RAGFlow?",
						"temperature": 0.1,
						"temperatureEnabled": true,
						"tools": [],
						"topPEnabled": false,
						"top_p": 0.3,
						"user_prompt": "",
						"visual_files_var": ""
					}
				},
				"upstream": [
					"begin"
				]
			},
			"Agent:WildGoatsRule": {
				"downstream": [
					"Agent:SmartSchoolsCross"
				],
				"obj": {
					"component_name": "Agent",
					"params": {
						"delay_after_error": 1,
						"description": "",
						"exception_comment": "",
						"exception_default_value": "",
						"exception_goto": [],
						"exception_method": null,
						"frequencyPenaltyEnabled": false,
						"frequency_penalty": 0.7,
						"llm_id": "deepseek-chat@DeepSeek",
						"maxTokensEnabled": false,
						"max_retries": 3,
						"max_rounds": 2,
						"max_tokens": 256,
						"mcp": [],
						"message_history_window_size": 12,
						"outputs": {
							"content": {
								"type": "string",
								"value": ""
							}
						},
						"presencePenaltyEnabled": false,
						"presence_penalty": 0.4,
						"prompts": [
							{
								"content": "User's query:\n{sys.query}\n\nRefined question:\n{Agent:ThreePathsDecide@content}",
								"role": "user"
							}
						],
						"sys_prompt": "Role: You are a Search-Driven Information Agent that answers questions using web search results.\n\nWorkflow:\nKeyword Extraction:\nExtract exactly 3 keywords from the user's question.\n\nKeywords must be:\n✅ Most specific nouns/proper nouns (e.g., \"iPhone 15 Pro\" not \"phone\")\n✅ Core concepts (e.g., \"quantum entanglement\" not \"science thing\")\n✅ Unbiased (no added opinions)\nNever output keywords to users\n\nSearch & Answer:\nUse search tools (TavilySearch, TavilyExtract, Google, Bing, DuckDuckGo, Wikipedia)  with the 3 keywords to retrieve results.\nAnswer solely based on search findings, citing sources.\nIf results conflict, prioritize recent (.gov/.edu > forums)\n\nOutput Rules:\n✖️ Never show keywords in final answers\n✖️ Never guess if search yields no results\n✅ Always cite sources using [Source #] notation",
						"temperature": 0.1,
						"temperatureEnabled": true,
						"tools": [
							{
								"component_name": "TavilySearch",
								"name": "TavilySearch",
								"params": {
									"api_key": "",
									"days": 7,
									"exclude_domains": [],
									"include_answer": false,
									"include_domains": [],
									"include_image_descriptions": false,
									"include_images": false,
									"include_raw_content": true,
									"max_results": 5,
									"outputs": {
										"formalized_content": {
											"type": "string",
											"value": ""
										},
										"json": {
											"type": "Array<Object>",
											"value": []
										}
									},
									"query": "sys.query",
									"search_depth": "basic",
									"topic": "general"
								}
							},
							{
								"component_name": "TavilyExtract",
								"name": "TavilyExtract",
								"params": {
									"api_key": ""
								}
							},
							{
								"component_name": "Google",
								"name": "Google",
								"params": {
									"api_key": "",
									"country": "us",
									"language": "en"
								}
							},
							{
								"component_name": "Bing",
								"name": "Bing",
								"params": {
									"api_key": "YOUR_API_KEY (obtained from https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)",
									"channel": "Webpages",
									"country": "CH",
									"language": "en",
									"top_n": 10
								}
							},
							{
								"component_name": "DuckDuckGo",
								"name": "DuckDuckGo",
								"params": {
									"channel": "text",
									"top_n": 10
								}
							},
							{
								"component_name": "Wikipedia",
								"name": "Wikipedia",
								"params": {
									"language": "en",
									"top_n": 10
								}
							}
						],
						"topPEnabled": false,
						"top_p": 0.3,
						"user_prompt": "",
						"visual_files_var": ""
					}
				},
				"upstream": [
					"Agent:ThreePathsDecide"
				]
			},
			"Message:ShaggyRingsCrash": {
				"downstream": [],
				"obj": {
					"component_name": "Message",
					"params": {
						"content": [
							"{Agent:SmartSchoolsCross@content}"
						]
					}
				},
				"upstream": [
					"Agent:SmartSchoolsCross"
				]
			},
			"Retrieval:WarmTimesRun": {
				"downstream": [
					"Agent:SmartSchoolsCross"
				],
				"obj": {
					"component_name": "Retrieval",
					"params": {
						"cross_languages": [],
						"empty_response": "",
						"kb_ids": [],
						"keywords_similarity_weight": 0.7,
						"outputs": {
							"formalized_content": {
								"type": "string",
								"value": ""
							}
						},
						"query": "Agent:ThreePathsDecide@content",
						"rerank_id": "",
						"similarity_threshold": 0.2,
						"top_k": 1024,
						"top_n": 8,
						"use_kg": false
					}
				},
				"upstream": [
					"Agent:ThreePathsDecide"
				]
			},
			"begin": {
				"downstream": [
					"Agent:ThreePathsDecide"
				],
				"obj": {
					"component_name": "Begin",
					"params": {
						"enablePrologue": true,
						"inputs": {},
						"mode": "conversational",
						"prologue": "Hi! I'm your web search assistant. What do you want to search today?"
					}
				},
				"upstream": []
			}
		},
		"globals": {
			"sys.conversation_turns": 1,
			"sys.files": [],
			"sys.query": "你好",
			"sys.user_id": "d6d98fd652f911f0a8fb047c16ec874f"
		},
		"graph": {
			"edges": [
				{
					"data": {
						"isHovered": false
					},
					"id": "xy-edge__beginstart-Agent:ThreePathsDecideend",
					"source": "begin",
					"sourceHandle": "start",
					"target": "Agent:ThreePathsDecide",
					"targetHandle": "end"
				},
				{
					"data": {
						"isHovered": false
					},
					"id": "xy-edge__Agent:ThreePathsDecidestart-Agent:WildGoatsRuleend",
					"source": "Agent:ThreePathsDecide",
					"sourceHandle": "start",
					"target": "Agent:WildGoatsRule",
					"targetHandle": "end"
				},
				{
					"data": {
						"isHovered": false
					},
					"id": "xy-edge__Agent:ThreePathsDecidestart-Retrieval:WarmTimesRunend",
					"source": "Agent:ThreePathsDecide",
					"sourceHandle": "start",
					"target": "Retrieval:WarmTimesRun",
					"targetHandle": "end"
				},
				{
					"data": {
						"isHovered": false
					},
					"id": "xy-edge__Agent:WildGoatsRulestart-Agent:SmartSchoolsCrossend",
					"source": "Agent:WildGoatsRule",
					"sourceHandle": "start",
					"target": "Agent:SmartSchoolsCross",
					"targetHandle": "end"
				},
				{
					"data": {
						"isHovered": false
					},
					"id": "xy-edge__Agent:SmartSchoolsCrossstart-Message:ShaggyRingsCrashend",
					"source": "Agent:SmartSchoolsCross",
					"sourceHandle": "start",
					"target": "Message:ShaggyRingsCrash",
					"targetHandle": "end"
				},
				{
					"data": {
						"isHovered": false
					},
					"id": "xy-edge__Retrieval:WarmTimesRunstart-Agent:SmartSchoolsCrossend",
					"markerEnd": "logo",
					"source": "Retrieval:WarmTimesRun",
					"sourceHandle": "start",
					"style": {
						"stroke": "rgba(91, 93, 106, 1)",
						"strokeWidth": 1
					},
					"target": "Agent:SmartSchoolsCross",
					"targetHandle": "end",
					"type": "buttonEdge",
					"zIndex": 1001
				},
				{
					"data": {
						"isHovered": false
					},
					"id": "xy-edge__Agent:WildGoatsRuletool-Tool:TrueCrewsTakeend",
					"source": "Agent:WildGoatsRule",
					"sourceHandle": "tool",
					"target": "Tool:TrueCrewsTake",
					"targetHandle": "end"
				}
			],
			"nodes": [
				{
					"data": {
						"form": {
							"enablePrologue": true,
							"inputs": {},
							"mode": "conversational",
							"prologue": "Hi! I'm your web search assistant. What do you want to search today?"
						},
						"label": "Begin",
						"name": "begin"
					},
					"dragging": false,
					"id": "begin",
					"measured": {
						"height": 48,
						"width": 200
					},
					"position": {
						"x": 32.79251060693639,
						"y": 209.67921278359827
					},
					"selected": false,
					"sourcePosition": "left",
					"targetPosition": "right",
					"type": "beginNode"
				},
				{
					"data": {
						"form": {
							"delay_after_error": 1,
							"description": "",
							"exception_comment": "",
							"exception_default_value": "",
							"exception_goto": [],
							"exception_method": null,
							"frequencyPenaltyEnabled": false,
							"frequency_penalty": 0.7,
							"llm_id": "deepseek-chat@DeepSeek",
							"maxTokensEnabled": false,
							"max_retries": 3,
							"max_rounds": 1,
							"max_tokens": 256,
							"mcp": [],
							"message_history_window_size": 12,
							"outputs": {
								"content": {
									"type": "string",
									"value": ""
								}
							},
							"presencePenaltyEnabled": false,
							"presence_penalty": 0.4,
							"prompts": [
								{
									"content": "{sys.query}",
									"role": "user"
								}
							],
							"sys_prompt": "Role: You are a Question Refinement Agent. Rewrite ambiguous or incomplete user questions to align with knowledge base terminology using conversation history.\n\nExample：\n\nUser: What's RAGFlow?\nAssistant: RAGFlow is xxx.\n\nUser: How to deloy it?\nRefine it: How to deploy RAGFlow?",
							"temperature": 0.1,
							"temperatureEnabled": true,
							"tools": [],
							"topPEnabled": false,
							"top_p": 0.3,
							"user_prompt": "",
							"visual_files_var": ""
						},
						"label": "Agent",
						"name": "Refine Question"
					},
					"dragging": false,
					"id": "Agent:ThreePathsDecide",
					"measured": {
						"height": 84,
						"width": 200
					},
					"position": {
						"x": 309.1322126914739,
						"y": 188.16985104226876
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "agentNode"
				},
				{
					"data": {
						"form": {
							"delay_after_error": 1,
							"description": "",
							"exception_comment": "",
							"exception_default_value": "",
							"exception_goto": [],
							"exception_method": null,
							"frequencyPenaltyEnabled": false,
							"frequency_penalty": 0.7,
							"llm_id": "deepseek-chat@DeepSeek",
							"maxTokensEnabled": false,
							"max_retries": 3,
							"max_rounds": 2,
							"max_tokens": 256,
							"mcp": [],
							"message_history_window_size": 12,
							"outputs": {
								"content": {
									"type": "string",
									"value": ""
								}
							},
							"presencePenaltyEnabled": false,
							"presence_penalty": 0.4,
							"prompts": [
								{
									"content": "User's query:\n{sys.query}\n\nRefined question:\n{Agent:ThreePathsDecide@content}",
									"role": "user"
								}
							],
							"sys_prompt": "Role: You are a Search-Driven Information Agent that answers questions using web search results.\n\nWorkflow:\nKeyword Extraction:\nExtract exactly 3 keywords from the user's question.\n\nKeywords must be:\n✅ Most specific nouns/proper nouns (e.g., \"iPhone 15 Pro\" not \"phone\")\n✅ Core concepts (e.g., \"quantum entanglement\" not \"science thing\")\n✅ Unbiased (no added opinions)\nNever output keywords to users\n\nSearch & Answer:\nUse search tools (TavilySearch, TavilyExtract, Google, Bing, DuckDuckGo, Wikipedia)  with the 3 keywords to retrieve results.\nAnswer solely based on search findings, citing sources.\nIf results conflict, prioritize recent (.gov/.edu > forums)\n\nOutput Rules:\n✖️ Never show keywords in final answers\n✖️ Never guess if search yields no results\n✅ Always cite sources using [Source #] notation",
							"temperature": 0.1,
							"temperatureEnabled": true,
							"tools": [
								{
									"component_name": "TavilySearch",
									"name": "TavilySearch",
									"params": {
										"api_key": "",
										"days": 7,
										"exclude_domains": [],
										"include_answer": false,
										"include_domains": [],
										"include_image_descriptions": false,
										"include_images": false,
										"include_raw_content": true,
										"max_results": 5,
										"outputs": {
											"formalized_content": {
												"type": "string",
												"value": ""
											},
											"json": {
												"type": "Array<Object>",
												"value": []
											}
										},
										"query": "sys.query",
										"search_depth": "basic",
										"topic": "general"
									}
								},
								{
									"component_name": "TavilyExtract",
									"name": "TavilyExtract",
									"params": {
										"api_key": ""
									}
								},
								{
									"component_name": "Google",
									"name": "Google",
									"params": {
										"api_key": "",
										"country": "us",
										"language": "en"
									}
								},
								{
									"component_name": "Bing",
									"name": "Bing",
									"params": {
										"api_key": "YOUR_API_KEY (obtained from https://www.microsoft.com/en-us/bing/apis/bing-web-search-api)",
										"channel": "Webpages",
										"country": "CH",
										"language": "en",
										"top_n": 10
									}
								},
								{
									"component_name": "DuckDuckGo",
									"name": "DuckDuckGo",
									"params": {
										"channel": "text",
										"top_n": 10
									}
								},
								{
									"component_name": "Wikipedia",
									"name": "Wikipedia",
									"params": {
										"language": "en",
										"top_n": 10
									}
								}
							],
							"topPEnabled": false,
							"top_p": 0.3,
							"user_prompt": "",
							"visual_files_var": ""
						},
						"label": "Agent",
						"name": "Search Agent"
					},
					"dragging": false,
					"id": "Agent:WildGoatsRule",
					"measured": {
						"height": 84,
						"width": 200
					},
					"position": {
						"x": 678.5892767651895,
						"y": 2.074237779456759
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "agentNode"
				},
				{
					"data": {
						"form": {
							"cross_languages": [],
							"empty_response": "",
							"kb_ids": [],
							"keywords_similarity_weight": 0.7,
							"outputs": {
								"formalized_content": {
									"type": "string",
									"value": ""
								}
							},
							"query": "Agent:ThreePathsDecide@content",
							"rerank_id": "",
							"similarity_threshold": 0.2,
							"top_k": 1024,
							"top_n": 8,
							"use_kg": false
						},
						"label": "Retrieval",
						"name": "Retrieval from knowledge bases "
					},
					"dragging": false,
					"id": "Retrieval:WarmTimesRun",
					"measured": {
						"height": 56,
						"width": 200
					},
					"position": {
						"x": 689.0595178434597,
						"y": 499.2340890704343
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "retrievalNode"
				},
				{
					"data": {
						"form": {
							"delay_after_error": 1,
							"description": "",
							"exception_comment": "",
							"exception_default_value": "",
							"exception_goto": [],
							"exception_method": null,
							"frequencyPenaltyEnabled": false,
							"frequency_penalty": 0.7,
							"llm_id": "deepseek-chat@DeepSeek",
							"maxTokensEnabled": false,
							"max_retries": 3,
							"max_rounds": 1,
							"max_tokens": 256,
							"mcp": [],
							"message_history_window_size": 12,
							"outputs": {
								"content": {
									"type": "string",
									"value": ""
								}
							},
							"presencePenaltyEnabled": false,
							"presence_penalty": 0.4,
							"prompts": [
								{
									"content": "User's query:\n{sys.query}\n\nRefined question:\n{Agent:ThreePathsDecide@content}\n\nWeb search result:\n{Agent:WildGoatsRule@content}\n\nRetrieval result:\n{Agent:WildGoatsRule@content}",
									"role": "user"
								}
							],
							"sys_prompt": "Role: You are an Answer Organizer.\nTask: Generate the answer based on the provided content from: User's query, Refined question, Web search result, Retrieval result.\n\nRequirements:\n  - Answer should be in markdown format.\n - Answer should include all \n  - Do not make thing up when there's no relevant information to user's question. \n",
							"temperature": 0.1,
							"temperatureEnabled": true,
							"tools": [],
							"topPEnabled": false,
							"top_p": 0.3,
							"user_prompt": "",
							"visual_files_var": ""
						},
						"label": "Agent",
						"name": "Answer Organizer"
					},
					"dragging": false,
					"id": "Agent:SmartSchoolsCross",
					"measured": {
						"height": 84,
						"width": 200
					},
					"position": {
						"x": 1134.5321493898284,
						"y": 221.46972754101765
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "agentNode"
				},
				{
					"data": {
						"form": {
							"content": [
								"{Agent:SmartSchoolsCross@content}"
							]
						},
						"label": "Message",
						"name": "Answer"
					},
					"dragging": false,
					"id": "Message:ShaggyRingsCrash",
					"measured": {
						"height": 56,
						"width": 200
					},
					"position": {
						"x": 1437.758553651028,
						"y": 235.45081267288185
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "messageNode"
				},
				{
					"data": {
						"form": {
							"text": "This Agent rewrites your question for better search & retrieval results."
						},
						"label": "Note",
						"name": "Note: Refine Question"
					},
					"dragHandle": ".note-drag-handle",
					"id": "Note:BetterCupsBow",
					"measured": {
						"height": 136,
						"width": 244
					},
					"position": {
						"x": 270,
						"y": 390
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "noteNode"
				},
				{
					"data": {
						"form": {
							"text": "This Agent answers questions using web search results."
						},
						"label": "Note",
						"name": "Note: Search Agent"
					},
					"dragHandle": ".note-drag-handle",
					"dragging": false,
					"id": "Note:OddGoatsBeg",
					"measured": {
						"height": 136,
						"width": 244
					},
					"position": {
						"x": 689.3401860180043,
						"y": -204.46057070562227
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "noteNode"
				},
				{
					"data": {
						"form": {
							"text": "This Agents generates the answer based on the provided content from: User's query, Refined question, Web search result, Retrieval result."
						},
						"label": "Note",
						"name": "Note: Answer Organizer"
					},
					"dragHandle": ".note-drag-handle",
					"dragging": false,
					"height": 188,
					"id": "Note:SlowBottlesHope",
					"measured": {
						"height": 188,
						"width": 251
					},
					"position": {
						"x": 1152.1929528629184,
						"y": 375.08305219772546
					},
					"resizing": false,
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "noteNode",
					"width": 251
				},
				{
					"data": {
						"form": {
							"description": "This is an agent for a specific task.",
							"user_prompt": "This is the order you need to send to the agent."
						},
						"label": "Tool",
						"name": "flow.tool_0"
					},
					"dragging": false,
					"id": "Tool:TrueCrewsTake",
					"measured": {
						"height": 228,
						"width": 200
					},
					"position": {
						"x": 642.9703031510875,
						"y": 144.80253344921545
					},
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "toolNode"
				},
				{
					"data": {
						"form": {
							"text": "This is a chat assistant template that integrates information extracted from a knowledge base and web searches to respond to queries. Let's start by setting up your knowledge base in 'Retrieval'!"
						},
						"label": "Note",
						"name": "Workflow Overall Description"
					},
					"dragHandle": ".note-drag-handle",
					"dragging": false,
					"height": 163,
					"id": "Note:BumpySteaksPump",
					"measured": {
						"height": 163,
						"width": 389
					},
					"position": {
						"x": -36.59148337976953,
						"y": 1.488564577528809
					},
					"resizing": false,
					"selected": false,
					"sourcePosition": "right",
					"targetPosition": "left",
					"type": "noteNode",
					"width": 389
				}
			]
		},
		"history": [
			[
				"user",
				"你好"
			]
		],
		"memory": [],
		"messages": [],
		"path": [
			"begin",
			"Agent:ThreePathsDecide"
		],
		"retrieval": [
			{
				"chunks": [],
				"doc_aggs": []
			},
			{
				"chunks": {},
				"doc_aggs": {}
			}
		],
		"task_id": "183442fc6dd811f091b1047c16ec874f"
	},
    "avatar": "data:image/png;base64,[encoded data, 6788 characters]"
}


