Skip to content

Prepare data for your own AI

Reading data is not permission to use it for AI. Ophiolite keeps a separate choice, made by the owner of each original or result, for three uses: Find similar data (embedding), Train models and Test models (evaluation). Everything below happens inside your deployment; Ophiolite runs no hosted model and trains nothing.

In the item’s sharing panel, Use for AI lists the people who can read it. Tick what each may do and choose Save AI use. The choice is saved against the version you saw (a conflict asks you to reload), recorded in the activity history, and only counts while the person can read the item: removing their read access, or narrowing who can ever see the original, removes it. People who can read an item see only their own permission. The owner may always use their own data.

from ophiolite import Client
from ophiolite.corpus import verify
corpus = client.export_corpus([(asset, revision, ['GR']), ...], 'corpus-2026-09',
purpose='training', seed=7, fractions=(0.8, 0.1, 0.1))
verify('corpus-2026-09')

The server first authorizes the whole selection for that purpose — one item without permission refuses everything and names only its position — and records the authorization (valid for 15 minutes; revoking later stops future exports, not one already authorized). The folder then holds:

  • bundle/ — an ordinary portable bundle: exact originals, descriptors and curves with their checksums, units, depth references and missing values.
  • corpus.json — ophiolite.ai-corpus/1: the exact selection, why each item was allowed (owner or granted), the purpose, the split algorithm, seed and fractions, the group and split of every item, declared transformations (none: values as published), file checksums, the SDK version and an MLflow-style dataset reference (name, digest, source).
  • samples.jsonl (and samples.parquet when pyarrow is installed) — one row per sample: item, group, split, curve, unit, depth, depth unit and reference, value (null for missing; zero stays zero).

Splits keep a well’s data together: every item is grouped by its LAS WELL (as las-well:<WELL>) or by a group you name (groups={asset: 'north block'}); the split is sha256(seed ‖ NUL ‖ group) placed on the fractions (split/1). Items without a well need a named group. verify() recomputes checksums, membership, splits and every sample from the bundle.

client.search('gamma ray near the reservoir') ranks what you may read by its description (name, type, curves, units, well, how it was made). By default the ranking uses words. An operator can set OPHIOLITE_EMBEDDING_COMMAND to a local program that reads one JSON text per line and prints one vector per line; the gateway always starts it in a network namespace with no interfaces (unshare -rn), so it cannot reach any host, and refuses to run it otherwise. The gateway host must allow unprivileged user namespaces (on Ubuntu 24.04: kernel.apparmor_restrict_unprivileged_userns=0, or an AppArmor profile for the gateway); where it does not, search by meaning answers “unavailable” and nothing is sent to the model. Only items you may use to find similar data are sent to the model; the answer says how many readable items were not searched by meaning, and method='words' searches them all by words. Vectors are cached per model and exact version.

Two different permissions, held by different people:

  • Your data. Whether an item may be used for AI is the choice of the item’s owner, per item and per use, as described above.
  • How you work. Whether the actions you take may be learned from is your own choice, per purpose (training, evaluation), made on your account page. It never covers anyone else’s data, and a deployment with capture off learns from nobody.

On your account page, “Learning from how you work” shows what the deployment answers, the text you are asked to agree to, your history, and a download of the actions on your record: each action you took in the projects you still belong to, one per line. The same list is the account/actions operation; an access key reads the actions in its own project only. Reading it adds no action or consent to your record.

Terminal window
ophiolite trajectories export --scope project:ID --purpose training --destination DIR

writes the work you consented to share in one project to a new folder, grouped into episodes (client.export_trajectories(destination, purpose=...) in Python). Each episode is either shape or values:

  • Shape says what kind of step you took and when, with pseudonyms, digests and listed parameters, never values. --mode shape lowers every episode to its shape.
  • Values (the default, --mode auto, where the rights allow) adds the request, the parameters with their labels, the items and their revisions, check names, verdict reasons and, if you consented to share it, the instruction you gave an agent. An episode has values only when every item it touches may be used for that purpose: the owner granted it to you, it is a catalogue item under an open licence, or it is your own work and you said so.

The folder is a download to wherever you run the command; nothing is uploaded by itself. The folder is yours wherever you download it, and sending it anywhere is your decision.

Your own uploads and results are not used for AI until you say so, per item and per purpose:

Terminal window
ophiolite ai-use self-grant ASSET --purpose training # from now on
ophiolite ai-use self-grant ASSET --purpose training --withdraw

(client.grant_own_ai_use(asset, 'training', granted=True)). Only a person can record this, never an agent or a service key; a withdrawal applies from then on, and a folder already exported keeps what it holds.

Before any text leaves, scans drop each field that looks like a secret (a key or token shape, an assignment such as password=..., a long random string) or holds a member’s name; the manifest counts what was dropped. The scans recognise the patterns and the names the deployment holds, not every secret or every way of naming a person: read a values folder before you share it.

To repeat an export, pass the until from its trajectories.json:

Terminal window
ophiolite trajectories export --scope project:ID --purpose training --destination DIR2 --until N

(client.export_trajectories(destination, purpose=..., until=N)). The new folder holds the same episodes.jsonl, and a manifest that differs only in exported_at, as long as nothing in between changed what you may read, the rights on the items, your consent, a member’s name, the release or the SDK version. A withdrawal changes the next export on purpose: a withdrawn self-grant turns its episodes to shape, and work after a consent withdrawal is left out.

With pyarrow installed, the folder also holds episodes.parquet, one row per episode with its id, mode, split, start, end, row count and the line itself; load checks it against episodes.jsonl. Its bytes repeat only with the same pyarrow version. The SDK ships a two-episode example folder (contracts/scientific/v1/fixtures/work-episodes/folder/ in the package) to test a reader against.

Terminal window
ophiolite trajectories export --scope members:ID --purpose training --destination DIR

(client.export_trajectories(destination, purpose=..., scope='members')). Only an administrator of the project may run it; anyone else is refused and nothing is written. The folder holds the work of every member who consented to the purpose, each person and each agent under its own pseudonym, and nothing of anyone who did not. It holds only what you, the administrator, may read: a member’s action on an item you cannot read is left out and counted. Its manifest names the project, not a person; the export itself is on your record, not in the folder.

Another member’s work has values only where the rights allow it for you: every item the episode touches has recorded rights that permit use with models, or its owner granted it to you for that purpose, and an item that lists a licence also carries the licence pinned. Your own self-grant covers only what you uploaded or made, so another member’s work under it stays shape. A member’s consent withdrawal leaves out their work from then on.

The deployment’s operator can read a member’s consent history on the host, to answer a question about it; each such read is recorded in the access history.

An MCP search tool for AI assistants (it waits for the remote MCP endpoint), model training or hosting, and vector databases.