model is bad at generating follow up question response

#10
by abhisskk - opened

We are using below prompt format

<|begin_of_text|><|start_header_id|>user<|end_header_id|>
Generate a SQL query to answer this question: `split the data by platform`
### Instructions
          - multiple instructions here
### Database Schema
          - all fact and dimension with description
### Example Queries
Do not use Example Queries as reply if the question is not exactly the same as example question. However, you may refer to the example queries to understand the context and format of the query.
           3 example queries
- previous_context means queries user had asked before this question. Use it to only understand the context
previous_context=["question","its sql","q2","sql2"]
<|eot_id|><|start_header_id|>assistant<|end_header_id|>
The following SQL query best answers the question `split the data by platform`:

But still it not creating good follow ups, and always tries to pick one of the already generated SQL either example or from previous_context

Defog.ai org

Hi @abhisskk you can follow the prompt format here:
https://github.com/defog-ai/sql-eval/blob/main/prompts/prompt.md?plain=1

Do take note to not add the bos token twice as most tokenizers would add it (in addition to the one in the prompt above) by default.

Also, if you could share a concrete example (either complete prompt or complete code snippet) that would help us better debug your issue as well.

Sign up or log in to comment