> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tabsutra.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How it works

> Context rows, rows to predict, and what the model does with them.

## Context rows and rows to predict

Every prediction involves two sets of rows.

* **Context rows** have a known answer. In classic machine learning these would be your training set.
* **Rows to predict** have no answer yet. These are the rows you want scored.

With a model you train yourself, the training rows shape the model's weights, and the weights are then used to score new rows. tabSutra works differently. Its weights were fixed when it was pretrained, and they never change. When you send a context, the model reads its rows and keeps what it read for the requests that follow. When you send rows to predict, each one is compared with what the model read, and the model gives its answer.

This has some practical consequences.

* Sending a context is one pass of the model over your rows, not a training run. There is nothing to tune.
* You can change the context, for example by adding last week's rows, and predict again straight away.
* The context is part of the input. A different set of context rows can give different predictions, in the same way that a different training set gives a different model.

For a forecast, the context is the history of the series. The model reads the past values of every series in the request, and any other columns that come with them, and predicts the future steps.

## What the model reads in a row

The model reads each cell of a row as what it is: a number, a category, a date, a text, an image or an embedding. It does not need numbers scaled, categories encoded, or missing values filled. The page on [inputs](https://docs.tabsutra.com/concepts/inputs.md) explains how each kind of cell is handled.

The model does not read column names. So a table with English column names and the same table with column names in another language give the same predictions.

## When rows come in sequences

Many tables are not a set of independent rows. They are sequences: a customer has many months of history, and an account moves through stages. For such data you tell the model which column holds the date and which column holds the customer or account. The model then reads each row in its place in time.

* A row to predict reads only the context answers that were known before its own date.
* A row also reads the earlier rows of its own customer or account.
* Nothing dated after a row is used for that row.

The [Sequences](https://docs.tabsutra.com/guides/sequences.md) guide shows how to set this up.

## When the data is spread over tables

When the information sits in several tables joined by keys, tabSutra reads the tables itself. For a customer at a date, it reads the customer's own data, the rows of other tables that relate to the customer, and the customer's own earlier answers. Everything it reads is dated before that date. You do not write the joins or the aggregations. See [Databases](https://docs.tabsutra.com/guides/databases.md).

## Determinism

The same input always gives the same output. There is no random step at prediction time. The order in which your rows and columns arrive does not change the result, down to the last digit.

## Your data

The model does not keep anything from one context to the next. Each context is read on its own, and your rows are used only to answer your requests.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.