← Hussain Abuwala

Data Stories

A prototype agent that finds what is worth knowing in a dataset. IBM, 2026.

Suggested questions tell people what they could ask about a dataset. They still have to pick a question, read the answer, think of a follow-up, and repeat until something interesting turns up. I built a prototype to show what could come next: an agent that explores the dataset on its own and returns two or three findings worth acting on, each with the evidence behind it. It was selected for executive review. It is a prototype, not a product feature.

TypeScript · Node.js · LLMs · Agents · SQL · Python · pandas

Why it matters

Suggested questions answer “what could I ask?”. Most people want the answer to a different question: “what should I know?”. Something surprising in the data, such as one region driving most of a loss, rarely shows up on a default dashboard, and finding it takes many rounds of questions.

A finding here is more than one number. It has:

The problem

The solution

An agent with a few tools

The agent works in a loop: it picks a tool, looks at the result, and decides what to do next. It has four tools: run a SQL query, analyse a result with Python, propose a finding, and finish. Before it starts, it gets a profile of the dataset: its columns, what they mean, and sample values.

look at the profile → query → analyse → propose a finding → repeat or finish

The tools went through three versions, each moving the arithmetic further away from the model:

VersionHow it workedWhat went wrong, or right
1. The model does the mathsQuery results go straight to the model, which works out the numbers itselfResults had to fit in the prompt, and multi-step calculations were often wrong
2. Fixed statistics toolsThe model chooses from a small set of calculations, such as a trend or an anomaly check, which code runs exactlyNumbers were right, but the model could only ask what the tools allowed
3. PythonThe model writes short Python analyses, which run on the full result; it only reads the printed outputExact numbers, and any analysis the model can express

Every finding comes with its trail

Every step is recorded: the purpose of each query, the SQL, a preview of its result, the Python code and its output. A finding must cite the analyses its numbers come from, and the trail is shown with it. A reader can follow exactly how each number was produced.

Findings must be different from each other

Before a finding is accepted, the agent has to explain how it differs from the ones already found, so the result is not three versions of the same insight.

Knowing when to stop

Running code the model writes

In the prototype, Python runs in a separate process with a time limit. Running code written by a model is a security risk, so a production version would need a proper sandbox, with no network access and strict limits on memory.

Results

On test datasets from different domains, a standard run took about three minutes and returned a few findings, each traceable from its headline back to the queries and analyses behind it. The prototype was selected for executive review.