Example prompt?

#17
by fahadh4ilyas - opened

Could you please show me example prompt? In model card, the prompt is like this:

<|begin_of_text|><|start_header_id|>user<|end_header_id|>

Generate a SQL query to answer this question: `{user_question}`
{instructions}

DDL statements:
{create_table_statements}<|eot_id|><|start_header_id|>assistant<|end_header_id|>

The following SQL query best answers the question `{user_question}`:
```sql

What I don't understand is, do you really need to add ` to the beginning and ending of {user_question}?

Defog.ai org

@fahadh4ilyas The prompt in the model card is correct. You don't need to add it to both the beginning and ending, but we've found through our own testing and benchmarks that doing so improves the performance of the model.

I have an issue. The prompt does not seem to follow my instructions that I have input in {Instructions}.
"Always return all the columns for TABLE. (Select ..., ...)" but it just refused to listen whenever the query involves joining other tables I have listed.
It also does not convert to MySQL Query as I have listed in the instruction. Not sure if the model is trained for that.

Sign up or log in to comment