As shown in Figure REF , each training sample consists of user question \(Q\) , dialog history \(\mathcal {H}\) , database schema \(D\) , and target formal query \(F\) .
The dialog session used for training is synthesized as follows.
Given \(D\)  and a sampled single-turn question SQL template, the values (e.g., column names, cell values, and SQL operations) for typed slots in the template are randomly sampled to form a synthesized formal query \(F\) , and a context-free grammar is used to generate the corresponding user question \(Q\)  of \(F\) .
Follow-up questions can be generated by editing the generated \(F\)  and applying the context-free grammar.
[1]} show that using synthesized data allows SCORE to easily adapt to new tasks in few-shot settings where there is few manually-generated task labels.
