
Asking the right questions is just as important as getting the right answers. But what happens when your AI agent understands your words but misses your deeper intent? The problem is familiar to every data analyst: You craft a detailed business question, feed it to ChatGPT or any other Text-to-SQL agent, and get back SQL that looks correct but completely misses the analytical intent. Your complex question about customer segmentation becomes three disconnected queries, or worse, an analytically meaningless query of joins and aggregations, costing your valuable time debugging.
The real problem?
Most AI agents are like tourists with a flat map trying to navigate a multi-level mall—they see all the shops but can’t figure out the floors, escalators, or how one section connects to another. They simply can’t grasp the layered hierarchy and context behind complex data questions. This confusion over intent hierarchy is the Achilles’ heel of shallow reasoning AI. They mix up connected sub-questions with unrelated queries and miss the step-by-step flow analysts naturally follow. Plus, they don’t understand context inheritance—the crucial ability to carry filters and insights from one part of the analysis to the next. Instead, they treat multi-part questions as disconnected pieces, limiting AI’s power to deliver truly insightful answers.
What is Intent Hierarchy? The Foundation of Complex Reasoning.

Think about how you solve complex problems in real life. When planning a road trip, you don’t just think of 'driving from A to B' as one giant step.You break it down: first choose destinations, then map the route, and finally estimate gas costs—taking into account the dependency on each destination’s gas price. Intent hierarchy applies this exact concept to data questions. It's the natural way humans organize complex reasoning tasks:
- Main Intent: Your primary goal
- Sub-Intents: Supporting questions that help achieve the main intent
- Dependencies: How these questions connect to each other
- Context Inheritance: How context (example: derived measures) from one question apply to related questions
For example, take this supplier analysis request on the TPC-H dataset:
"I need a breakdown of our suppliers. Specifically, I want to know how much revenue each supplier is generating, which customers contribute the most to their revenue, and what product categories they sell the most. Also, can we calculate what percentage of a supplier's revenue comes from its top customers? Finally, I'd like to see each supplier's market share compared to the total revenue across all suppliers. Let's sort by the biggest suppliers first,"
This isn’t just a list of questions—it’s a hierarchy of interconnected intents, where each step depends on or builds from the previous one.
Main Intent: Comprehensive supplier analysis
├── Sub-Intent 1: Calculate revenue by supplier
| └── Context: Sort by highest revenue first
├── Sub-Intent 2: Identify top customers for each supplier
| └── Dependency: Group by each supplier from sub-intent 1
├── Sub-Intent 3: Analyze product category distribution by supplier
| └── Dependency: For each supplier identified in sub-intent 1
├── Sub-Intent 4: Calculate percentage of revenue from top customers
| └── Dependency: Uses both sub-intent 1 (supplier revenue) and sub-intent 2 (top customers)
└── Sub-Intent 5: Calculate market share for each supplier
└── Dependency: Requires total revenue across ALL suppliers as denominator
Yet, most AI agents see this as a flat set of unrelated requests, missing the dependencies and context inheritance that make the analysis meaningful.
Intent Graphs

The Missing Link: Why Shallow Reasoning AI Agents Fail at Complex Questions
This lack of intent hierarchy understanding leads to three common failures in AI-generated data analytics:
- Failure 1: Treating sub-intents as unrelated queries (no dependency tracking)
- Failure 2: Forcing multiple intents into one convoluted query (no intent segregation)
- Failure 3: Losing context across multi-step analyses (no execution planning)
Lets understand this with examples.
Failure 1: Sub-Intents Treated as Separate Queries
Example Query:
"Show monthly revenue trends for Q1. Identify customers with >20% spending growth. Analyze their product preferences."
- Shallow-reasoning RAG Behavior: Treats "analyze product preferences" as independent of "identify growth customers"
- Generates separate SQL queries:
- Query 1: Finds growth customers
-
SELECT customer_id FROM sales WHERE spending_increase > 0.2;
-
Query 2: Analyzes product preferences (NO FILTER FOR GROWTH CUSTOMERS)-
SELECT product_category FROM purchases GROUP BY product_category;
-
- Query 1: Finds growth customers
Technical Shortcoming:- No mechanism to pass intermediate results (e.g., customer IDs) between queries.
- Fails to recognize the dependency chain: Product preferences analysis ONLY applies to growth customers
- No mechanism to pass intermediate results (e.g., customer IDs) between queries.
Failure 2: Multi-Intents Forced into Single Queries
Example Query:
"Compare regional revenue trends and list underperforming products."
- Shallow-reasoning RAG Behavior: Attempts a single convoluted SQL query:
SELECT region, SUM(revenue), product_name
FROM sales
GROUP BY region, product_name
HAVING SUM(revenue) < threshold;
- Result:
- Merges unrelated intents (trend analysis vs. product performance) into meaningless aggregates
- Lacks separate context windows for distinct analytical goals
- Technical Shortcoming:
- No intent segregation model to recognize independent analytical goals
- Forces incompatible metrics (trends vs. thresholds) into a single output
Failure 3: Multi-Step Logic Loses Context Between Steps
Example Query:
"Find top 10 customers by lifetime value. Then, show their preferred payment methods."
- Shallow reasoning RAG Behavior: Runs two disconnected queries:
- Query 1: Gets top 10 customers
-
SELECT customer_id FROM orders GROUP BY customer_id ORDER BY SUM(total) DESC LIMIT 10;
-
- Query 2: Analyzes payment methods (WITHOUT TOP 10 FILTER)
- SELECT payment_method FROM payments GROUP BY payment_method;
- Query 1: Gets top 10 customers
- Result:
- Second query analyzes all customers’ payment methods, not just the top 10
- No cross-query filtering logic
- Technical Shortcoming:
- Static context windows: Cannot retain/reference prior query results
- No execution planner to sequence dependent analyses
Why RAG Architectures Are Limited: The Architectural Blind Spot
The root problem isn't that these AI systems can't write SQL—they can. But, Agents built on RAG are inherently suffering from shallow reasoning due to fundamental architectural limitations:
- No Dependency Graph: cannot map relationships between intents or track dependencies
- Single-Pass Generation: lack iterative refinement based on intermediate results
- Static Context Windows: cannot effectively retain or reference prior query results
The Path Forward: Upgrading AI with Intent Hierarchy Understanding
The good news? Deep reasoning AI platforms, such as Connecty AI, are designed to crack the intent hierarchy by:
- Building dependency graphs that map how sub-intents relate
- Adapting execution plans—deciding when to run steps sequentially, in parallel, or iteratively
- Managing dynamic context, passing semantic layer - for example related entities or derived measures - between queries
This results in AI agents that can tackle complex, multi-step analytics with coherence and depth—delivering insights aligned with the strategic goals behind the questions.
Request a Demo to see how Connecty AI can transform your data team's efficiency and analytical depth.
Conclusion: Bridging the Gap Between AI and Human Analytical Intent
The disconnect between human analytical intent and AI execution isn’t a minor flaw—it’s a fundamental mismatch in reasoning structure. Without understanding intent hierarchy, AI remains a blunt tool that generates technically correct but analytically shallow answers.
The next frontier in AI-driven data analytics lies in hierarchical reasoning—enabling AI to grasp the “why” behind every query and produce answers that truly advance business understanding.
If you’re ready to upgrade your analytics intelligence and stop wrestling with shallow AI agents, explore how Connecty AI can unlock the full power of intent-aware reasoning.