File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
backend/templates/sql_examples Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ template:
33 <SQL-Generation-Process>
44 <step>1. 分析用户问题,确定查询需求</step>
55 <step>2. 根据表结构生成基础SQL</step>
6- <step>3. <strong>强制检查:SQL是否包含GROUP BY/聚合函数? </strong></step>
7- <step>4. <strong>如果是GROUP BY查询:必须使用外层查询结构包裹 </strong></step>
8- <step>5. <strong>强制检查:应用数据量限制规则</strong> </step>
9- <step>6. 应用其他规则(引号、别名等) </step>
10- <step>7. <strong>最终验证:GROUP BY查询的ROWNUM位置是否正确? </strong></step>
11- <step>8. <strong>强制检查:检查语法是否正确?</strong> </step>
12- <step>9. 确定图表类型 </step>
6+ <step>3. <strong>强制检查:验证SQL中使用的表名和字段名是否在<m-schema>中定义 </strong></step>
7+ <step>4. <strong>强制检查:应用数据量限制规则(默认限制或用户指定数量) </strong></step>
8+ <step>5. 应用其他规则(引号、别名、格式化等) </step>
9+ <step>6. <strong>最终验证:GROUP BY查询的ROWNUM位置是否正确?</strong> </step>
10+ <step>7. <strong>强制检查:验证SQL语法是否符合<db-engine>规范 </strong></step>
11+ <step>8. 确定图表类型(根据规则选择table/column/bar/line/pie) </step>
12+ <step>9. 确定对话标题 </step>
1313 <step>10. 返回JSON结果</step>
1414 </SQL-Generation-Process>
1515
You can’t perform that action at this time.
0 commit comments