Executable Schema Contracts: From Automatic Ingestion to Multi-Source Retrieval
This paper presents a system that automatically discovers executable schema contracts from raw multi-source data to guide knowledge graph construction and condition a multi-tool retrieval agent, significantly improving question-answering performance over baseline methods by enabling structured, traceable, and schema-aware evidence integration.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to solve a massive mystery, but your clues are scattered across a chaotic room. Some clues are written in neat ledgers (tables), some are scribbled on sticky notes (PDFs), some are in messy digital logs (JSON), and some are just random notes on a whiteboard.
Right now, most AI systems trying to solve this mystery are like a detective who just grabs a flashlight and starts reading everything randomly. They might find a clue, but they often miss how the clues connect because they don't understand the structure of the room. They can't tell that the name on a ledger matches the name on a sticky note, or that one note is a "child" of another.
This paper introduces a new system that acts like a super-organized architect who first builds a blueprint of the room before the detective starts looking.
Here is how it works, broken down into simple steps:
1. The "Automatic Blueprint" (Schema Discovery)
Instead of asking a human to spend weeks drawing a map of where everything is, this system looks at the raw, messy data and automatically figures out the rules.
- The Problem: AI often "hallucinates" (makes things up). It might invent a column called "Profit" when the data only has "Revenue."
- The Fix: The system creates a "Closed-World Catalog." Think of this as a strict rulebook: "You can only talk about things that actually exist in the data." If the AI tries to invent a new field, the system says, "Nope, that's not in the catalog," and forces it to stick to what's real.
- The Result: It builds a Schema Contract. This is a shared agreement that says, "Here is what a 'Product' looks like, here is what a 'Transaction' looks like, and here is how they connect."
2. Building the "Knowledge Graph" (The Organized Library)
Once the blueprint is ready, the system uses it to organize the messy data into a clean, connected library called a Knowledge Graph.
- The Magic: It doesn't just dump the data; it uses the blueprint to figure out the relationships.
- Identity Keys: It knows that "ID: 123" in one file is the same person as "ID: 123" in another.
- Foreign Keys: It realizes that "Order #55" in the sales table belongs to "Customer #99" in the customer table.
- Provenance: Every single piece of information keeps a "receipt" attached to it, showing exactly which original document it came from. This means if the AI gives you an answer, it can point to the exact page and line where it found the proof.
3. The "Smart Detective" (Query-Time Retrieval)
When you ask a question (e.g., "Which products made the most profit after the 2018 merger?"), the system doesn't just guess. It uses the Blueprint to decide how to find the answer.
- The Routing: The system asks itself: "Do I need to look at the neat numbers in the spreadsheet? Do I need to read the long text in the PDF? Or do I need to follow a chain of connections between different files?"
- The Contract: Because the AI has the blueprint, it knows exactly which tool to use. It doesn't wander aimlessly; it takes the most direct path, jumping from the spreadsheet to the PDF only when the blueprint says they are connected.
- The Safety Net: If the question asks about something the blueprint doesn't know (like a brand new product that hasn't been added yet), the system can temporarily "stretch" the blueprint to handle it, or admit it doesn't know, rather than making up a fake answer.
Why is this better than what we have now?
The authors tested this against other methods (like standard AI search or systems that try to guess the connections without a blueprint).
- The Result: The "Blueprint System" was significantly better at answering complex questions that required combining information from different sources.
- The Analogy:
- Old Way (RAG): Like asking a librarian to find a book by shouting keywords. They might find a book with the word "profit" in it, but it might be the wrong book.
- This Way: Like having a librarian who has already built a perfect index card system. They know exactly which card points to the profit numbers, which card points to the merger date, and how to link them together to give you the exact answer.
The Bottom Line
This paper claims that by automatically creating a strict, executable map (schema) of messy data before trying to answer questions, AI systems can become much more accurate, reliable, and able to explain where they found their answers. It turns a chaotic room of clues into a well-organized library, making the detective's job much easier and the results much more trustworthy.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.