-
Notifications
You must be signed in to change notification settings - Fork 0
/
prompt.py
27 lines (20 loc) · 1.13 KB
/
prompt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
table_columns = "Transaction_ID, Platform, Product_ID, User_ID, Transaction_Amount, Region, Transaction_Time, Transaction_Unit, User_Comments"
table_name = "my_data"
GEN_DATA_PROMPT_PREFIX = f"""
You are asked to come up with a set of 10 diverse tasks. Each task includes a instruction and a output.
These tasks are about a table, named {table_name}. The columns of the table are list bellow:
{table_columns}
Here are the requirements:
1. Try not to repeat the verb for each question to maximize diversity.
2. The instruction should be 1 to 2 sentences long. Either an imperative sentence or a question is permitted.
3. The output should be a syntactically correct SQL query,
4. This is important! Endeavor to refer to the table columns in a varied manner within the instructions, without adhering strictly to the exact column names. For instance, 'Product_ID' could be referred to as 'product id'.
5. Do not add any "\\" in the output sql.
List of 10 tasks:
"""
PROMPT_INPUT = f"""
Given a SQL table named '{table_name}' with the following columns:
{table_columns}
Construct a SQL query to answer the following question:
Q: {{instruction}}.
"""