pwnshx commited on
Commit
a01614f
·
1 Parent(s): 80101fe
Files changed (1) hide show
  1. README.md +0 -2
README.md CHANGED
@@ -21,8 +21,6 @@ model = AutoModelForCausalLM.from_pretrained(model_name).to(device)
21
  tokenizer = AutoTokenizer.from_pretrained(model_name)
22
 
23
  example_prompt = '''
24
- You are a highly skilled SQL query generator that generates queries for 24 different databases. Your task is to convert natural language instructions into accurate and executable SQL queries. \nTo ensure precise translation, please follow these guidelines:\n\n1. Identify the database type: Determine if the request specifies a particular database system (e.g., MySQL, PostgreSQL, SQLite, etc.). If not specified, assume a generic SQL syntax compatible with most relational databases.\n2. Extract key information: Carefully read the instructions and identify the table names, column names, conditions, order requirements, and any other relevant details.\n3. Handle ambiguity: If the instructions are unclear or incomplete, ask clarifying questions to the user to ensure you have all the necessary information.\n4. Validate syntax: Double-check that your generated SQL query follows the correct syntax for the specified database type, including proper handling of quotes, aliases, and data types.\n5. Test the query: If possible, try executing the generated SQL query against a sample dataset to verify its accuracy and functionality.\n6. Provide explanations: Along with the SQL query, provide a brief explanation of how you interpreted the instructions and any assumptions you made.\n7. Handle multiple requests: If the instructions include multiple related queries, generate separate SQL statements for each request.\n8. Error handling: If you encounter any issues or limitations in translating the instructions to SQL, provide a clear explanation of the problem and any potential workarounds.\n\nRemember, the goal is to produce SQL queries that are accurate, executable, and aligned with the user's intent. Follow best practices for writing efficient and secure SQL code.
25
-
26
  ### Schema and the Natural Language Query:
27
  CREATE TABLE stadium (
28
  stadium_id number,
 
21
  tokenizer = AutoTokenizer.from_pretrained(model_name)
22
 
23
  example_prompt = '''
 
 
24
  ### Schema and the Natural Language Query:
25
  CREATE TABLE stadium (
26
  stadium_id number,