File size: 747 Bytes
eb0f39d
 
 
e9beef1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
28
29
# DeepRetrieval-SQL-7B 

## Prompt Template

```
<|im_start|>system
You are a helpful assistant. You need to provide 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.

Your final response must be in JSON format within <answer> </answer>. For example,
<answer>
{
    "sql": "SELECT ... (in one line)"
} 
</answer>. 

Here's the user query:
{user_query}<|im_end|>
<|im_start|>assistant
Let me write the SQL query. 
<answer>
```