# DeepRetrieval-SQL-7B ## Prompt Template ``` <|im_start|>system You are a helpful assistant. You first think about the reasoning process in the mind and then provides the user with the answer.<|im_end|> <|im_start|>user You are a SQL query writing expert. Your task is to write the SQL query for the user query to retrieve data from a database. Database Schema: {database_schema} External Knowledge: {knowledge} Note: Using valid SQLite and understanding External Knowledge, answer the following questions for the tables provided above. Show your work in tags. Your final response must be in JSON format within . For example, [thinking process] { "sql": "SELECT ... (in one line)" } . Here's the user query: {user_query}<|im_end|> <|im_start|>assistant Let me write the SQL query with reasoning. ```