"description":"An agent that converts user queries into SQL statements. 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.",
"prompt":"##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.\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: {ddl_input}.\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: {db_input}.\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: {sql_input}.",
"prompt":"##The user provides a question and you provide SQL. You will only respond with SQL code and not with any explanations.\n\n##Respond with only SQL code. Do not answer with any explanations -- just the code.\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: {ddl_input}.\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: {db_input}.\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: {sql_input}.",
"temperature":0.1,
"temperatureEnabled":true,
"topPEnabled":true,
"top_p":0.3
},
"label":"Generate",
"name":"LLM"
},
"dragging":false,
"height":212,
"id":"Generate:RareSymbolsGrin",
"position":{
"x":6.6098512156750076,
"y":405.0105548561454
},
"positionAbsolute":{
"x":6.6098512156750076,
"y":405.0105548561454
},
"selected":false,
"sourcePosition":"right",
"targetPosition":"left",
"type":"generateNode",
"width":200
},
{
"data":{
"form":{
"text":"Receives a sentence that the user wants to convert into SQL and displays the result of the large model's SQL conversion."
},
"label":"Note",
"name":"N: Interface"
},
"dragging":false,
"height":132,
"id":"Note:GentleRabbitsWonder",
"position":{
"x":-287.3066094433631,
"y":-30.808189185380513
},
"positionAbsolute":{
"x":-287.3066094433631,
"y":-30.808189185380513
},
"resizing":false,
"selected":false,
"sourcePosition":"right",
"style":{
"height":132,
"width":324
},
"targetPosition":"left",
"type":"noteNode",
"width":324,
"dragHandle":".note-drag-handle"
},
{
"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: LLM"
},
"dragging":false,
"height":147,
"id":"Note:SixCitiesJoke",
"position":{
"x":5.12121582244032,
"y":637.6539219843564
},
"positionAbsolute":{
"x":5.12121582244032,
"y":637.6539219843564
},
"resizing":false,
"selected":false,
"sourcePosition":"right",
"style":{
"height":147,
"width":326
},
"targetPosition":"left",
"type":"noteNode",
"width":326,
"dragHandle":".note-drag-handle"
},
{
"data":{
"form":{
"text":"Searches for description about meanings of tables and fields."
},
"label":"Note",
"name":"N: DB description"
},
"dragging":false,
"height":128,
"id":"Note:FamousCarpetsTaste",
"position":{
"x":399.9267065852242,
"y":250.0329701879931
},
"positionAbsolute":{
"x":399.9267065852242,
"y":250.0329701879931
},
"selected":false,
"sourcePosition":"right",
"targetPosition":"left",
"type":"noteNode",
"width":269,
"dragHandle":".note-drag-handle"
},
{
"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"
},
"dragging":false,
"height":130,
"id":"Note:PoliteBeesArrive",
"position":{
"x":489.0393427986917,
"y":96.58232093146341
},
"positionAbsolute":{
"x":489.0393427986917,
"y":96.58232093146341
},
"resizing":false,
"selected":false,
"sourcePosition":"right",
"style":{
"height":130,
"width":451
},
"targetPosition":"left",
"type":"noteNode",
"width":451,
"dragHandle":".note-drag-handle"
},
{
"data":{
"form":{
"text":"DDL(Data Definition Language).\n\nSearches for relevent 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."