letschemaFiltrationPrompt=`Given this question from an IT admin, and using the provided context (the osquery schema), return the subset of tables that might be relevant for designing an osquery SQL query to answer this question for computers running macOS, Windows, Linux, and/or ChromeOS.
sails.log.warn(`When trying to get a subset of tables to use to generate a query for a user, an error occurred. Full error: ${require('util').inspect(err,{depth:2})}`);
// let lighterColumn = _.pick(column, ['name', 'description', 'platforms']);
// return lighterColumn;
// });
// return lighterTable;}))}
// \`\`\`
// When generating the SQL:
// 1. Please do not use the SQL "AS" operator, nor alias tables. Always reference tables by their full name.
// 2. If this question is related to an application or program, consider using LIKE instead of something verbatim.
// 3. If this question is not possible to ask given the tables and columns available in the provided context (the osquery schema) for a particular operating system, then use empty string.
// 4. If this question is a "yes" or "no" question, or a "how many people" question, or a "how many hosts" question, then build the query such that a "yes" returns exactly one row and a "no" returns zero rows. In other words, if this question is about finding out which hosts match a "yes" or "no" question, then if a host does not match, do not include any rows for it.
// 5. Use only tables that are supported for each target platform, as documented in the provided context, considering the examples if they exist, and the available columns.
// 6. For each table that you use, only use columns that are documented for that table, as documented in the provided context.`;
// let sqlPrompt = `Given this question from an IT admin, return osquery SQL I could run on a computer (or fleet of computers) to answer this question.
// Here is the question:
// \`\`\`
// ${naturalLanguageQuestion}
// \`\`\`
// Please give me all of the above in JSON, with this data shape:
5.Ifthisquestionisa"yes"or"no"question,ora"how many people"question,ora"how many hosts"question,thenbuildthequerysuchthata"yes"returnsexactlyonerowanda"no"returnszerorows.Inotherwords,ifthisquestionisaboutfindingoutwhichhostsmatcha"yes"or"no"question,thenifahostdoesnotmatch,donotincludeanyrowsforit.