answering-natural-language-questions-with-dbt

Translate natural language business questions into SQL using dbt's semantic layer.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/piyushmal13/kandhogaya --skill answering-natural-language-questions-with-dbt-piyushmal13
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: answering-natural-language-questions-with-dbt
Source: https://github.com/piyushmal13/kandhogaya/tree/main/.kilocode/skills/dbt/skills/answering-natural-language-questions-with-dbt
Command: npx skills add https://github.com/piyushmal13/kandhogaya --skill answering-natural-language-questions-with-dbt-piyushmal13

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Translate natural language business questions into actionable SQL queries using dbt's semantic layer when available, or ad-hoc SQL otherwise, enabling non-technical users to access analytics quickly.

Core Features & Use Cases

  • Semantic-layer-first querying: leverage dbt's semantics to answer questions with minimal SQL customization.
  • Ad-hoc SQL fallback: generate and execute raw SQL when semantic layer results are insufficient.
  • Model discovery support: identify relevant dbt models and relationships to construct accurate queries for metrics like revenue, active users, and churn.

Quick Start

Ask a natural language question like "What were our total revenue last quarter by region?" to receive an answer based on the dbt data model.

Frequently Asked Questions about answering-natural-language-questions-with-dbt

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I translate natural language questions into SQL using dbt?▼

To translate natural language questions into SQL using dbt, the Skill leverages dbt's semantic layer to map business terms to data models, generating actionable SQL queries for metrics like revenue and engagement.

What is dbt semantic layer querying for natural language processing?▼

dbt semantic layer querying uses dbt's defined metrics and relationships to interpret natural language business questions, minimizing ad-hoc SQL customization and ensuring accurate data retrieval.

Can I generate ad-hoc SQL if the dbt semantic layer is insufficient?▼

Yes, you can generate ad-hoc SQL. When the dbt semantic layer results are incomplete, the Skill falls back to constructing and executing raw SQL to answer your data questions.

How does model discovery work when asking dbt data questions?▼

Model discovery identifies relevant dbt models and their relationships by analyzing artifacts. This constructs accurate queries for operational metrics, handling varying levels of model completeness.

What is the best way to query revenue metrics from dbt using plain English?▼

The best way to query revenue metrics from dbt using plain English is providing a natural language question, which the Skill processes via semantic layer guidance or ad-hoc SQL fallback.

What are the limitations of using dbt semantic layer for natural language queries?▼

Limitations of using dbt semantic layer for natural language queries include insufficient results for complex or unmapped queries, requiring an ad-hoc SQL fallback to fully answer data questions.