← All posts

4 min read GenViz Team extractsanalysisrelease

When the question needs more than a query

Run Python on the extracts in your conversation, save the results as new tables, and inspect the code behind each returned figure.

Some questions end with a query. You ask for the unpaid invoices, get a table, and have what you need. Others only start there: combine two pulls, look at a distribution, or reshape a result in a way your database’s SQL makes awkward.

That is usually where you download the file and open a notebook. A ten-minute question becomes a separate piece of work, away from the conversation that explains why you asked it. When someone asks where the answer came from, you have to bring the pieces back together.

GenViz can run Python on the extracts already in your conversation and keep the results there with them.

Start with the tables you have

An extract is a saved, downloadable table in your conversation. When your question needs computation, the assistant writes a short Python program and runs it over one or several of those tables. You ask the question; you do not need to write or paste code.

A run can read up to 10 extracts, including tables from different connections. You can combine a customer list from one system with orders from another and ask which customers have no orders. Once pulled, both inputs are tables the code can work with.

The environment includes Python 3.11, polars, DuckDB, PyArrow, NumPy, SciPy, scikit-learn, XGBoost and LightGBM. The assistant receives each input’s column names and types before it writes the program.

Tables to keep, values to answer with

An analysis returns two different kinds of result.

Tables become new extracts. They appear directly beneath the analysis card, with row counts and column types visible. You can page through them, download them, or use them as inputs to another analysis. Each run starts from extracts; the saved tables carry the work forward.

Values go back to the assistant by name. A total, a count or a short list does not have to be read off a printout. The code returns it directly, so the assistant can use the calculated number in its answer above the table. You have both the rows to inspect and the figure used to explain them.

On a sample dataset, one analysis step summarised 16,044 payments into a two-row table, one row per staff member. It also returned three values: the overall total of 67,406.56, the payment count of 16,044, and which staff member had the higher total. The card reads “1 table created · 2 rows · 3 values returned,” with the table immediately below it.

Read the code behind the number

Every “Python analysis” card has a Code tab showing the exact Python that ran, with syntax highlighting. The Result tab shows the returned values, followed by anything the program printed.

For a payments summary with just the overall total returned as a value, the assistant’s program looks like this:

import genviz
import polars as pl

payments = genviz.read()

summary = (
    payments.group_by("staff_id")
    .agg(total=pl.col("amount").sum(), payments=pl.len())
)

genviz.write_table("staff_summary", summary)
genviz.result({"overall_total": summary["total"].sum()})

It loads the extract, summarises payments by staff member, saves a table and hands back the overall total. When someone asks where that number came from, you can read the calculation in the same conversation.

What the code can reach

Each run uses an isolated, disposable sandbox with no network access. The code cannot call the internet or install packages. No credentials exist inside it: no database passwords and no API keys. It never connects to your database. It reads only the extract files placed there for that run.

Those extracts must belong to the same conversation. An extract from another conversation is refused, even within the same organization. The code runs as an unprivileged user and cannot modify its environment.

Output tables are checked before they are saved; an invalid table file is rejected. An audit record captures when each run happened, its duration, and its input and output counts, without recording the code’s contents or output.

Keep the work bounded

Runs have time and size limits: 60 seconds by default, two minutes at most, up to 10 output tables per run, and eight analyses per message. Results are tables and values. Extra packages cannot be installed.

If a run fails, the card explains whether it ran out of time, could not load the data, or hit a Python error, including the error line itself. A stopped run does not prevent the next one from working. You can adjust the question with the inputs, calculation and results still together.