Carnot compiles deep-research queries into inspectable execution graphs users can edit mid-run

Carnot: Interpretable, Interactive, and Optimized Execution of Deep Research Queries

Matthew Russo, Yash Agarwal, Tianyu Li, Zhuohan Gu, Michael Cafarella, Omar Khattab, Tim Kraska, Samuel Madden

cs.DB, cs.AI

2026-08-10

Carnot compiles NL analytics into editable notebook cells over a visible plan; editing one re-runs only it, and the optimizer picks implementations to meet cost and latency budgets.

What problem this solves

Enterprise analysts want to query data lakes in natural language, and neither of the two existing paths works well. Deep research agents take a question and return an answer with the entire chain of retrievals, transformations, and LLM calls hidden inside a black box; users can neither see where the run went wrong nor stop it from elaborating on a false premise. Semantic operators are transparent but bill per LLM call, which becomes unaffordable at enterprise data-lake scale. Analysts end up unable to verify intermediate results or steer the system, and any correction means rerunning the whole expensive pipeline.

Method

Carnot compiles a natural-language request into a physical execution graph and shows it to the user before execution starts. Each operator is a notebook cell viewable at three abstraction levels: natural-language intent, generated code or prompt, and raw input/output pairs. Execution is incremental and cached. Editing one cell re-runs only that operator while upstream results are reused. This directly addresses the core pain point: you stop paying full price for every iteration.

Key design choices:

Results

This has to be said plainly: Carnot is a demo paper with no conventional quantitative benchmark and no numeric comparison to other systems. It demonstrates the interactive workflow on two workloads, an anonymized set of 1,000 consumer-product reviews and the legal task of the KramaBench academic benchmark, across three scenarios: inspecting the plan DAG before execution, adding constraints through chat to trigger replanning, and editing a prompt in a cell to watch the downstream recompute.

DimensionWhat Carnot offersWhat the paper does not
Plan transparencyPre-execution DAG plus three-level cell viewsNumeric comparison with other systems
Cost controlBudget-driven implementation swappingActual dollar or token savings measured
CorrectnessNo guaranteesQuantified plan-accuracy evaluation

Code is open at github.com/mitdbg/carnot.

Why it matters

For teams building enterprise AI analytics, Carnot makes concrete a third path between black-box agents and expensive semantic operators: it keeps the flexibility of LLM agents while exposing the process so people can intercept, edit, and budget it. The incremental-execution-with-caching point is the most practical one. The dominant cost in iterative data analysis is repeated reruns, and re-running only what changed captures most of that saving.

Limitations

The authors concede the system offers no guarantee on plan accuracy or correctness. They sketch a path to soft statistical guarantees (borrowing from Lotus, giving guarantees relative to an oracle) but note it is soft because the oracle itself can be wrong. The demo format also means no end-to-end numeric comparison with existing deep-research systems; the savings are argued mechanistically rather than measured. The authors list several open items: web search, general tool calling, and improving the notebook UI to better reflect the non-linear DAG structure of the plan.

Terms

Source

What people are saying

Related papers

All paper explainers