Query Inspector
The Query Inspector in Connecty AI is your comprehensive debugging and transparency tool for every AI-generated answer. It allows users to explore and validate how a natural language question is processed — from understanding user intent to producing an executable SQL query and displaying results.

Use the Query Inspector when you want to:
Understand how the answer was generated
Diagnose logic or data issues
Share insights with technical teammates
Provide feedback or verify correctness
Learn how Connecty reasons through complex prompts
1. Where to find it
The Query Inspector can be accessed from two primary locations in the interface:
From the SQL section of the answer
In the answer interface, navigate to the SQL block associated with the output.
Click the magnifying glass icon located in the top-right corner of the SQL block to open Query Inspector.

Next to individual versions in the AI Editor (version sidebar)
When working inside the AI Editor, each version (including edits and sub-edits) displays a small magnifying glass icon.
Clicking this icon opens the Query Inspector specific to that version.
2. Header Area

The Header Area appears at the top of the Query Inspector module and provides persistent context and control for understanding and navigating the answer breakdown. It includes the user’s original question, a navigation trail, and key action buttons in the top-right corner.
Components:
Back button Returns to the previous node in the semantic graph. This is especially helpful when exploring nested logic or diving into sub-components like filters or derived metrics.
User question Displays the original user request in natural language. This serves as an anchor to understand how the system decomposes and interprets the input.
Actions:
Mark as Verified Allows you to confirm that the selected node or logic accurately reflects your intent. Verified components become part of your query history and may influence how similar questions are interpreted in the future.
AI Editor Opens Connecty AI’s editing interface, enabling you to refine, regenerate, or adjust specific parts of the answer using AI suggestions or manual input.
Close Exits the Query Inspector and returns you to the previous screen.
3. Graph Navigation
The Graph Navigation panel gives users a high-level visual summary of how Connecty AI has decomposed and processed the original question. Each node in the graph represents a logical component of the query and the connections between them show the reasoning flow.

Key Features:
Top-down hierarchy: The root node is the original question, branching into sub-nodes that represent parts of the question like filters, measures, and joins.
Click-through navigation: Clicking a node offers you the corresponding data in Query Inspector sections — making it easy to explore how each sub-component was derived.
When it's useful:
To quickly understand complexity: Is this a single-step request or a multi-layered one?
To identify branching logic: For example, how a date filter and a region filter might be treated as separate nodes.
To trace dependencies: If a result seems off, you can investigate which part of the logic led to it.
4. Explain Tab
4.1 Intent Retrieval
The Intent Retrieval section reveals the foundational step in how Connecty AI understands your request. It identifies the underlying semantic instruction being carried forward, often retrieved from previous interactions within the conversation or chain of queries.

This section is especially useful when the current question is part of a follow-up, refinement, or continuation. For example, if a user earlier asked to filter by region = Europe, and now requests “add America too”, the Intent Retrieval panel will show the previously applied instruction and how it was reused or expanded in the current query.
What you’ll see:
Instruction ID – Unique reference of the retrieved intent.
Content – Natural language instruction retrieved from context (e.g., “Add America region.”).
Reasoning – Explanation of how or why this instruction was reused (e.g., expands filter criteria).
Message Refs – Past messages or queries that this instruction originated from.
Query Refs – Previous data queries tied to this instruction.
Why it matters:
Helps you trace inherited logic, especially in multi-turn conversations.
Confirms that follow-up instructions are correctly interpreted and connected to prior questions.
Supports debugging or reviewing query lineage when results seem unexpected.
If the results seem unrelated to your current question, check here to see if the AI pulled context from an earlier instruction.
4.2 Intent Decomposition
The Intent Decomposition section breaks down the high-level user intent into logical subcomponents or steps the system can execute.

In this stage, Connecty AI visually decomposes the user’s natural language request into smaller, actionable building blocks—each representing a distinct part of the overall task. These blocks might include filters, measures, dimensions, or derived metrics. This visual map allows users to trace how their original question has been semantically structured and operationalized.
What you see:
A tree diagram showing how the primary intent is divided into sub-intents. For example:
Main node: Order frequency per customer (derived measure)
Sub-nodes:
First order date per customer
Last order date per customer
Total number of orders per customer
Arrows between nodes illustrate how lower-level concepts contribute to higher-level logic.
Why it matters:
Helps users verify if the system correctly understood all required components of the request.
Exposes derived logic (like frequency = total orders / time span) to ensure it aligns with expectations.
Clarifies how complex queries are composed from simpler, traceable concepts.
If the graph doesn’t match your mental model, the AI may have misunderstood the question. Use the AI Editor to adjust.
4.3 Context
Maps each part of the user’s question to the actual data objects and relationships in the connected data source.

