You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The commit updates the `using_mindsdb_inference_with_text2sql_prompt.py` script. Important changes include removing redundant lines and changing the way query results are queried. Also, the function is updated to obtain chat results using a 'chat_completion
# the prompt should be a question that can be answered by the database
16
-
SYSTEM_PROMPT="""You are a SQL expert. Given an input question, first create a syntactically correct SQL query to run,
17
-
then look at the results of the query and return the answer to the input question.
18
-
Unless the user specifies in the question a specific number of examples to obtain, query for at most 5 results using the
19
-
LIMIT clause as per SQL standards. You can order the results to return the most informative data in the database.
20
-
Never query for all columns from a table. You must query only the columns that are needed to answer the question.
21
-
Wrap each column name in backticks (`) to denote them as identifiers.
22
-
Pay attention to use only the column names you can see in the tables below.
23
-
Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.
16
+
SYSTEM_PROMPT="""You are a SQL expert. Given an input question, first create a syntactically correct SQL query to run, then look at the results of the query and return the answer to the input question.
17
+
Unless the user specifies in the question a specific number of examples to obtain, query for at most 5 results using the LIMIT clause as per SQL standards. You can order the results to return the most informative data in the database.
18
+
Never query for all columns from a table. You must query only the columns that are needed to answer the question. Wrap each column name in backticks (`) to denote them as identifiers.
19
+
Pay attention to use only the column names you can see in the tables below. Be careful to not query for columns that do not exist. Also, pay attention to which column is in which table.
24
20
Pay attention to use CURRENT_DATE function to get the current date, if the question involves "today".
0 commit comments