()
| 25 | * Examples: "How many records?", "List the field names", "What is the last record's field?" |
| 26 | */ |
| 27 | export function generateQuestions(): Question[] { |
| 28 | const questions: Question[] = [] |
| 29 | const idGen = createIdGenerator() |
| 30 | const getId = () => idGen.next().value |
| 31 | |
| 32 | // Get datasets with proper typing |
| 33 | const tabular = (ACCURACY_DATASETS.find(d => d.name === 'tabular')?.data.employees as Employee[]) ?? [] |
| 34 | const nested = (ACCURACY_DATASETS.find(d => d.name === 'nested')?.data.orders as Order[]) ?? [] |
| 35 | const analytics = (ACCURACY_DATASETS.find(d => d.name === 'analytics')?.data.metrics as AnalyticsMetric[]) ?? [] |
| 36 | const github = (ACCURACY_DATASETS.find(d => d.name === 'github')?.data.repositories as Repository[]) ?? [] |
| 37 | const eventLogs = (ACCURACY_DATASETS.find(d => d.name === 'event-logs')?.data.logs as EventLog[]) ?? [] |
| 38 | const nestedConfig = ACCURACY_DATASETS.find(d => d.name === 'nested-config')?.data as NestedConfig | undefined |
| 39 | |
| 40 | // Generate questions for each dataset |
| 41 | questions.push(...generateTabularQuestions(tabular, getId)) |
| 42 | questions.push(...generateNestedQuestions(nested, getId)) |
| 43 | questions.push(...generateAnalyticsQuestions(analytics, getId)) |
| 44 | questions.push(...generateGithubQuestions(github, getId)) |
| 45 | questions.push(...generateEventLogsQuestions(eventLogs, getId)) |
| 46 | questions.push(...generateNestedConfigQuestions(nestedConfig, getId)) |
| 47 | |
| 48 | // Generate structure-awareness questions (tests format-native affordances) |
| 49 | questions.push(...generateStructureQuestions(tabular, nested, analytics, github, eventLogs, getId)) |
| 50 | |
| 51 | // Generate structural-validation questions (tests ability to detect corrupted data) |
| 52 | questions.push(...generateStructuralValidationQuestions(getId)) |
| 53 | |
| 54 | return questions |
| 55 | } |
no test coverage detected
searching dependent graphs…