Skill: unanswerable query detection
1. Capability Definition & Real Case
- Professional Definition: The capability to perform diagnostic validation of natural-language queries against a relational schema to determine executability. This involves detecting (1) structural absences where the requested attribute or entity doesn't exist in the DDL, (2) semantic ambiguities where multiple columns or values could satisfy a request without a tie-breaking context, (3) domain boundary violations where the query requires external world knowledge, and (4) non-SQL intent where the user asks for causal explanations rather than data retrieval.
- Dimension Hierarchy: Robustness and Adaptation->Corrective Reasoning->unanswerable query detection
Real Case
[Case 1]
- Initial Environment: A biomedical database (OncoMX) containing tables for 'genes', 'biomarkers', and 'mutations'. The schema includes column-level comments and foreign key relationships, but lacks 3D structural data for proteins.
- Real Question: What is the 3D protein structure of the EGFR gene product?
- Real Trajectory: 1. Extract the entity 'EGFR' and the attribute '3D protein structure'. 2. Search the global schema for 'protein structure', '3D', or 'pdb_id'. 3. Observe that tables only cover 'gene_expression', 'biomarkers', and 'mutations'. 4. Conclude the attribute is structurally missing from the schema.
- Real Answer: unanswerable question
- Why this demonstrates the capability: This demonstrates detection of out-of-schema queries. The agent must successfully navigate the entire DDL and verify the absence of a specific data dimension ('3D structure') before abstaining from generating a hallucinated join or column name.
[Case 2]
- Initial Environment: A relational database tracking cancer biomarkers with multiple scoring columns: 'biomarker_reliability_score', 'clinical_impact_score', and 'variant_prevalence_score'.
- Real Question: What is the score for EGFR in lung cancer?
- Real Trajectory: 1. Identify 'EGFR' as the gene and 'lung cancer' as the disease. 2. Identify 'score' as the requested attribute. 3. Search the schema and find three distinct columns representing different types of 'scores'. 4. Note that the question does not specify which score (reliability, impact, or prevalence) is required, creating irresolvable column ambiguity.
- Real Answer: unanswerable question
- Why this demonstrates the capability: This case tests column ambiguity detection. Rather than picking a score column at random (which would be a 'Semantic Error'), the agent identifies that the user's intent is underspecified, requiring a 'not answerable' response based on relational ambiguity.
[Case 3]
- Initial Environment: An oncology database containing rows of gene expression data, mutation frequencies, and biomarker evidence.
- Real Question: Why does the TP53 gene cause cancer in some patients but not in others?
- Real Trajectory: 1. Analyze the query keyword 'Why'. 2. Determine if the question asks for a count, a list, an average, or a causal explanation. 3. Recognize that 'causal explanation' (causality) is a non-SQL task that cannot be satisfied by standard relational algebra or Data Manipulation Language. 4. Flag as out-of-scope for the SQL engine.
- Real Answer: unanswerable question
- Why this demonstrates the capability: This demonstrates a 'Non-SQL Intent' detection. The agent must distinguish between a query that asks for data (How many?) and one that asks for procedural or explanatory knowledge (Why?), correctly identifying the latter as unanswerable via SQL.
Pipeline Execution Instructions
To synthesize data for this capability, you must strictly follow a 3-phase pipeline. Do not hallucinate steps. Read the corresponding reference file for each phase sequentially:
Phase 1: Environment Exploration Read the exploration guidelines to discover raw knowledge seeds:
references/EXPLORATION.mdPhase 2: Trajectory Selection Once Phase 1 is complete, read the selection criteria to evaluate the trajectory:
references/SELECTION.mdPhase 3: Data Synthesis Once a trajectory passes Phase 2, read the synthesis instructions to generate the final data:
references/SYNTHESIS.md