Interactive notebook tool links outputs to code for better analysis
Point, Revise, Review: Grounded Agentic Analysis in Reactive Notebooks with marimo-lens
Human-Computer Interaction
Summary
People using computational notebooks often have trouble linking what they see with the code producing it. The authors introduce marimo-lens, a tool that connects a selected output or note back to the exact code cell and computation behind it. This connection helps both humans and agents understand, act on, and review the computational context more effectively. Their examples show how visually pointing to data leads to clearer questions, code inspection, and useful results for users to review.
What this means in practice
- •For data analysts: Trace visual data points back to all related code cells for faster debugging and explanation in Python notebooks.
- •For data science teams: Provide teams with interactive tools that preserve analysis steps and context for better collaboration and review.
Authors
Péter Ferenc Gyarmati, Trevor Manz, Dominik Moritz, Mennatallah El-Assady
Abstract
In a computational notebook, a human can point to a rendered result and ask about "this," while an agent acts through cells, dependencies, and runtime state. When what the human sees and what the agent operates on are disconnected, the human must describe what they mean and trace what the agent did in prose that strips away situated visual and computational context. We present marimo-lens, an extension to the reactive Python notebook marimo for grounded human-agent analysis. Lens connects a human's marked output and note to its producing cell and relevant contributing computation, giving the agent computational context for the request. It surfaces agent activity, returns selected results to the notebook, and preserves the initiating selection for human review and reopening. We illustrate the lifecycle through an exploratory human-agent analysis of a real-world open dataset, showing how visually situated questions lead to computational inspection, notebook action, and returned evidence for human review.