891 lines
58 KiB
JSON
891 lines
58 KiB
JSON
|
{
|
||
|
"id": 6,
|
||
|
"title": "DB Assistant",
|
||
|
"description": "An advanced agent that converts user queries into SQL statements, executes the queries, and assesses and returns the results. You must prepare three knowledge bases: 1: DDL for your database; 2: Examples of user queries converted to SQL statements; 3: A comprehensive description of your database, including but not limited to tables and records. You are also required to configure the corresponding database.",
|
||
|
"canvas_type": "chatbot",
|
||
|
"dsl": {
|
||
|
"answer": [],
|
||
|
"components": {
|
||
|
"Answer:SocialAdsWonder": {
|
||
|
"downstream": [
|
||
|
"RewriteQuestion:WildIdeasTell"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "Answer",
|
||
|
"inputs": [],
|
||
|
"output": {},
|
||
|
"params": {}
|
||
|
},
|
||
|
"upstream": [
|
||
|
"ExeSQL:QuietRosesRun",
|
||
|
"begin"
|
||
|
]
|
||
|
},
|
||
|
"ExeSQL:QuietRosesRun": {
|
||
|
"downstream": [
|
||
|
"Answer:SocialAdsWonder"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "ExeSQL",
|
||
|
"inputs": [],
|
||
|
"output": {},
|
||
|
"params": {
|
||
|
"database": "",
|
||
|
"db_type": "mysql",
|
||
|
"frequencyPenaltyEnabled": true,
|
||
|
"frequency_penalty": 0.7,
|
||
|
"host": "",
|
||
|
"llm_id": "deepseek-chat@DeepSeek",
|
||
|
"loop": 3,
|
||
|
"maxTokensEnabled": true,
|
||
|
"max_tokens": 512,
|
||
|
"password": "",
|
||
|
"port": 6630,
|
||
|
"presencePenaltyEnabled": true,
|
||
|
"presence_penalty": 0.4,
|
||
|
"query": [],
|
||
|
"temperature": 0.1,
|
||
|
"temperatureEnabled": true,
|
||
|
"topPEnabled": true,
|
||
|
"top_n": 30,
|
||
|
"top_p": 0.3,
|
||
|
"username": "root"
|
||
|
}
|
||
|
},
|
||
|
"upstream": [
|
||
|
"Generate:BlueShirtsLaugh"
|
||
|
]
|
||
|
},
|
||
|
"Generate:BlueShirtsLaugh": {
|
||
|
"downstream": [
|
||
|
"ExeSQL:QuietRosesRun"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "Generate",
|
||
|
"params": {
|
||
|
"cite": false,
|
||
|
"frequency_penalty": 0.7,
|
||
|
"llm_id": "deepseek-chat@DeepSeek",
|
||
|
"message_history_window_size": 1,
|
||
|
"parameters": [],
|
||
|
"presence_penalty": 0.4,
|
||
|
"prompt": "\n##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:SillyPartsCheer}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:OddSingersRefuse}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:BrownStreetsRhyme}.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.",
|
||
|
"temperature": 0.1,
|
||
|
"top_p": 0.3
|
||
|
}
|
||
|
},
|
||
|
"upstream": [
|
||
|
"Retrieval:SillyPartsCheer",
|
||
|
"Retrieval:BrownStreetsRhyme",
|
||
|
"Retrieval:OddSingersRefuse"
|
||
|
]
|
||
|
},
|
||
|
"Retrieval:BrownStreetsRhyme": {
|
||
|
"downstream": [
|
||
|
"Generate:BlueShirtsLaugh"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "Retrieval",
|
||
|
"inputs": [],
|
||
|
"output": {},
|
||
|
"params": {
|
||
|
"empty_response": "Nothing found in Q->SQL!",
|
||
|
"kb_ids": [],
|
||
|
"keywords_similarity_weight": 0.3,
|
||
|
"query": [
|
||
|
{
|
||
|
"component_id": "Answer:SocialAdsWonder",
|
||
|
"type": "reference"
|
||
|
}
|
||
|
],
|
||
|
"similarity_threshold": 0.2,
|
||
|
"top_n": 8
|
||
|
}
|
||
|
},
|
||
|
"upstream": [
|
||
|
"RewriteQuestion:WildIdeasTell"
|
||
|
]
|
||
|
},
|
||
|
"Retrieval:OddSingersRefuse": {
|
||
|
"downstream": [
|
||
|
"Generate:BlueShirtsLaugh"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "Retrieval",
|
||
|
"inputs": [],
|
||
|
"output": {},
|
||
|
"params": {
|
||
|
"empty_response": "Nothing found in DB-Description!",
|
||
|
"kb_ids": [],
|
||
|
"keywords_similarity_weight": 0.3,
|
||
|
"query": [
|
||
|
{
|
||
|
"component_id": "Answer:SocialAdsWonder",
|
||
|
"type": "reference"
|
||
|
}
|
||
|
],
|
||
|
"similarity_threshold": 0.2,
|
||
|
"top_n": 8
|
||
|
}
|
||
|
},
|
||
|
"upstream": [
|
||
|
"RewriteQuestion:WildIdeasTell"
|
||
|
]
|
||
|
},
|
||
|
"Retrieval:SillyPartsCheer": {
|
||
|
"downstream": [
|
||
|
"Generate:BlueShirtsLaugh"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "Retrieval",
|
||
|
"inputs": [],
|
||
|
"output": {},
|
||
|
"params": {
|
||
|
"empty_response": "Nothing found in DDL!",
|
||
|
"kb_ids": [],
|
||
|
"keywords_similarity_weight": 0.1,
|
||
|
"query": [
|
||
|
{
|
||
|
"component_id": "Answer:SocialAdsWonder",
|
||
|
"type": "reference"
|
||
|
}
|
||
|
],
|
||
|
"similarity_threshold": 0.02,
|
||
|
"top_n": 18
|
||
|
}
|
||
|
},
|
||
|
"upstream": [
|
||
|
"RewriteQuestion:WildIdeasTell"
|
||
|
]
|
||
|
},
|
||
|
"RewriteQuestion:WildIdeasTell": {
|
||
|
"downstream": [
|
||
|
"Retrieval:OddSingersRefuse",
|
||
|
"Retrieval:BrownStreetsRhyme",
|
||
|
"Retrieval:SillyPartsCheer"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "RewriteQuestion",
|
||
|
"params": {
|
||
|
"frequencyPenaltyEnabled": true,
|
||
|
"frequency_penalty": 0.7,
|
||
|
"llm_id": "deepseek-chat@DeepSeek",
|
||
|
"maxTokensEnabled": true,
|
||
|
"max_tokens": 256,
|
||
|
"message_history_window_size": 6,
|
||
|
"parameter": "Precise",
|
||
|
"presencePenaltyEnabled": true,
|
||
|
"presence_penalty": 0.4,
|
||
|
"temperature": 0.1,
|
||
|
"temperatureEnabled": true,
|
||
|
"topPEnabled": true,
|
||
|
"top_p": 0.3
|
||
|
}
|
||
|
},
|
||
|
"upstream": [
|
||
|
"Answer:SocialAdsWonder"
|
||
|
]
|
||
|
},
|
||
|
"begin": {
|
||
|
"downstream": [
|
||
|
"Answer:SocialAdsWonder"
|
||
|
],
|
||
|
"obj": {
|
||
|
"component_name": "Begin",
|
||
|
"inputs": [],
|
||
|
"output": {
|
||
|
"content": {
|
||
|
"0": {
|
||
|
"content": "Hi! I'm your smart assistant. What can I do for you?"
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
"params": {}
|
||
|
},
|
||
|
"upstream": []
|
||
|
}
|
||
|
},
|
||
|
"embed_id": "BAAI/bge-large-zh-v1.5",
|
||
|
"graph": {
|
||
|
"edges": [
|
||
|
{
|
||
|
"id": "xy-edge__ExeSQL:QuietRosesRunc-Answer:SocialAdsWonderc",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "ExeSQL:QuietRosesRun",
|
||
|
"sourceHandle": "c",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Answer:SocialAdsWonder",
|
||
|
"targetHandle": "c",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__begin-Answer:SocialAdsWonderc",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "begin",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Answer:SocialAdsWonder",
|
||
|
"targetHandle": "c",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__Answer:SocialAdsWonderb-RewriteQuestion:WildIdeasTellc",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "Answer:SocialAdsWonder",
|
||
|
"sourceHandle": "b",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "RewriteQuestion:WildIdeasTell",
|
||
|
"targetHandle": "c",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__RewriteQuestion:WildIdeasTellb-Retrieval:OddSingersRefusec",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "RewriteQuestion:WildIdeasTell",
|
||
|
"sourceHandle": "b",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Retrieval:OddSingersRefuse",
|
||
|
"targetHandle": "c",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__RewriteQuestion:WildIdeasTellb-Retrieval:BrownStreetsRhymec",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "RewriteQuestion:WildIdeasTell",
|
||
|
"sourceHandle": "b",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Retrieval:BrownStreetsRhyme",
|
||
|
"targetHandle": "c",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__RewriteQuestion:WildIdeasTellb-Retrieval:SillyPartsCheerc",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "RewriteQuestion:WildIdeasTell",
|
||
|
"sourceHandle": "b",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Retrieval:SillyPartsCheer",
|
||
|
"targetHandle": "c",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__Generate:BlueShirtsLaughc-ExeSQL:QuietRosesRunb",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "Generate:BlueShirtsLaugh",
|
||
|
"sourceHandle": "c",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "ExeSQL:QuietRosesRun",
|
||
|
"targetHandle": "b",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__Retrieval:SillyPartsCheerb-Generate:BlueShirtsLaughb",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "Retrieval:SillyPartsCheer",
|
||
|
"sourceHandle": "b",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Generate:BlueShirtsLaugh",
|
||
|
"targetHandle": "b",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__Retrieval:BrownStreetsRhymeb-Generate:BlueShirtsLaughb",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "Retrieval:BrownStreetsRhyme",
|
||
|
"sourceHandle": "b",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Generate:BlueShirtsLaugh",
|
||
|
"targetHandle": "b",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
},
|
||
|
{
|
||
|
"id": "xy-edge__Retrieval:OddSingersRefuseb-Generate:BlueShirtsLaughb",
|
||
|
"markerEnd": "logo",
|
||
|
"source": "Retrieval:OddSingersRefuse",
|
||
|
"sourceHandle": "b",
|
||
|
"style": {
|
||
|
"stroke": "rgb(202 197 245)",
|
||
|
"strokeWidth": 2
|
||
|
},
|
||
|
"target": "Generate:BlueShirtsLaugh",
|
||
|
"targetHandle": "b",
|
||
|
"type": "buttonEdge",
|
||
|
"zIndex": 1001
|
||
|
}
|
||
|
],
|
||
|
"nodes": [
|
||
|
{
|
||
|
"data": {
|
||
|
"label": "Begin",
|
||
|
"name": "begin"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"height": 44,
|
||
|
"id": "begin",
|
||
|
"measured": {
|
||
|
"height": 44,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": -707.997699967585,
|
||
|
"y": 271.71609546793474
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": -707.997699967585,
|
||
|
"y": 271.71609546793474
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "left",
|
||
|
"targetPosition": "right",
|
||
|
"type": "beginNode",
|
||
|
"width": 200
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {},
|
||
|
"label": "Answer",
|
||
|
"name": "Interface"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"height": 44,
|
||
|
"id": "Answer:SocialAdsWonder",
|
||
|
"measured": {
|
||
|
"height": 44,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": -265.59460323639587,
|
||
|
"y": 271.1879130306969
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": -58.36886074370702,
|
||
|
"y": 272.1213623212045
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"targetPosition": "left",
|
||
|
"type": "logicNode",
|
||
|
"width": 200
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"empty_response": "Nothing found in DDL!",
|
||
|
"kb_ids": [],
|
||
|
"keywords_similarity_weight": 0.1,
|
||
|
"query": [
|
||
|
{
|
||
|
"component_id": "Answer:SocialAdsWonder",
|
||
|
"type": "reference"
|
||
|
}
|
||
|
],
|
||
|
"similarity_threshold": 0.02,
|
||
|
"top_n": 18
|
||
|
},
|
||
|
"label": "Retrieval",
|
||
|
"name": "DDL"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"height": 106,
|
||
|
"id": "Retrieval:SillyPartsCheer",
|
||
|
"measured": {
|
||
|
"height": 106,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 194.69889765569846,
|
||
|
"y": 61.49435233230193
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": 198.3020069445181,
|
||
|
"y": -0.9595420072386389
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"targetPosition": "left",
|
||
|
"type": "retrievalNode",
|
||
|
"width": 200
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"empty_response": "Nothing found in Q->SQL!",
|
||
|
"kb_ids": [],
|
||
|
"keywords_similarity_weight": 0.3,
|
||
|
"query": [
|
||
|
{
|
||
|
"component_id": "Answer:SocialAdsWonder",
|
||
|
"type": "reference"
|
||
|
}
|
||
|
],
|
||
|
"similarity_threshold": 0.2,
|
||
|
"top_n": 8
|
||
|
},
|
||
|
"label": "Retrieval",
|
||
|
"name": "Q->SQL"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"height": 106,
|
||
|
"id": "Retrieval:BrownStreetsRhyme",
|
||
|
"measured": {
|
||
|
"height": 106,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 240.78282320440022,
|
||
|
"y": 162.66081324653166
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": 231.17453176754782,
|
||
|
"y": 123.02661106951555
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"targetPosition": "left",
|
||
|
"type": "retrievalNode",
|
||
|
"width": 200
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"empty_response": "Nothing found in DB-Description!",
|
||
|
"kb_ids": [],
|
||
|
"keywords_similarity_weight": 0.3,
|
||
|
"query": [
|
||
|
{
|
||
|
"component_id": "Answer:SocialAdsWonder",
|
||
|
"type": "reference"
|
||
|
}
|
||
|
],
|
||
|
"similarity_threshold": 0.2,
|
||
|
"top_n": 8
|
||
|
},
|
||
|
"label": "Retrieval",
|
||
|
"name": "DB Description"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"height": 106,
|
||
|
"id": "Retrieval:OddSingersRefuse",
|
||
|
"measured": {
|
||
|
"height": 106,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 284.5720579655624,
|
||
|
"y": 246.75395940479467
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": 267.7575479510707,
|
||
|
"y": 249.15603226400776
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"targetPosition": "left",
|
||
|
"type": "retrievalNode",
|
||
|
"width": 200
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"text": "Based on the result of the SQL execution, returns the error message to the large model if any errors occur; otherwise, returns the result to the user."
|
||
|
},
|
||
|
"label": "Note",
|
||
|
"name": "N: Analyze SQL"
|
||
|
},
|
||
|
"dragHandle": ".note-drag-handle",
|
||
|
"dragging": false,
|
||
|
"height": 165,
|
||
|
"id": "Note:HeavyIconsFollow",
|
||
|
"measured": {
|
||
|
"height": 165,
|
||
|
"width": 347
|
||
|
},
|
||
|
"position": {
|
||
|
"x": -709.8631299685773,
|
||
|
"y": 96.50319908555313
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": -626.6563777191027,
|
||
|
"y": -48.82220889683933
|
||
|
},
|
||
|
"resizing": false,
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"style": {
|
||
|
"height": 176,
|
||
|
"width": 266
|
||
|
},
|
||
|
"targetPosition": "left",
|
||
|
"type": "noteNode",
|
||
|
"width": 347
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"text": "Receives the user's database-related questions and displays the large model's response."
|
||
|
},
|
||
|
"label": "Note",
|
||
|
"name": "N: Interface"
|
||
|
},
|
||
|
"dragHandle": ".note-drag-handle",
|
||
|
"dragging": false,
|
||
|
"height": 159,
|
||
|
"id": "Note:PinkTaxesClean",
|
||
|
"measured": {
|
||
|
"height": 159,
|
||
|
"width": 259
|
||
|
},
|
||
|
"position": {
|
||
|
"x": -253.39933811515345,
|
||
|
"y": 353.7538896054877
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": -52.004609812312424,
|
||
|
"y": 336.95180237635077
|
||
|
},
|
||
|
"resizing": false,
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"style": {
|
||
|
"height": 162,
|
||
|
"width": 210
|
||
|
},
|
||
|
"targetPosition": "left",
|
||
|
"type": "noteNode",
|
||
|
"width": 259
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"text": "Searches for description about meanings of tables and fields."
|
||
|
},
|
||
|
"label": "Note",
|
||
|
"name": "N:DB Description"
|
||
|
},
|
||
|
"dragHandle": ".note-drag-handle",
|
||
|
"dragging": false,
|
||
|
"height": 128,
|
||
|
"id": "Note:IcyTreesPeel",
|
||
|
"measured": {
|
||
|
"height": 128,
|
||
|
"width": 251
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 280.8431980571563,
|
||
|
"y": 394.1463067004627
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": 280.8431980571563,
|
||
|
"y": 394.1463067004627
|
||
|
},
|
||
|
"resizing": false,
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"style": {
|
||
|
"height": 128,
|
||
|
"width": 251
|
||
|
},
|
||
|
"targetPosition": "left",
|
||
|
"type": "noteNode",
|
||
|
"width": 251
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"text": "Searches for samples about question to SQL.\nPlease check this dataset: https://huggingface.co/datasets/InfiniFlow/text2sql"
|
||
|
},
|
||
|
"label": "Note",
|
||
|
"name": "N: Q->SQL"
|
||
|
},
|
||
|
"dragHandle": ".note-drag-handle",
|
||
|
"dragging": false,
|
||
|
"height": 143,
|
||
|
"id": "Note:HugeGroupsScream",
|
||
|
"measured": {
|
||
|
"height": 143,
|
||
|
"width": 390
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 612.8793199038756,
|
||
|
"y": 169.1868576959871
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": 606.1206536213404,
|
||
|
"y": 113.09441734894426
|
||
|
},
|
||
|
"resizing": false,
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"style": {
|
||
|
"height": 131,
|
||
|
"width": 387
|
||
|
},
|
||
|
"targetPosition": "left",
|
||
|
"type": "noteNode",
|
||
|
"width": 390
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"text": "DDL(Data Definition Language).\n\nSearches for relevant database creation statements.\n\nIt should bind with a KB to which DDL is dumped in.\nYou could use 'General' as parsing method and ';' as delimiter."
|
||
|
},
|
||
|
"label": "Note",
|
||
|
"name": "N: DDL"
|
||
|
},
|
||
|
"dragHandle": ".note-drag-handle",
|
||
|
"dragging": false,
|
||
|
"height": 208,
|
||
|
"id": "Note:GreenCrewsArrive",
|
||
|
"measured": {
|
||
|
"height": 208,
|
||
|
"width": 467
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 649.3481710005742,
|
||
|
"y": -87.70873445087781
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": 545.3423934788841,
|
||
|
"y": -166.58872868890683
|
||
|
},
|
||
|
"resizing": false,
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"style": {
|
||
|
"height": 266,
|
||
|
"width": 266
|
||
|
},
|
||
|
"targetPosition": "left",
|
||
|
"type": "noteNode",
|
||
|
"width": 467
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"text": "The large model learns which tables may be available based on the responses from three knowledge bases and converts the user's input into SQL statements."
|
||
|
},
|
||
|
"label": "Note",
|
||
|
"name": "N: Generate SQL"
|
||
|
},
|
||
|
"dragHandle": ".note-drag-handle",
|
||
|
"dragging": false,
|
||
|
"height": 196,
|
||
|
"id": "Note:EightTurtlesLike",
|
||
|
"measured": {
|
||
|
"height": 196,
|
||
|
"width": 341
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 134.0070839275931,
|
||
|
"y": -345.41228234051727
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": 222.2150747084395,
|
||
|
"y": -445.32694170868734
|
||
|
},
|
||
|
"resizing": false,
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"style": {
|
||
|
"height": 175,
|
||
|
"width": 265
|
||
|
},
|
||
|
"targetPosition": "left",
|
||
|
"type": "noteNode",
|
||
|
"width": 341
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"text": "Executes the SQL statement in the database and returns the result.\n\nAfter configuring an accessible database, press 'Test' to ensure the accessibility.\n\nThe large model modifies the original SQL statement based on the error message and returns the modified SQL statement."
|
||
|
},
|
||
|
"label": "Note",
|
||
|
"name": "N: Execute SQL"
|
||
|
},
|
||
|
"dragHandle": ".note-drag-handle",
|
||
|
"dragging": false,
|
||
|
"height": 276,
|
||
|
"id": "Note:FreshKidsTalk",
|
||
|
"measured": {
|
||
|
"height": 276,
|
||
|
"width": 336
|
||
|
},
|
||
|
"position": {
|
||
|
"x": -304.3577648765364,
|
||
|
"y": -288.054469323955
|
||
|
},
|
||
|
"positionAbsolute": {
|
||
|
"x": -251.5866574377311,
|
||
|
"y": -372.2192837064241
|
||
|
},
|
||
|
"resizing": false,
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"style": {
|
||
|
"height": 178,
|
||
|
"width": 346
|
||
|
},
|
||
|
"targetPosition": "left",
|
||
|
"type": "noteNode",
|
||
|
"width": 336
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"database": "",
|
||
|
"db_type": "mysql",
|
||
|
"frequencyPenaltyEnabled": true,
|
||
|
"frequency_penalty": 0.7,
|
||
|
"host": "",
|
||
|
"llm_id": "deepseek-chat@DeepSeek",
|
||
|
"loop": 3,
|
||
|
"maxTokensEnabled": true,
|
||
|
"max_tokens": 512,
|
||
|
"password": "",
|
||
|
"port": 6630,
|
||
|
"presencePenaltyEnabled": true,
|
||
|
"presence_penalty": 0.4,
|
||
|
"query": [],
|
||
|
"temperature": 0.1,
|
||
|
"temperatureEnabled": true,
|
||
|
"topPEnabled": true,
|
||
|
"top_n": 30,
|
||
|
"top_p": 0.3,
|
||
|
"username": "root"
|
||
|
},
|
||
|
"label": "ExeSQL",
|
||
|
"name": "ExeSQL"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"id": "ExeSQL:QuietRosesRun",
|
||
|
"measured": {
|
||
|
"height": 64,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": -318.61920731731163,
|
||
|
"y": 3.5145731711609436
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"targetPosition": "left",
|
||
|
"type": "ragNode"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"frequencyPenaltyEnabled": true,
|
||
|
"frequency_penalty": 0.7,
|
||
|
"llm_id": "deepseek-chat@DeepSeek",
|
||
|
"maxTokensEnabled": true,
|
||
|
"max_tokens": 256,
|
||
|
"message_history_window_size": 6,
|
||
|
"parameter": "Precise",
|
||
|
"presencePenaltyEnabled": true,
|
||
|
"presence_penalty": 0.4,
|
||
|
"temperature": 0.1,
|
||
|
"temperatureEnabled": true,
|
||
|
"topPEnabled": true,
|
||
|
"top_p": 0.3
|
||
|
},
|
||
|
"label": "RewriteQuestion",
|
||
|
"name": "RefineQuestion"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"id": "RewriteQuestion:WildIdeasTell",
|
||
|
"measured": {
|
||
|
"height": 106,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": -7.734116293705583,
|
||
|
"y": 236.92372325779243
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"targetPosition": "left",
|
||
|
"type": "rewriteNode"
|
||
|
},
|
||
|
{
|
||
|
"data": {
|
||
|
"form": {
|
||
|
"cite": false,
|
||
|
"frequencyPenaltyEnabled": true,
|
||
|
"frequency_penalty": 0.7,
|
||
|
"llm_id": "deepseek-chat@DeepSeek",
|
||
|
"maxTokensEnabled": false,
|
||
|
"max_tokens": 256,
|
||
|
"message_history_window_size": 1,
|
||
|
"parameter": "Precise",
|
||
|
"parameters": [],
|
||
|
"presencePenaltyEnabled": true,
|
||
|
"presence_penalty": 0.4,
|
||
|
"prompt": "\n##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##You may use the following DDL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:SillyPartsCheer}.\n\n##You may use the following documentation as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:OddSingersRefuse}.\n\n##You may use the following SQL statements as a reference for what tables might be available. Use responses to past questions also to guide you: {Retrieval:BrownStreetsRhyme}.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.",
|
||
|
"temperature": 0.1,
|
||
|
"temperatureEnabled": true,
|
||
|
"topPEnabled": true,
|
||
|
"top_p": 0.3
|
||
|
},
|
||
|
"label": "Generate",
|
||
|
"name": "Generate SQL Statement LLM"
|
||
|
},
|
||
|
"dragging": false,
|
||
|
"id": "Generate:BlueShirtsLaugh",
|
||
|
"measured": {
|
||
|
"height": 106,
|
||
|
"width": 200
|
||
|
},
|
||
|
"position": {
|
||
|
"x": 147.62383788095065,
|
||
|
"y": -116.47462293167156
|
||
|
},
|
||
|
"selected": false,
|
||
|
"sourcePosition": "right",
|
||
|
"targetPosition": "left",
|
||
|
"type": "generateNode"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"history": [],
|
||
|
"messages": [],
|
||
|
"path": [],
|
||
|
"reference": []
|
||
|
},
|
||
|
"avatar": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJAAAACLCAYAAACOVxDgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAFZSSURBVHhe7b0HnF1Xde+/bm/TNDMaSZa73I2NKw6GQDCfhCS8ACF5DxMgCSGE0JKXSkzKSyH5J05Ih+Qln/QCOJAQegKYEIMxtgGDuy3Jlixp1Kfdub2833efu2bOjO5IYzUEfy1pz2n77LLWb6+yzz7nJroiO02n6Sgp2dueptN0VHQaQKfpmOg0gE7TMdFpAJ2mY6LTADpNx0SnAXSajon+fwcgZi1Oz1wcP/qGnQda3uxEIrFwLr4Psc85UqfTWdh38usngpa3EzpSXSeyPcebvmkmEr0bR8N4v5ctAFtOlLmcTV7PStunS5Qfr+doyznZ9E07Ew0QSK1Wy9rttjUajZCazWY4zxYhlUoly2QyIZ/fB7kwXbBx8nOeoGQy8gY4TqVSYcu5+D4pvh+nfvV8I9A3PIAQPGCo1+thW61WrVKpBNBwDGjiYHKAQAhsYGDA1q5dG/ZhBckF7cd+zonj5eT52ZKo3/dJXqbvAyxSOp0OW875+XhdpzqdEgDyJsBc9kn9mAgAAISDhC3AqdVqASwIDYDEhQctL8uvkY+6RkdHbWxsLORzzeT3rkRcXw3rVsrDea/D63MwsfWUzWYPaX+/Mo/U3hNFp5QGijMV4thB41pmamoqJPbj2gTGcy/MXk2XvC7PC4AAkmurkykQ2tCvzQ4i+gaQMLVs+7XtZLY3TqecCUMrABoA4maJJrpQ2ec6CQ3k2odjrgGg1TKT/AiHOqF169bZ4OBgOE86WeTt9Xq9n34Oci3kIMrlcmGf9PWkkwogZ04/QssAhn6AiGsV33eGIvz4vYDO74Woz+8huXD8fj/HPYx2QIRjHdduJ4PioOnHI9rj1yGAT8rn8yH1M3VO3scTQScFQN4Br8o7A1NciwACEuSMOFKn/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