← Latest papers
💻 computer science

Declarative Data Services: Structured Agentic Discovery for Composing Data Systems

This paper introduces Declarative Data Services (DDS), a structured architecture that overcomes the convergence failures of unbounded agentic discovery in heterogeneous data systems by decomposing the search space into bounded, typed layers guided by declarative user intent and iterative runtime feedback.

Original authors: Shanshan Ye, Duo Lu

Published 2026-05-21
📖 6 min read🧠 Deep dive

Original authors: Shanshan Ye, Duo Lu

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

The Big Problem: The "Wild West" of AI Coding

Imagine you ask a very smart, well-read architect (an AI agent) to build a house. You say, "I want a 3-bedroom house with a solar roof, a pool, and a budget of $300,000."

In the past, if you asked an AI to write code for a single app, it usually did a great job. But when you ask it to build a complex data system (like a trading platform that needs to handle thousands of stock trades per second, store years of history, and stay fast), things go wrong.

Why? Because the AI is like a genius who has read every book in the library but has never actually built a house. It knows what a "Kafka" queue or a "ClickHouse" database is, but it doesn't know how they fit together in the real world. It might pick the wrong materials, forget to connect the pipes, or choose a design that collapses under pressure.

If you just tell the AI, "Fix it," and let it guess again and again (a process called "unbounded discovery"), it often spins in circles. It tries to fix the plumbing by changing the roof, or it keeps rebuilding the whole house from scratch every time it makes a small mistake. It never converges on a working solution.

The Solution: DDS (The "Structured Architect")

The authors propose a new system called Declarative Data Services (DDS). Instead of letting the AI wander aimlessly, DDS acts like a strict, organized construction manager who forces the AI to follow a specific, four-step blueprint.

Think of DDS as a four-story building where every floor has a specific job and a specific set of rules. The AI (the "sub-agent") does the work, but the Framework (the "manager") holds the blueprints and checks the work at every step.

The Four Floors of the DDS Building

Floor 1: The "What" (Intent)

  • The Job: Before building, you must define exactly what you want.
  • The Analogy: Instead of saying "I want a cool house," the user says, "I need 3 bedrooms, 2 bathrooms, solar panels, and a $300k budget."
  • The Magic: The system forces the AI to translate your vague wish into a strict, typed checklist (Data Model, Speed, Cost, etc.). If the request is impossible (e.g., "I want a mansion for $500"), the system stops you before any code is written.

Floor 2: The "How" (The Blueprint)

  • The Job: Design the flow of data without picking specific brands yet.
  • The Analogy: The architect draws a diagram: "Water comes in, goes to the filter, then to the tank, then to the shower." They don't say "We will use a Whirlpool filter" yet. They just decide the shape of the system.
  • The Magic: This separates the design from the products. If the design is wrong, you fix the drawing, not the specific brand of pipes. This prevents the AI from changing the whole house just because one pipe leaked.

Floor 3: The "Which" (The Skills)

  • The Job: Pick the actual products and configurations.
  • The Analogy: Now the architect picks the specific items: "We will use a Whirlpool filter and PVC pipes." But here's the secret sauce: The system uses a "Skill Book" (a persistent memory).
  • The Magic: This Skill Book is like a living manual. If a previous house had a problem because the Whirlpool filter needed a specific adapter, that fact is written in the Skill Book. The next time the AI builds a house, it reads the Skill Book and knows exactly which adapter to use. It doesn't have to "guess" or "re-learn" this mistake.

Floor 4: The "Check" (Runtime Attribution)

  • The Job: Build it, turn it on, and see what breaks.
  • The Analogy: You turn on the water. If the shower leaks, the system doesn't just say "The house is broken." It says, "The leak is in the PVC pipe connection (Floor 3)."
  • The Magic: This is the most important part. When the system fails, it traces the error back to the exact floor where the decision was made.
    • If the budget is too low, it goes back to Floor 1.
    • If the design is impossible, it goes back to Floor 2.
    • If the specific product choice was bad, it updates the Skill Book on Floor 3.
    • It does not make the AI guess the whole house again. It makes a tiny, targeted fix.

Why This Works (The "Aha!" Moment)

The paper tested this against "unbounded" AI agents (those that just guess and retry).

  • The Unbounded Agent: Like a student trying to solve a math problem by writing down random numbers until they get it right. It takes a long time, costs a lot of money (computing power), and often gives up.
  • The DDS Agent: Like a student using a textbook and a calculator. If they get a step wrong, the textbook tells them exactly which rule they broke. They fix that one rule and move on.

The Results:
In a test building a trading backend:

  • Unbounded Agents: Failed to build a working system 8 out of 10 times, even after many attempts. They got stuck in loops.
  • DDS: Built a working system 10 out of 10 times. It was faster, cheaper, and the system actually ran with real data.

The "Skill Book" Analogy

The paper emphasizes that knowledge needs a home.

  • In old AI methods, if the AI learned that "Kafka needs port 9092," it might forget that tomorrow. It has to re-learn it every time.
  • In DDS, that knowledge is saved in a Skill File (like a YAML file).
  • If the AI makes a mistake (e.g., "I forgot to open port 9092"), the system fixes the Skill File.
  • Crucially: The next time the AI builds a system, it reads the fixed Skill File. The mistake is never made again. The "fix" is permanent, not just a one-time patch.

Summary

The paper argues that to build complex data systems with AI, we cannot just let the AI "freestyle." We need a structured framework that:

  1. Breaks the problem down into clear, typed steps (Intent -> Design -> Product -> Code).
  2. Forces the AI to check its work at every step before moving on.
  3. Remembers mistakes in a permanent "Skill Book" so they aren't repeated.
  4. Pinpoints errors exactly so the AI doesn't have to guess what to fix.

It turns the chaotic process of "AI guessing" into a reliable, industrial assembly line for building software.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →