From 2edbcb3c1467f4667f42a3f66b23eb1cd2f180f1 Mon Sep 17 00:00:00 2001 From: Mike McNeil Date: Sat, 19 Oct 2024 18:36:55 -0500 Subject: [PATCH] Add caveats to AI-generated SQL (#23035) --- website/scripts/test-llm-generated-sql.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/website/scripts/test-llm-generated-sql.js b/website/scripts/test-llm-generated-sql.js index f02a13d467b4..c13a0e126aab 100644 --- a/website/scripts/test-llm-generated-sql.js +++ b/website/scripts/test-llm-generated-sql.js @@ -31,8 +31,11 @@ module.exports = { Provided context: \`\`\` ${JSON.stringify(prunedTables.map((table)=>{ - let lighterTable = _.pick(table, ['name','description']); - lighterTable.columns = _.pluck(table.columns, 'name'); + let lighterTable = _.pick(table, ['name','description','platforms']); + lighterTable.columns = table.columns.map((column)=>{ + let lighterColumn = _.pick(column, ['name', 'description', 'platforms']); + return lighterColumn; + }); return lighterTable; }))} \`\`\` @@ -69,9 +72,13 @@ Please give me all of the above in JSON, with this data shape: "macOSQuery": "TODO", "windowsQuery": "TODO", "linuxQuery": "TODO", - "chromeOSQuery": "TODO" + "chromeOSQuery": "TODO", + "macOSCaveats": "TODO", + "windowsCaveats": "TODO", + "linuxCaveats": "TODO", + "chromeOSCaveats": "TODO", }`; - let sqlReport = await sails.helpers.ai.prompt(sqlPrompt, 'gpt-4o', true); + let sqlReport = await sails.helpers.ai.prompt(sqlPrompt, 'o1-preview', true); // Which of my computers dont have filevault enabled?