Answer Preparation Steps
This section describes how to use the EXPLAIN tab under Query Inspector.
Connecty AI breaks the question into a pipeline of four steps to generate accurate and secure response from structured data: Intent -> Context -> Grammar -> Query
Here’s what each step means:
1. Intent
Goal: Understand what the user wants.
The system retrieves and decomposes the semantic intent behind the natural language question.
For example, if a user says, “How many users signed up last month?”, the intent might be:
Retrieve count of user signups
Filter by signup date in the previous month
This is the "what" of the request — the high-level task the system must solve.

2. Context
Goal: Understand where and how to apply the intent using data structure and relationships.
Uses metadata, data lineage, and semantic layers to understand:
What “users” means (e.g., user_table)
What “last month” maps to in the data (e.g., signup_date)
Leverages previously learned relationships between tables, columns, and business terms.
This is the "framework" of meaning based on the underlying database and previous interactions.

3. Grammar
Goal: Transform structured intent into a syntactically correct query logic.
Converts the mapped concepts into a logical grammar structure using Connecty’s autonomous semantic graph.
Builds the internal representation of operations: SELECT, WHERE, GROUP BY, etc.
Ensures the query will both make sense to the database and stay true to user intent.
Think of this as the "blueprint" from the parsed meaning into executable form.

4. Query
Goal: Generate and execute the final SQL.
Outputs the final query that can be run on the data warehouse.
Executes this query and shows the results in form of a data table
This is the "deliverable" — the actual output that provides the user with an answer.

Last updated