Agentic data consultant that runs on your own hardware
Project description
insightsmith
Forging insight from raw data.
An agentic data consultant that runs on your own machine.
The foundation, not yet the whole thing
Shipped so far: format detection, loading and profiling behind
ismith look, and hardware probing with model-fit recommendation behindismith doctor. Both are useful on their own, and neither talks to a model or the network.The agentic half — proposing analyses, writing and sandbox-executing code, critiquing the statistics, writing a report — arrives across 0.3.0–0.8.0.
What it does today
pip install insightsmith
ismith look data/sales.csv
╭──────────────── source ─────────────────╮
│ format csv │
│ encoding cp1252 │
│ dialect delimiter=';' decimal=',' │
│ confidence 95% │
│ assumed read as cp1252; charset- │
│ normalizer suggested cp775 │
╰─────────────────────────────────────────╯
umsatz.csv: 5 rows x 3 columns
columns
┏━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
┃ column ┃ dtype ┃ semantic ┃ nulls ┃ unique ┃ detail ┃
┡━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩
│ region │ String │ categorical │ - │ 4 │ Nord (2) · Süd (1) │
│ menge │ Int64 │ numeric │ - │ 5 │ min 4 · med 12 · max… │
│ umsatz │ Float64 │ numeric │ - │ 5 │ min 40.75 · med 120.5 │
└────────┴─────────┴─────────────┴───────┴────────┴───────────────────────┘
candidate keys: menge
Add --json for the same profile as machine-readable output.
Which local model fits your machine
ismith doctor
Probes CPU, RAM, disk and GPU, then sizes each catalogued model against what it finds — per role, because routing and planning are different jobs and your machine may afford one but not the other.
The arithmetic is the point. Weights come from the quantisation's bytes-per-param;
the KV cache from 2 × layers × n_kv_heads × head_dim × context × 2 bytes. Using
n_kv_heads rather than the attention-head count is what makes it right: on a
4 GB laptop GPU at 8k context, qwen3:8b (8 KV heads) needs 1.21 GB of cache
against 4.92 GB of weights, while deepseek-coder:6.7b — same size, but 32 KV
heads and no grouped-query attention — needs 4.29 GB of cache against 4.20 GB
of weights. A rule of thumb based on parameter count alone cannot tell you that.
Models that don't fit outright get a partial-offload layer count rather than a shrug, and anything larger than your RAM is excluded with a reason.
Format detection doesn't trust the extension. A three-stage cascade — extension
hint, then magic bytes, then a text-dialect probe — where each stage can veto the
one before it. A Parquet file named .csv is loaded as Parquet, and you're told
the extension lied. Every result carries a confidence score and the list of
assumptions behind it; below 80% those assumptions are printed rather than hidden.
It is built for the files that actually turn up: semicolon-delimited cp1252 CSVs with decimal commas and thousands separators, BOMs, comment preambles, quoted fields containing the delimiter, gzip and single-member zip wrappers.
Profiling reports per-column dtype and semantic type, null rates, cardinality, numeric summaries with outlier counts by two different methods, temporal ranges, text lengths, category frequencies, candidate keys, and quality notes: duplicate and near-duplicate rows, constant and near-constant columns, runaway cardinality, class imbalance.
As a library
from insightsmith import load, profile, sniff
spec = sniff("data/sales.csv")
print(spec.format, spec.encoding, spec.confidence, spec.warnings)
frame = load(spec) # a Polars LazyFrame — nothing read yet
result = profile(spec)
print(result.summary())
for issue in result.issues:
print(issue.severity.value, issue.column, issue.message)
Polars LazyFrame is the internal representation throughout, so Parquet, Arrow,
NDJSON and UTF-8 CSV are scanned rather than loaded.
Formats loadable in 0.1.0: csv, tsv, xlsx/xlsm (with [excel]), xls, parquet,
feather/arrow, json, jsonl/ndjson. Detected-but-not-yet-loadable formats — sqlite,
duckdb, xml, html, ods, orc, hdf5, spss, stata, sas — say so, and name the release
that will handle them.
Install
pip install insightsmith # csv, tsv, parquet, arrow, json, jsonl
pip install insightsmith[excel] # + xlsx / xls
pip install insightsmith[pandas] # + a .to_pandas() escape hatch
The base install is four dependencies — polars, typer, rich, charset-normalizer. No torch, no pandas, no agent framework. Extras stay optional on purpose.
What it won't do
Worth stating plainly, in advance:
- Large files are profiled on a sample. Above a size threshold the profile is
built from a strided sample of the rows, and every affected statistic is marked
estimated. Row counts remain exact; distributions are approximate. - Encoding detection is a guess on small files. Single-byte codepages are genuinely ambiguous in a few hundred bytes. Sparse non-ASCII text is read as cp1252 and the substitution is reported, but it can still be wrong.
- Statistics have edges. The IQR fence is degenerate when the middle 50% of a column is a single value, so outliers are counted by a MAD-based modified z-score as well, and both numbers are shown. They disagree usefully.
- "Near-duplicate" means one specific thing — identical once string columns are trimmed and case-folded. It is not fuzzy matching.
- Dates are inferred, and
04/01/10is genuinely ambiguous. Date columns load as strings and the format is inferred afterwards, so a file polars cannot parse still loads. Where day-first and month-first fit equally well, the chosen format is reported as a quality note rather than picked silently — check it before trusting anything grouped by that column. - Thousands separators are detected but not stripped. polars has no option for them, so such columns may load as strings.
- No XML row-unit discovery, and zstd payloads aren't inspected (no stdlib decompressor before Python 3.14).
- Throughput figures are estimates, not benchmarks.
ismith doctorderives tok/s from published peak memory bandwidth, which no real decode loop reaches. Devices missing from that table reportunknownrather than a plausible substitute, and the catalog only contains models whose layer and KV-head counts were read from a running Ollama — never guessed.
And for the releases still to come: LLMs write wrong code confidently, the sandbox will be defense-in-depth rather than a security boundary, and a statistical critic reduces but does not remove statistical nonsense.
License
Apache-2.0. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file insightsmith-0.2.0.tar.gz.
File metadata
- Download URL: insightsmith-0.2.0.tar.gz
- Upload date:
- Size: 54.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d455d25739f9941b82c51f9b1d7f2cfd979356014fa7fc3f680dac01f396fe5
|
|
| MD5 |
bcddd21cdd015db1d18f3b68713c1f6c
|
|
| BLAKE2b-256 |
7e90e76c182094c44117ccc55938316eae0f9c89a6db343a1da99086ec5f7149
|
Provenance
The following attestation bundles were made for insightsmith-0.2.0.tar.gz:
Publisher:
release.yml on SofianeOuaari/insightsmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
insightsmith-0.2.0.tar.gz -
Subject digest:
4d455d25739f9941b82c51f9b1d7f2cfd979356014fa7fc3f680dac01f396fe5 - Sigstore transparency entry: 2280907436
- Sigstore integration time:
-
Permalink:
SofianeOuaari/insightsmith@36d217c80e71af07c2e2af9b673b4f6f0bd96f26 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SofianeOuaari
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@36d217c80e71af07c2e2af9b673b4f6f0bd96f26 -
Trigger Event:
push
-
Statement type:
File details
Details for the file insightsmith-0.2.0-py3-none-any.whl.
File metadata
- Download URL: insightsmith-0.2.0-py3-none-any.whl
- Upload date:
- Size: 44.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ff4c38c8af16e2ea94ffd619d8c5e08975c301d8329fc5f02d89093e492a835
|
|
| MD5 |
37c425832e712e3d302cd4761968e5b6
|
|
| BLAKE2b-256 |
8fe1950471e2d228cd860d8eaddd98b30557fd298f89a23cb1d3ef9a6e0c8dcb
|
Provenance
The following attestation bundles were made for insightsmith-0.2.0-py3-none-any.whl:
Publisher:
release.yml on SofianeOuaari/insightsmith
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
insightsmith-0.2.0-py3-none-any.whl -
Subject digest:
7ff4c38c8af16e2ea94ffd619d8c5e08975c301d8329fc5f02d89093e492a835 - Sigstore transparency entry: 2280907456
- Sigstore integration time:
-
Permalink:
SofianeOuaari/insightsmith@36d217c80e71af07c2e2af9b673b4f6f0bd96f26 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/SofianeOuaari
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@36d217c80e71af07c2e2af9b673b4f6f0bd96f26 -
Trigger Event:
push
-
Statement type: