TL;DR
This paper introduces a system that automatically discovers a unified "executable schema contract" from raw, heterogeneous data sources (like PDFs, JSON logs, and SQL tables). This schema serves as a shared control plane, guiding both the automated construction of a knowledge graph and the query-time routing of a QA agent, delivering massive accuracy gains over standard RAG and generic LLM agents.
What Problem Does This Paper Address?
In the real world, valuable knowledge rarely sits neatly in a single database. Instead, it is scattered across a messy mix of structured SQL tables, semi-structured JSON logs, and unstructured documents like PDFs or internal wikis.
When trying to build Question Answering (QA) systems over this data, engineers hit a wall. Standard Retrieval-Augmented Generation (RAG) works well for simple single-document lookups but fails miserably on complex, multi-hop queries that require joining information across different sources. Conversely, building a structured Knowledge Graph (KG) solves the join problem but traditionally requires expensive, manual schema engineering that breaks the moment the underlying data evolves. Fully open-ended LLM agents attempt to bypass schemas entirely, but they are brittle, slow, and prone to hallucinating non-existent data fields.
The authors tackle this "data-to-answer" automation problem by asking: Can we automatically discover a schema from raw data and use it as a strict, executable contract to unify both data ingestion and query retrieval?
Methods
The proposed framework operates in three tightly coupled stages, all driven by a single induced schema ($\Sigma$):
- Schema Induction: The system profiles raw data sources to build a closed-world field catalog. This catalog acts as a boundary, forcing the LLM to only use actual, attested data fields and preventing structural hallucinations. Crucially, the system uses deterministic, statistical analysis (not LLMs) to infer identity keys, foreign keys, and source hierarchies. LLMs are reserved strictly for semantic discovery (identifying entity types and relationships) in a two-pass architecture.
- Schema-Guided Construction: Using the discovered schema as a control plane, the system automatically extracts, deduplicates, and links data into a provenance-aware Neo4j knowledge graph. Because the schema drives the ingestion rules, changing the schema updates the graph database automatically without rewriting code.
- Schema-Guided Retrieval: At query time, a multi-tool agent uses the schema to parse the user's question and intelligently route it. Instead of relying on open-ended LLM reasoning at every step, the agent follows a strict preference order: structured lookups for discrete values, vector search for unstructured text, and graph traversal for multi-hop relationships.
The system also includes a monotonic query-time schema extension protocol. If a user query introduces a novel concept not captured during initial ingestion, the system can dynamically extend the schema in-memory to handle the query on the fly.
Datasets
The system was evaluated using zero-shot GPT-4.1 across four diverse, publicly available QA benchmarks:
- BlendQA: Focuses on multi-source, multi-hop reasoning over a mix of text passages and structured facts.
- HybridQA: Requires bridging tabular data with linked Wikipedia passages.
- TAT-QA: A financial QA dataset containing hybrid tabular and textual content requiring numerical reasoning.
- ComplexTR: Tests temporal multi-hop reasoning over structured records with time-scoped relations.
Key Insights and Ideas
- Statistical Before Semantic: LLMs are notoriously bad at calculating uniqueness, cardinality, and value distributions. A key insight of this paper is to let classical data profiling handle structural intelligence (like finding foreign keys) before letting the LLM loose on semantic extraction.
- The Schema as a Control Plane: Instead of optimizing data ingestion and query retrieval in isolation, using the schema as an explicit contract ensures that the retrieval agent uses the exact same typed vocabulary and link paths established during data ingestion.
- Two-Stage Reliability Gating: To prevent hallucinations, the agent performs a pre-retrieval check to see if the query's entities fall within known value dictionaries, and a post-retrieval grounding filter to ensure answers are strictly backed by evidence. This allows for principled abstention rather than guessing.
Key Results
In controlled zero-shot comparisons using identical LLM backbones and data sources, the Schema-Guided approach consistently outperformed strong baselines like standard RAG and decomposition-based methods (ProbTree, CoK, AtomR):
- Accuracy Boosts: On HybridQA, the system achieved a massive 58.3% Exact Match (EM), outperforming the state-of-the-art AtomR baseline by +19.8 EM and standard RAG by over 51%.
- Cross-Source Routing: On BlendQA, it outperformed AtomR by +2.6 EM and standard RAG by +10.2 EM.
- Ablation Studies: Removing schema-conditioned routing (the "w/o schema guidance" ablation) caused performance on BlendQA to plummet from 29.3 EM to 20.0 EM, proving that agentic iteration alone isn't enough—the schema guidance is what drives the accuracy gains.
- Cross-Model Generalization: The authors swapped the underlying LLM backbone with Claude Haiku 4.5 and Llama 3.3 70B, finding consistent performance gains across all model families.
Limitations and Future Work
- Schema Realization vs. Coverage: While the system is excellent at discovering schemas, actually populating rare or temporally complex entity types during KG construction remains a bottleneck. The graph sometimes misses borderline entities, though the agent mitigates this by falling back to vector search.
- Extension Latency: Dynamically extending the schema at query time adds an average of ~3.4 seconds of overhead. While highly effective for accuracy, this latency might be prohibitive for strict real-time applications.
- Enterprise Scale: The framework has only been validated on public benchmarks. Testing it against massive production enterprise data with noisier sources and stricter data governance remains an open area for future work.
Summary updated