Skip to content

Commit 44dbfad

Browse files
committed
feat(component): minor update in query generation
1 parent 6b91c01 commit 44dbfad

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/components/db-query/nodes/sql-generation.node.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,15 +205,19 @@ In the last attempt, you generated this SQL query -
205205
}
206206

207207
async sampleQueries(state: DbQueryState) {
208+
let startTag = `<similar-example-query>`;
209+
let endTag = `</similar-example-query>`;
208210
let baseLine = `Here is an example query for reference that is similar to the question asked and has been validated by the user`;
209211
if (!state.fromCache) {
210-
baseLine = `Here is the last running SQL query that was generated by user that is supposed to be used as the base line for the next query generation.`;
212+
startTag = `<last-generated-query>`;
213+
endTag = `</last-generated-query>`;
214+
baseLine = `Here is the last valid SQL query that was generated for the user that is supposed to be used as the base line for the next query generation.`;
211215
}
212216
return state.sampleSql
213-
? `${baseLine} -
217+
? `${startTag}\n${baseLine} -
214218
${state.sampleSql}
215219
This was generated for the following question - \n${state.sampleSqlPrompt} \n\n
216-
`
220+
${endTag}`
217221
: '';
218222
}
219223
}

0 commit comments

Comments
 (0)