PizeNews

Pize brings AI-assisted scientific programming to Pize Code, with an SDK for your own tools.

PricingAccount

Product documentation

Read the data right, then talk about getting the math right

A programming-agent plugin optimized for mathematical computing and statistical analysis.

Pize runs in Pize Code and Positron and puts its effort on the step that fails most often and is cared for least: recognizing and reading statistical data. Once the data is understood correctly, the computation, tests, and inference that follow can be right.

Recognize first

Delimiters, headers, missing values, and column types are decided one by one. A wrong call silently breaks the whole analysis chain.

Compute on real data

It reads the R / Python session you already have running. The model sees real data frames and summary statistics.

Results you can recompute

Write code, run it, read output and plots, then correct — the whole loop stays in your editor.

Overview

Why “reading it right” is the premise of statistical skill

Statistical errors rarely show up as crashes. A wrong delimiter shifts every column; treating the first row as a header deletes the first observation; NA and NULL become 0 and the mean and variance move; a numeric column typed as text is treated as a factor in a regression. None of this stops the program. It quietly gives you a plausible wrong number — and because the error happened at read time, every later test, model, and inference inherits it.

So Pize is not optimized to make the model write more code. It first makes the model know the shape of the data, the type of each column, how much is missing, and roughly how many rows — then write the computation and modeling code, and run it in your real session so you can see it.

Core optimization

Recognizing and reading statistical data

Format detection looks at the content, not the extension — in research data a .txt often holds a table, and a .csv is often three lines of config. Each decision below directly decides the numbers that come later.

  • Delimiter detection. Tab, comma, semicolon, or pipe: pick one. Rows must have a stable column count, and fields must look like cells, so prose that uses a comma in every sentence is not treated as a two-column table.
  • Header or data. If the first row still has digits in numeric-column positions, it is an observation, not a column name — eating the first observation as a header is the classic way to lose one sample.
  • Missing values stay out of type inference. Empty strings, NA, NaN, and NULL are recognized on their own; otherwise a column of empties is typed numeric and the model is invited to summarize numbers that are not there.
  • Per-column type inference. Numeric / text / empty, column by column. This step decides whether a column can enter a mean, a variance, or a regression.
  • Comments and metadata are stripped. Leading blocks that start with #, !, or @XX come off first. VCF hides column names in the last comment line; those names are recovered so the columns have names to use.
  • Compressed tables are read transparently. .gz is decompressed automatically; size is judged after decompression — a 1 MB archive can hold a 20 MB table.
  • Row-count estimate. Total rows are estimated from the byte share of the prefix already read, and the figure is labeled as an estimate so it is not reported as fact.
  • Over-budget files get a data card, not an error. When the context budget is exceeded, Pize returns size, delimiter, estimated rows, column names with inferred types, and the first two rows. The model writes the right read code from that card; a million-row table does not eat the context.

Binary containers used in statistics and research

Statistical data is often not plain text. Attach Parquet, Feather, Arrow, RDS, RData, h5ad, Loom, HDF5, NumPy, SPSS (.sav), Stata (.dta), SQLite, or DuckDB, and Pize no longer answers “cannot read binary files”. It reports the format name and how to open it (for example readRDS, anndata.read_h5ad) so the model writes the right read code. PDF, DOCX, XLSX, and notebooks go through text extraction and are readable the same way.

Statistical computing

Compute on real data, not on a guess

Reading comes first, then computing. Pize does not invent statistical methods for you. It makes sure the model faces your real data, and that you can see every step.

  • Choose the method from the real distribution. The model gets row count, column count, types, missing counts, and summaries, and uses them to decide parametric vs nonparametric, whether to transform, and how to handle missingness.
  • Write it, then run it. Generated R or Python runs in the current session after you confirm. What comes back is real output, not the model imagining a result.
  • Diagnose from plots. The latest plot can be retrieved — QQ plots, residual plots, distribution plots that you can only judge by looking. The model can take part in that judgment.
  • Closed iteration. Run, read, correct, all in the same session. Intermediate variables are not lost because a new process started.
  • Aggregates only, never raw rows. Table summaries return structure and statistics. Raw observations stay in the session.

