Whybook

Whybook / AI and your data

AI and your data

Whybook gives AI small jobs, and the analyst chooses where each one runs: on a model at a provider, on a small open model in the Jupyter server, or with nothing leaving the building. A guard checks what goes out, and the code that a model wrote before it runs.

§1 Local models in progress

Small models, on the analyst's machine

Clinical, financial and other personal data should not leave the analyst's machine. Most of the model work in Whybook is small: order up to 12 questions, label a table, title a cell. A small open model of the analyst's choice can do this work in the Jupyter server: label tables, summarise frames, title code cells, suggest more questions, sort a user question and order the offered questions. In the settings, the analyst chooses the model of each task and can add any other model (§3 lists each use, and the benchmarks compare the methods for each job).

Three ways to use models

Any laptop, even a Chromebook

Frontier models for everything

A hosted frontier model reads what each task needs and writes the code.

For
Students and small labs, where the data may go to a model provider. For example, a student who opens the university's JupyterHub on a school Chromebook.
Runs on
Any device with a browser: the Jupyter server can run on a hub, and the model runs at its provider.

A 16 GB laptop or a Mac mini

Data stays on this machine

Local models read the tables and describe them. A frontier model writes the code from those descriptions and the names, kinds and sizes of the variables.

For
Companies, hospitals and government, where the data must stay but its descriptions may go out. For example, a drug company's analyst on the standard 16 GB laptop, or a tax office analyst with personal records.
Runs on
The standard laptop that universities buy for $1,400 to $2,300, with 16 to 32 GB, or a Mac mini from $899. Gemma 4 E2B is a file of 2.8 GB.

An AI PC or a small server

All local in progress

Local models read the data and write the code. Nothing leaves the building, and the work goes on with no internet.

For
Large companies and government, where nothing may leave the building. For example, a bank's analysts sharing one GPU server in its data centre, or a ministry's statisticians on a network with no internet.
Runs on
A PC with a 32 GB GPU, such as the RTX 5090, a desktop with 128 GB of unified memory, such as NVIDIA's DGX Spark or a Mac Studio, or a server with 80 GB GPUs.
What each way reads, writes, sends out and costs
AspectFrontier for everythingData stays hereAll local
Reads the dataThe frontier modelLocal modelsLocal models
Writes the codeThe frontier modelThe frontier modelA larger local model
Sent outTables, pictures and variables, as each task needs, code, questions and the text of markdown cellsNothing
Gives upControl over where the data goesQuestions about pictures, and labels written by small modelsCode from the best models, and the hardware costs up front
Works offlineTemplates only: all but AI-written codeYes
CostsEach call to the provider: about $0.0002 for the questions each time the analyst drags or clicks, and $0.001 to $0.06 for a cell, from GPT-6 Luna to Claude Sonnet 5Each call to the remote model: the code, and by default more questions each time the analyst drags or clicksThe hardware, once
In the prototypeBuiltBuilt

When the first notebook opens, Whybook asks which of the three ways to use. Later, one setting, "Keep data on this machine", switches from the first way to the second. Here "this machine" is the machine that runs the Jupyter server, with any model server in its network that the analyst connects as local. c.Whybook.keep_data_local in the server's configuration turns it on for every user, and the setting then shows as fixed. c.Whybook.way_to_use_models sets the way for every user, and with "all-local" the server refuses every model outside this machine and its network.

Connecting a model. The AI models panel finds the model servers that answer on this machine, such as Ollama, and lists their models. There the analyst signs in to OpenRouter, for Claude, GPT, Gemini and open models, or pastes a Hugging Face access token, for open models served by a company that the analyst picks, such as OVHcloud or Scaleway in Europe. It also takes an API key of Anthropic, OpenAI, Google or Mistral AI. A model connected at a provider in one of these ways is the remote model. Each key is the analyst's own, stays on the server and never reaches the browser. A model on this machine reads the data as the small local models do. The calls go through Pydantic AI, which reaches any server with an OpenAI-compatible API.

Marked as written by AI. Every cell, label and question that a model writes carries a mark in the notebook's metadata: which model wrote it, and when. Article 50(2) of the EU AI Act asks providers of AI systems that generate text to mark it "in a machine-readable format", from 2 August 2026. Regulation (EU) 2024/1689, Article 50

§2 Review guard

A guard for what leaves the machine, and for code before it runs

An analyst who lets AI write and run code needs to know two things: what goes out, and what the code can read, change or send. Whybook checks both before either happens, on the analyst's machine. The privacy guard reads every prompt before it goes to a model on another machine, and looks for patient and household IDs, names, ages, dates, health details, small counts and keys. The execution guard reads every cell, set of branches and module that a model wrote, before it runs, and asks about more while the notebook's kernel runs outside the sandbox. In ask mode the guard shows what it flagged and waits; in reject mode it masks the flagged parts, or holds the cell back, and the work goes on.

An agent's cell printed one patient with an age and a stage. Before the result goes back to the model, the guard shows what it flagged and why, and marks it in the lines around it. Send without the marked parts sends the result with the ID written as [identifier].
What each guard reads, when, and what it looks for
AspectData privacyExecution safety
ReadsEvery prompt to a model on another machine: questions, a cell's request, an agent's question and each step's resultEvery cell, set of branches and Python module that a model wrote, before it runs
Looks forAn ID next to a personal detail, several details that point to one person, small counts, names and keysThe network, secrets, files outside the notebook's folder, deletes, shell commands, installs, hidden code, and text written to steer the guard's answer
Outside the sandboxChecks every prompt the same way: a prompt carries the same data in and out of the sandboxAsks about installs and shell commands, and rejects the network and secrets
In the sandboxAllows what the sandbox stops: the network, files outside the folder, installs and shell commands
A model on this machineDoes not check prompts: the data stays on this machineChecks every cell, set of branches and Python module that the model wrote, before it runs, as for a model on another machine

The rules run first, on the analyst's machine, in at most a few hundredths of a second. A guard model, also on the analyst's machine, can read each prompt or cell as well, and the stricter answer wins. Whybook offers three guard models that read a policy written in the analyst's words: IBM's Granite Guardian 4.1, DynaGuard and Mistral AI's Shieldstral. For admin-level enforcement, c.Whybook.review_guard in the server's configuration sets ask or reject for every user and keeps both guards on, and no user can turn them off. c.Whybook.keep_data_local does the same for "Keep data on this machine".

§3 AI uses

Every use of AI in Whybook

AI in a notebook ranges from full agentic control to full user control. Full agentic control gives the fastest results and costs the analyst understanding. Full user control keeps data safe and private but is slow. Whybook keeps the control with the analyst, and one setting keeps the data on the analyst's machine. The analyst still gets results quickly, though not as fast as with full agentic control: the analyst asks the questions, agents write the code, and every choice stays in sight. Each job that Whybook gives to AI: what starts it, what the model reads, where it can run, and what changes when the data must stay on the analyst's machine.

A script draws the list.