Once the intent is broken down, the Context step ensures that each semantic element (like “users”, “orders”, or “last month”) is correctly interpreted in relation to the dataset’s structure. This involves identifying the relevant tables, columns, and relationships based on metadata, data lineage, and previously learned semantics.
What you see:
A list of relevant objects such as:
tpch_tpch_sf1.orders
tpch_tpch_sf1.customer
tpch_tpch_sf1.region
…and other related tables inferred as necessary for the query.
Each entry displays the full database → schema → table path for clarity.
Execution time for this step is shown, helping assess complexity.
Why It matters:
Ensures correct binding between natural language terms and real data structures.
Prevents errors caused by ambiguous column/table names.
Allows you to verify whether the AI is targeting the correct dataset components before generating a SQL query.
Make sure the AI selected the right objects from your data catalog.
4.4 Grammar
Converts the structured intent and mapped context into an abstract, logic-ready format that can be translated into SQL.

The Grammar stage is where Connecty AI builds the internal "blueprint" for the final query. It transforms all recognized components—like filters, aggregations, joins, and groupings—into a structured representation that mirrors the logical structure of SQL, without yet committing to SQL syntax. This ensures precision and control before the final query is executed.
What you see:
A hierarchical structure representing:
SELECT
clauses (e.g., aggregated values, dimensions)WHERE
filters (e.g., "order_date > X")GROUP BY
operationsJOINS
between related tables
Each logical operation is presented with:
Type: such as
dimension
,filter
,aggregation
Source: the table/column it refers to
Expression: e.g.,
count(distinct order_id)
Role: how it contributes to the final answer (e.g., breakdown, constraint, output)
Why It matters:
This step helps verify that AI didn’t just guess the answer—it built a clean, logical scaffold to support it.
Gives advanced users visibility into the reasoning behind query structure before execution.
4.5 Query
Shows the final SQL query that was executed on the connected data warehouse based on the processed intent, context, and grammar.

Once Connecty AI has fully decomposed and interpreted your question, it compiles all the structured components into an actual SQL statement. This query is the executable version that runs on your data environment to retrieve the final results.
What you see:
A full SQL query block, formatted for readability.
Query metadata, such as:
Execution time
Query engine or warehouse (e.g., Snowflake, BigQuery)
Data source reference, showing which schema and tables were accessed.
Why it matters:
Gives technical users a transparent view of what’s being run on their data.
Helps in validating the output, especially when business decisions depend on query accuracy.
Enables manual reuse or editing of the SQL for further analysis outside of Connecty.
5. Details tab
Displays essential metadata related to the specific query session, including user input, system state, and technical identifiers.

The Details tab provides a concise summary of how the system interpreted and executed the user’s question. This includes both user-facing and system-generated information that supports traceability.
What is displayed:
Dw Query Id: A unique identifier for the executed query. Useful for audit trails or referencing the query in logs.
Dw Version Id: Identifies the specific version of the dataset or schema used when generating the answer. This ensures consistency if the data model evolves over time.
State: Indicates the current status of the query generation lifecycle. For example:
Generated
(successful generation)Pending
(in progress)Failed
(generation attempt was unsuccessful)
User Question: Shows the original natural language input provided by the user. This is the foundation from which the intent and logic were derived.
Connection Type: Indicates the underlying data source technology (e.g.,
BigQuery
,Snowflake
,Redshift
) that was used to execute the final SQL query.
6. Query tab
The Query tab displays the final SQL query that Connecty AI generated based on the user’s natural language question. This is the version of the query that is actually executed on the data warehouse. It includes the full, syntactically correct SQL code, ready for validation, reuse, or external execution.

This tab is particularly useful for:
Data engineers and analysts who want to inspect the exact logic being run.
Copying or exporting the SQL for use outside of Connecty.
Auditing or debugging the final query logic.
7. Results tab
The Results tab provides the final output of the executed SQL query — both performance metadata and the actual data table returned by the query.

Metadata panel
This section summarizes the query's technical performance:
Rows
Total number of rows returned by the query. In this case: 10,000
Columns
Number of columns in the result set: 5
Execution Time
Time (in milliseconds) it took for the query to run: 7004.007 ms
Size (MB)
Total memory footprint of the returned data: ~0.99 MB
These metrics help you quickly assess the query’s efficiency and output size.
Data table
A scrollable table view displaying the actual query results. In this example:
customer_key
27526
, 35194
Unique identifier for each customer
first_order_date
1992-01-12
The date the customer placed their first order
last_order_date
1998-01-01
The date of their last recorded order
total_orders
30
, 32
, 31
Total number of orders placed by each customer
order_frequency
0.0137
, 0.0135
, 0.0134
Frequency of orders calculated from first to last order (normalized rate)
Use cases
Business insight Quickly review the actual values returned for your analytical question — no need to leave the platform.
Data validation Instantly confirm whether the returned data aligns with what you intended to ask or filter.
Performance tuning Use execution time and size to identify opportunities for optimization, especially for large result sets.
Last updated