Supporting capability

Positron runtime bridge

The truth of an analysis is not in the file. It is in memory. The bridge reads the R or Python session you currently have focused, through Positron’s public extension API. It never creates or switches a runtime. It only uses the one you are already using.

Five tools

Read, summarize, execute, fetch plots

ToolRoleApproval
get_session_contextRead session language, status, and the variable list (metadata only)Read class
inspect_variablesInspect a variable’s structure and a truncated preview by nameRead class
summarize_tableRow/column counts, types, missing counts, and summaries for a data frameRead class
execute_codeAfter you confirm, run statistical code in the current sessionCommand class, off by default
get_current_plotFetch the latest plot for the model to seeCommand class, off by default

The safety boundary is part of the design: every call re-checks that the session is still in front — if you switched away, it is refused; output volume, variable count, preview length, and image size have hard caps; raw data rows, console history, and secrets are never returned. In ordinary Pize Code these five tools disappear on their own.

Attachments come from the editor buffer

The attachment chips under the input read the editor buffer, not the stale file on disk — the script or data you just changed and have not saved is exactly what the model sees. Duplicate attachments of the same content are de-duplicated by hash.

General capability

It is also a complete programming agent

01

Cross-file edits and diff review

Coordinated edits across files. Every edit is a reviewable, undoable diff, and a whole task can be rolled back.

02

Terminal execution and live output

Run commands in the integrated terminal and read output live. Errors and test failures are caught immediately.

03

Plan / act modes

Survey the data and code first, agree on an analysis plan, then act, so the wrong model is not run on the first try.

04

Context references and browser debugging

Feed context precisely with @file, @folder, @problems, @url. It can also drive the browser, take screenshots, and read logs to locate a problem.

05

Project rules and skills

Put statistical definitions, plotting conventions, and directory rules in a rules file so every teammate’s session follows them.

06

Model choice and MCP

Anthropic, OpenAI, Gemini, DeepSeek, Bedrock, OpenRouter, and local models can all be connected. Databases can be reached through MCP.

Engineering and reliability

The read logic is verified, not believed

  • Recognition is regressed on generated corpora. Labeled samples are generated across 31 file shapes, ten thousand at a time, and run through the detector: the first pass failed 458 cases, exposing four defect classes that were fixed one by one. The random seed is fixed, so the same inputs can re-check the fix.
  • Tripwire tests at every join. Every join to upstream code has a test. If a merge drops one wiring line, the test goes red — the feature does not fail silently under a green suite.
  • The full checklist on every merge. Thousands of unit tests, two type-checkers, repo-wide lint; after packaging, the artifact is unpacked to confirm the behavior is actually in the bundle.
  • One-click self-check. The bridge check in the command palette really reads a session. A pass means the tools reached real data.
  • Coexists with the official build. Shipped under a separate extension id, so it can be installed beside the upstream plugin without overwriting it.

Architecture has one rule that runs through everything: new behavior always goes in new files; upstream files are touched only at the call sites that need them. That is why a merge covering ten upstream commits can conflict on a single line — it can keep following upstream, instead of shipping once and stopping.

Install and start

Four steps: from one dataset to one conclusion

Install the plugin, connect a model, give it the data. What remains is rounds of write-code, run-results, read-plots, and correct.

Positron tools appear only inside the Positron host, and they are read-only by default. Code execution and plot fetch are command-class approvals and must be turned on explicitly. Row counts are estimates and summaries come from the runtime; both are labeled with their source in the result.

Four steps

1

Install the plugin Install the extension in Pize Code or Positron. The Pize icon appears in the sidebar.

2

Connect a model Enter an API key from any provider, or point at a local model and a self-hosted endpoint.

3

Give it the data Attach the current data file, or in Positron focus a session that already has data loaded.

4

Plan, then act Align the analysis plan in plan mode. After you confirm, let it write code, run results, and correct from the plots.