What problem does it solve?
Answering business metrics and data questions against an ontology knowledge network requires choosing the right knowledge network, discovering object types and fields, generating correct SQL, and executing it safely. This Skill defines a fixed five-step pipeline that coordinates these stages so natural-language data questions produce verifiable SQL and grounded results without hallucinated tables or fabricated numbers.
Core Features & Use Cases
- Fixed 5-step pipeline: Receive kn_id, discover schema via bkn object-type commands, generate SELECT/WITH SQL at the orchestration LLM layer, execute via dataview query, then summarize with SQL and result data shown together.
- Schema-first SQL generation: Requires dataview get to fetch three-part meta_table_name before any SQL is written, preventing empty results from bare table names and eliminating field-name hallucination.
- Strict safety constraints: Only SELECT/WITH statements are allowed, write operations and --raw-sql are rejected, and empty results must be reported honestly rather than filled with invented data.
- Use Case: A user asks "last month's sales by region"; the Skill resolves the knowledge network, discovers the fact_sales_order and dim_region object types, generates a GROUP BY aggregation query, executes it through the ontology CLI, and returns the SQL plus a results table.
Quick Start
Ask a Chinese data question such as "上个月各区域销售额,按区域汇总" and let the skill resolve the knowledge network, generate the SQL, and return the executed results with the query shown.