ORIX Intelligence — privacy
Where inference happens
All AI assistance in ORIX Sheet runs on the Mac, through Apple's Foundation Models framework
(SystemLanguageModel.default, the system's on-device language model).
- The package contains no networking code: no
URLSession, no sockets, no remote AI service, no API key. - The only model backend compiled into a Release build is
FoundationModelsBackend. It uses the on-deviceSystemLanguageModelexclusively. The macOS 27 SDK also shipsPrivateCloudComputeLanguageModel(a cloud model); it is never referenced by this code. - A new
LanguageModelSessionis created for every request and discarded afterwards. Nothing is kept between requests, nothing is written to disk, nothing is logged. ScriptedBackend, the deterministic test double, is compiled only in Debug builds (#if DEBUG) and always carries the markerSCRIPTED PREVIEW, which the panel displays. It does not exist in Release.
What is given to the model
The model never receives the workbook. For each request ContextBuilder builds a small text, and the
panel shows that exact text under "What will be shared with the on-device model" before anything is sent.
| Task | Context text (built deterministically) |
|---|---|
| Explain a formula | The formula text, its computed result, the signatures and summaries of the functions it uses (from the registry), the engine's evaluation steps, the current values of the cells it references and the labels next to them |
| Suggest a formula, Python help | Sheet names; used range; selection address; content of the active cell; headers, inferred types and data ranges of the block of data nearest to the active cell; the first rows of that block; labels next to the active cell; defined names; table names; names of available functions; the user's request |
| Review possible errors | The findings of the deterministic auditor (id, rule, severity, location, evidence, explanation, recommended action). No other cell content |
| Describe data, suggest charts, plan a transformation | The profile of the table: per column its name, inferred type, count, missing count and percentage, distinct count, min / max / mean / median / standard deviation / quartiles / sum, first and last date, and the three most frequent values of text columns. Never the rows |
| Explain statistical results | The selected result table (at most 60 rows × 12 columns, cells cut to 28 characters) |
| Document a sheet | The sheet context above plus the detected structure: inputs (constants read by formulas), key formulas with their real text, outputs |
In addition every request carries the app's fixed instructions (constant text, no user data).
Hard caps (ContextLimits)
| Limit | Default |
|---|---|
| Characters of context per request | 6 000 (2 400 on the single retry after a context-window overflow) |
| Columns described | 24 |
| Sample rows | 5 |
| Characters per cell value | 32 |
| Labels near the active cell | 12 |
| Defined names / tables | 20 |
| Evaluation steps / referenced cells | 40 / 24 |
| Auditor findings | 20 |
| Inputs, outputs / key formulas | 20 / 14 |
| Free-text request | 600 characters |
| Python code already in the editor | 2 500 characters |
The rendered context is cut at the character cap whatever the sheet contains (tested with a sheet of 80 columns × 200 rows of long text).
"Include sample values from cells" can be turned off in the panel (ContextLimits.includeSampleValues = false).
Then no cell value is included for the sheet-level tasks: no sample rows, no labels beside the active cell,
no most-frequent values, no input values — only headers, types, addresses and formula text.
(Explaining a formula always includes the values of the cells that formula reads: that is the task.)
What the model's output can do
Nothing by itself.
- AI is never the calculation engine. A suggested formula is parsed by the real parser, checked against the
function registry and the workbook, and evaluated by the real engine on a private copy of the workbook
(
Workbook.clone()); the live workbook is not touched. Only a formula that passed can be inserted, only when the user clicks Insert, as one undoable step, after a second validation against the workbook as it is at that moment. - Review items must carry the id of an auditor finding; anything else is discarded.
- Chart and plan suggestions are restricted to fixed vocabularies and to columns that exist.
- Numbers in prose are compared with the numbers computed by the engine; those that match nothing are shown as unverified.
- Suggested Python is text. It is syntax-checked by passing it on standard input to
python3 -I -c "compile(…)"— compiled, never executed, never written to disk — and skipped when no interpreter is available. Running it is the user's decision in Python Studio. - Sheet content is presented to the model as data; the instructions tell it that text from the sheet is never an instruction. Because every output is validated as described above, a cell that tries to "instruct" the model cannot cause any action.
When the model is unavailable
Intelligence.availability() reports the precise reason: macOS older than 26, Mac not eligible for Apple
Intelligence, Apple Intelligence turned off, model not downloaded yet, or framework missing from the build.
The panel shows that reason and what the user can do, the AI controls are disabled, and no request is made.
Everything else in ORIX Sheet works as before, and the panel keeps showing the deterministic information it
computes itself (formula evaluation steps, data profile, auditor findings, sheet structure), labelled
"Computed · not AI". There is no fallback to any other model or service.
Decoding and the test suite
- Every request, streamed prose included, asks for deterministic decoding (
GenerationOptions(temperature: 0), mapped to greedy sampling on the system model). - A plain
swift testnever calls the on-device model: the tests that generate with the real model (RealModelTests.oversizedPromptMapsToContextWindowExceeded,RealModelTests.fullEvaluation) are opt-in and run only withORIX_AI_EVAL=1; otherwise they are skipped andEVALUATION.mdis not rewritten. The only real-model call left in a default run is the availability query, which generates nothing. The evaluation uses a synthetic workbook only, and it too runs entirely on the Mac.