Train on our own BigQuery sql queries

We want our user flow to be like this:

  1. User asks a question in our app

  2. We send the question to our fine-tuned model(trained on top of davinci with some prompts and sql queries as completions)

  3. We run the sql query returned by model on our BigQuery database

  4. We show the result to user

This is specific to one project and we want to have complete query returned by the model. We are not looking for a general solution. So we are training model on our own sql queries.

I have couple of questions:

  1. Is davinci the best base model for this task to train our queries on?

  2. Is it better to send the schema in the training prompts or train it on normal queries and when user asks question send it as part of the question?

I’ve tried both the approaches and none of them looks great.

Any help would be appreciated. Thanks in advance.

1 Like