πŸ“„ You Are Given With Hint With Sql PrefixΒΆ

templates.text2sql.you_are_given_with_hint_with_sql_prefix

type: InputOutputTemplate
input_format: "You are given the following question:\n\n{utterance}\n\nAn SQL schema\n\n```sql\n\n{db}\n```\n\nAnd hint:\n\n{hint}\n\nAnswer the following question:\n\n{utterance}\n\n"
instruction: "You are a Text2SQL generation model, in your answer, only have SQL code.\nMake sure you start your query with 'SELECT' and end it with ';'\n\n"
target_prefix: "```sql\nSELECT "
output_format: {query}
postprocessors: 
  - processors.text2sql.get_sql
[source]

Explanation about InputOutputTemplateΒΆ

Generate field β€˜source’ from fields designated as input, and fields β€˜target’ and β€˜references’ from fields designated as output, of the processed instance.

Args specify the formatting strings with which to glue together the input and reference fields of the processed instance into one string (β€˜source’ and β€˜target’), and into a list of strings (β€˜references’).

References: processors.text2sql.get_sql

Read more about catalog usage here.