{
  "id": 0,
  "title": "WebSearch Assistant",
  "description": "A chat assistant that combines information both from knowledge base and web search engines. It integrates information from the knowledge base and relevant search engines to answer a given question. What you need to do is setting up knowleage base in 'Retrieval'.",
  "canvas_type": "chatbot",
  "dsl": {
            "answer": [],
            "components": {
                "Answer:PoorMapsCover": {
                    "downstream": [
                        "Retrieval:BetterRocksJump",
                        "KeywordExtract:LegalIdeasTurn"
                    ],
                    "obj": {
                        "component_name": "Answer",
                        "params": {}
                    },
                    "upstream": [
                        "Generate:FullYearsStick",
                        "begin"
                    ]
                },
                "Baidu:OliveAreasCall": {
                    "downstream": [
                        "Generate:FullYearsStick"
                    ],
                    "obj": {
                        "component_name": "Baidu",
                        "params": {
                            "top_n": 2
                        }
                    },
                    "upstream": [
                        "KeywordExtract:LegalIdeasTurn"
                    ]
                },
                "DuckDuckGo:SoftButtonsRefuse": {
                    "downstream": [
                        "Generate:FullYearsStick"
                    ],
                    "obj": {
                        "component_name": "DuckDuckGo",
                        "params": {
                            "channel": "text",
                            "top_n": 2
                        }
                    },
                    "upstream": [
                        "KeywordExtract:LegalIdeasTurn"
                    ]
                },
                "Generate:FullYearsStick": {
                    "downstream": [
                        "Answer:PoorMapsCover"
                    ],
                    "obj": {
                        "component_name": "Generate",
                        "params": {
                            "cite": true,
                            "frequency_penalty": 0.7,
                            "llm_id": "deepseek-chat",
                            "message_history_window_size": 12,
                            "parameters": [
                                {
                                    "component_id": "Retrieval:BetterRocksJump",
                                    "id": "69415446-49bf-4d4b-8ec9-ac86066f7709",
                                    "key": "kb_input"
                                },
                                {
                                    "component_id": "DuckDuckGo:SoftButtonsRefuse",
                                    "id": "83363c2a-00a8-402f-a45c-ddc4097d7d8b",
                                    "key": "duckduckgo"
                                },
                                {
                                    "component_id": "Wikipedia:WittyRiceLearn",
                                    "id": "92c1e8e4-1597-4e65-a08d-c8cac4ac150f",
                                    "key": "wikipedia"
                                },
                                {
                                    "component_id": "Baidu:OliveAreasCall",
                                    "id": "19b5445a-7a6e-4a26-9aa9-47dfe3a03bea",
                                    "key": "baidu"
                                }
                            ],
                            "presence_penalty": 0.4,
                            "prompt": "Role: You are an intelligent assistant. \nTask: Chat with user. Answer the question based on the provided content from: Knowledge Base, Wikipedia, Duckduckgo, Baidu.\nRequirements:\n  - Answer should be in markdown format.\n - Summarize and label the sources of the cited content separately: (Knowledge Base, Wikipedia, Duckduckgo, Baidu).\n  - Attach URL links to the content which is quoted from Wikipedia, DuckDuckGo or Baidu.\n  - Do not make thing up when there's no relevant information to user's question. \n\n## Knowledge base content\n {kb_input}\n\n\n## Wikipedia content\n{wikipedia}\n\n\n## Duckduckgo content\n{duckduckgo}\n\n\n## Baidu content\n{baidu}",
                            "temperature": 0.1,
                            "top_p": 0.3
                        }
                    },
                    "upstream": [
                        "DuckDuckGo:SoftButtonsRefuse",
                        "Baidu:OliveAreasCall",
                        "Wikipedia:WittyRiceLearn",
                        "Retrieval:BetterRocksJump"
                    ]
                },
                "KeywordExtract:LegalIdeasTurn": {
                    "downstream": [
                        "Baidu:OliveAreasCall",
                        "DuckDuckGo:SoftButtonsRefuse",
                        "Wikipedia:WittyRiceLearn"
                    ],
                    "obj": {
                        "component_name": "KeywordExtract",
                        "params": {
                            "frequencyPenaltyEnabled": true,
                            "frequency_penalty": 0.7,
                            "llm_id": "deepseek-chat",
                            "maxTokensEnabled": true,
                            "max_tokens": 256,
                            "parameter": "Precise",
                            "presencePenaltyEnabled": true,
                            "presence_penalty": 0.4,
                            "temperature": 0.1,
                            "temperatureEnabled": true,
                            "topPEnabled": true,
                            "top_n": 2,
                            "top_p": 0.3
                        }
                    },
                    "upstream": [
                        "Answer:PoorMapsCover"
                    ]
                },
                "Retrieval:BetterRocksJump": {
                    "downstream": [
                        "Generate:FullYearsStick"
                    ],
                    "obj": {
                        "component_name": "Retrieval",
                        "params": {
                            "empty_response": "The answer you want was not found in the knowledge base!",
                            "kb_ids": [],
                            "keywords_similarity_weight": 0.3,
                            "similarity_threshold": 0.2,
                            "top_n": 8
                        }
                    },
                    "upstream": [
                        "Answer:PoorMapsCover"
                    ]
                },
                "Wikipedia:WittyRiceLearn": {
                    "downstream": [
                        "Generate:FullYearsStick"
                    ],
                    "obj": {
                        "component_name": "Wikipedia",
                        "params": {
                            "language": "en",
                            "top_n": 2
                        }
                    },
                    "upstream": [
                        "KeywordExtract:LegalIdeasTurn"
                    ]
                },
                "begin": {
                    "downstream": [
                        "Answer:PoorMapsCover"
                    ],
                    "obj": {
                        "component_name": "Begin",
                        "params": {}
                    },
                    "upstream": []
                }
            },
            "graph": {
                "edges": [
                    {
                        "id": "reactflow__edge-Answer:PoorMapsCovera-Retrieval:BetterRocksJumpc",
                        "markerEnd": "logo",
                        "source": "Answer:PoorMapsCover",
                        "sourceHandle": "a",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Retrieval:BetterRocksJump",
                        "targetHandle": "c",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-Answer:PoorMapsCoverb-KeywordExtract:LegalIdeasTurnc",
                        "markerEnd": "logo",
                        "source": "Answer:PoorMapsCover",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "KeywordExtract:LegalIdeasTurn",
                        "targetHandle": "c",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-KeywordExtract:LegalIdeasTurnb-Baidu:OliveAreasCallc",
                        "markerEnd": "logo",
                        "source": "KeywordExtract:LegalIdeasTurn",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Baidu:OliveAreasCall",
                        "targetHandle": "c",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-KeywordExtract:LegalIdeasTurnb-DuckDuckGo:SoftButtonsRefusec",
                        "markerEnd": "logo",
                        "source": "KeywordExtract:LegalIdeasTurn",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "DuckDuckGo:SoftButtonsRefuse",
                        "targetHandle": "c",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-KeywordExtract:LegalIdeasTurnb-Wikipedia:WittyRiceLearnc",
                        "markerEnd": "logo",
                        "source": "KeywordExtract:LegalIdeasTurn",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Wikipedia:WittyRiceLearn",
                        "targetHandle": "c",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-DuckDuckGo:SoftButtonsRefuseb-Generate:FullYearsSticka",
                        "markerEnd": "logo",
                        "source": "DuckDuckGo:SoftButtonsRefuse",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Generate:FullYearsStick",
                        "targetHandle": "a",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-Baidu:OliveAreasCallb-Generate:FullYearsSticka",
                        "markerEnd": "logo",
                        "source": "Baidu:OliveAreasCall",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Generate:FullYearsStick",
                        "targetHandle": "a",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-Wikipedia:WittyRiceLearnb-Generate:FullYearsSticka",
                        "markerEnd": "logo",
                        "source": "Wikipedia:WittyRiceLearn",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Generate:FullYearsStick",
                        "targetHandle": "a",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-Retrieval:BetterRocksJumpb-Generate:FullYearsSticka",
                        "markerEnd": "logo",
                        "source": "Retrieval:BetterRocksJump",
                        "sourceHandle": "b",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Generate:FullYearsStick",
                        "targetHandle": "a",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-Generate:FullYearsStickd-Answer:PoorMapsCoverd",
                        "markerEnd": "logo",
                        "source": "Generate:FullYearsStick",
                        "sourceHandle": "d",
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Answer:PoorMapsCover",
                        "targetHandle": "d",
                        "type": "buttonEdge"
                    },
                    {
                        "id": "reactflow__edge-begin-Answer:PoorMapsCoverc",
                        "markerEnd": "logo",
                        "source": "begin",
                        "sourceHandle": null,
                        "style": {
                            "stroke": "rgb(202 197 245)",
                            "strokeWidth": 2
                        },
                        "target": "Answer:PoorMapsCover",
                        "targetHandle": "c",
                        "type": "buttonEdge"
                    }
                ],
                "nodes": [
                    {
                        "data": {
                            "label": "Begin",
                            "name": "opening"
                        },
                        "dragging": false,
                        "height": 50,
                        "id": "begin",
                        "position": {
                            "x": -1020.0423250754997,
                            "y": 54.07040832453751
                        },
                        "positionAbsolute": {
                            "x": -1020.0423250754997,
                            "y": 54.07040832453751
                        },
                        "selected": false,
                        "sourcePosition": "left",
                        "targetPosition": "right",
                        "type": "beginNode",
                        "width": 50
                    },
                    {
                        "data": {
                            "form": {},
                            "label": "Answer",
                            "name": "interface"
                        },
                        "dragging": false,
                        "height": 100,
                        "id": "Answer:PoorMapsCover",
                        "position": {
                            "x": -880.5773333116513,
                            "y": 29.2721628695582
                        },
                        "positionAbsolute": {
                            "x": -880.5773333116513,
                            "y": 29.2721628695582
                        },
                        "selected": false,
                        "sourcePosition": "right",
                        "targetPosition": "left",
                        "type": "ragNode",
                        "width": 100
                    },
                    {
                        "data": {
                            "form": {
                                "frequencyPenaltyEnabled": true,
                                "frequency_penalty": 0.7,
                                "llm_id": "deepseek-chat",
                                "maxTokensEnabled": true,
                                "max_tokens": 256,
                                "parameter": "Precise",
                                "presencePenaltyEnabled": true,
                                "presence_penalty": 0.4,
                                "temperature": 0.1,
                                "temperatureEnabled": true,
                                "topPEnabled": true,
                                "top_n": 2,
                                "top_p": 0.3
                            },
                            "label": "KeywordExtract",
                            "name": "get keywords"
                        },
                        "dragging": false,
                        "height": 70,
                        "id": "KeywordExtract:LegalIdeasTurn",
                        "position": {
                            "x": -727.0680233991866,
                            "y": 43.6827878582167
                        },
                        "positionAbsolute": {
                            "x": -727.0680233991866,
                            "y": 43.6827878582167
                        },
                        "selected": false,
                        "sourcePosition": "right",
                        "targetPosition": "left",
                        "type": "ragNode",
                        "width": 70
                    },
                    {
                        "data": {
                            "form": {
                                "empty_response": "The answer you want was not found in the knowledge base!",
                                "kb_ids": [],
                                "keywords_similarity_weight": 0.3,
                                "similarity_threshold": 0.2,
                                "top_n": 8
                            },
                            "label": "Retrieval",
                            "name": "Search KB"
                        },
                        "dragging": false,
                        "height": 100,
                        "id": "Retrieval:BetterRocksJump",
                        "position": {
                            "x": -453.6381242126441,
                            "y": 245.01328822547293
                        },
                        "positionAbsolute": {
                            "x": -453.6381242126441,
                            "y": 245.01328822547293
                        },
                        "selected": false,
                        "sourcePosition": "right",
                        "targetPosition": "left",
                        "type": "ragNode",
                        "width": 100
                    },
                    {
                        "data": {
                            "form": {
                                "language": "en",
                                "top_n": 2
                            },
                            "label": "Wikipedia",
                            "name": "Wikipedia"
                        },
                        "dragging": false,
                        "height": 100,
                        "id": "Wikipedia:WittyRiceLearn",
                        "position": {
                            "x": -552.2594439551717,
                            "y": 155.22722562174718
                        },
                        "positionAbsolute": {
                            "x": -552.2594439551717,
                            "y": 155.22722562174718
                        },
                        "selected": false,
                        "sourcePosition": "right",
                        "targetPosition": "left",
                        "type": "ragNode",
                        "width": 100
                    },
                    {
                        "data": {
                            "form": {
                                "top_n": 2
                            },
                            "label": "Baidu",
                            "name": "Baidu"
                        },
                        "dragging": false,
                        "height": 100,
                        "id": "Baidu:OliveAreasCall",
                        "position": {
                            "x": -555.1646448972449,
                            "y": 22.458226784453046
                        },
                        "positionAbsolute": {
                            "x": -555.1646448972449,
                            "y": 22.458226784453046
                        },
                        "selected": false,
                        "sourcePosition": "right",
                        "targetPosition": "left",
                        "type": "ragNode",
                        "width": 100
                    },
                    {
                        "data": {
                            "form": {
                                "channel": "text",
                                "top_n": 2
                            },
                            "label": "DuckDuckGo",
                            "name": "DuckDuckGo"
                        },
                        "dragging": false,
                        "height": 100,
                        "id": "DuckDuckGo:SoftButtonsRefuse",
                        "position": {
                            "x": -554.7669080287701,
                            "y": -111.86266788597959
                        },
                        "positionAbsolute": {
                            "x": -554.7669080287701,
                            "y": -111.86266788597959
                        },
                        "selected": false,
                        "sourcePosition": "right",
                        "targetPosition": "left",
                        "type": "ragNode",
                        "width": 100
                    },
                    {
                        "data": {
                            "form": {
                                "cite": true,
                                "frequencyPenaltyEnabled": true,
                                "frequency_penalty": 0.7,
                                "llm_id": "deepseek-chat",
                                "message_history_window_size": 12,
                                "parameter": "Precise",
                                "parameters": [
                                    {
                                        "component_id": "Retrieval:BetterRocksJump",
                                        "id": "69415446-49bf-4d4b-8ec9-ac86066f7709",
                                        "key": "kb_input"
                                    },
                                    {
                                        "component_id": "DuckDuckGo:SoftButtonsRefuse",
                                        "id": "83363c2a-00a8-402f-a45c-ddc4097d7d8b",
                                        "key": "duckduckgo"
                                    },
                                    {
                                        "component_id": "Wikipedia:WittyRiceLearn",
                                        "id": "92c1e8e4-1597-4e65-a08d-c8cac4ac150f",
                                        "key": "wikipedia"
                                    },
                                    {
                                        "component_id": "Baidu:OliveAreasCall",
                                        "id": "19b5445a-7a6e-4a26-9aa9-47dfe3a03bea",
                                        "key": "baidu"
                                    }
                                ],
                                "presencePenaltyEnabled": true,
                                "presence_penalty": 0.4,
                                "prompt": "Role: You are an intelligent assistant. \nTask: Chat with user. Answer the question based on the provided content from: Knowledge Base, Wikipedia, Duckduckgo, Baidu.\nRequirements:\n  - Answer should be in markdown format.\n - Answer should include all sources(Knowledge Base, Wikipedia, Duckduckgo, Baidu) as long as they are relevant, and label the sources of the cited content separately.\n  - Attach URL links to the content which is quoted from Wikipedia, DuckDuckGo or Baidu.\n  - Do not make thing up when there's no relevant information to user's question. \n\n## Knowledge base content\n {kb_input}\n\n\n## Wikipedia content\n{wikipedia}\n\n\n## Duckduckgo content\n{duckduckgo}\n\n\n## Baidu content\n{baidu}",
                                "temperature": 0.1,
                                "temperatureEnabled": true,
                                "topPEnabled": true,
                                "top_p": 0.3
                            },
                            "label": "Generate",
                            "name": "LLM"
                        },
                        "dragging": false,
                        "height": 150,
                        "id": "Generate:FullYearsStick",
                        "position": {
                            "x": -355.85244068796055,
                            "y": -225.5280777950136
                        },
                        "positionAbsolute": {
                            "x": -355.85244068796055,
                            "y": -225.5280777950136
                        },
                        "selected": true,
                        "sourcePosition": "right",
                        "targetPosition": "left",
                        "type": "ragNode",
                        "width": 150
                    }
                ]
            },
            "history": [],
            "messages": [],
            "path": [],
            "reference": []
        },
  "avatar": "data:image/png;base64,[encoded data, 36128 characters]"
}
